AI code review for Bitbucket pull requests.
Mesrai reviews every Bitbucket Cloud pull request automatically and posts its findings as comments in the pull request — bugs, security risks, performance problems and architecture impact, checked by specialised agents that understand your whole repository, not just the diff.
- Platform
- Bitbucket Cloud pull requests
- Connects with
- Bitbucket API token
- Reviews
- Every pull request
58for event in failed_events: process_payment(event)Retrying without an idempotency check can charge a customer twice when the first attempt actually succeeded. Record processed event ids and skip events that were already handled.
Why Bitbucket teams need more than a diff review
- 01
Pull requests wait for the few people who know each part of the codebase.
- 02
Diff-only review misses how a change affects callers in other modules.
- 03
Duplicate processing, missing checks and unsafe retries look harmless in a small diff.
- 04
Team conventions are applied differently by every reviewer.
What Mesrai reviews on every pull request
Bugs and logic errors
Incorrect conditions, unhandled errors, race conditions and broken edge cases in the changed code.
Security risks
Injection, secrets committed to the repository, missing authorization and other vulnerability patterns.
Performance problems
N+1 queries, unbounded loads and expensive work in hot paths, each with a suggested fix.
Architecture impact
A repository graph built from the syntax tree shows how the change reaches code outside the diff.
Your team's rules
Mesrai Rules turn your conventions into automatic checks, written in plain English or YAML.
Linked tasks
Business logic validation compares the pull request with the requirements in its linked Jira issue or task.
How Mesrai works with Bitbucket
- 01
A webhook tells Mesrai when a pull request is opened or updated.
- 02
Mesrai reads the changes and builds context from the repository graph.
- 03
Specialised agents review the change in parallel: general, bugs, security, performance and Mesrai Rules.
- 04
Findings are posted as comments directly in the Bitbucket pull request.
- 05
A mesrai-config.yml file in the repository root overrides the web settings for that repository.
Set up in a few minutes
Bitbucket Cloud connects with an Atlassian API token that has the Bitbucket scopes listed here.
- 1
Create a Mesrai account and choose Bitbucket.
- 2
In Atlassian account settings → Security, create an API token with scopes and select Bitbucket.
- 3
Paste the token into Mesrai when you enable the Bitbucket integration.
- 4
Select the repositories Mesrai should review, then open a pull request.
API token scopes
- read:user · read:workspace · read:project
- Identify the account and read workspace and project metadata
- read:repository · write:repository
- Read the code under review
- admin:repository
- Manage the webhook that sends pull request events to Mesrai
- read:pullrequest · write:pullrequest
- Read pull requests and post review comments
- read:issue · read:pipeline
- Context from issues and pipeline status
- read:webhook · write:webhook
- Create and check the pull request webhook
- Pricing
- Every feature is free for 14 days with no credit card. After the trial, Pro is ₹499 / $6 per developer per month on your own LLM key (BYOK) — you pay your AI provider directly, with no markup.
Each scope ends in :bitbucket in the Atlassian token screen. The token is shown only once, so copy it straight into Mesrai.
Mesrai for Bitbucket — frequently asked
How do I add AI code review to Bitbucket?
+Create a Mesrai account, create an Atlassian API token with the Bitbucket scopes listed on this page, and paste it into Mesrai. Select the repositories to review, and every pull request is reviewed automatically.
Does Mesrai support Bitbucket Cloud?
+Yes. Mesrai reviews Bitbucket Cloud pull requests and posts its findings as comments in the pull request.
Why does the token need admin:repository?
+Mesrai uses it to create and manage the webhook that notifies it when a pull request is opened or updated. Grant only the scopes listed on this page.
Can Mesrai check a pull request against its Jira issue?
+Yes. With the Jira integration connected, business logic validation compares the pull request with the requirements in its linked issue.
Which AI model reviews our code?
+You choose. Mesrai is BYOK: connect your own key from OpenAI, Anthropic, Google, AWS Bedrock or any OpenAI-compatible provider, and you pay that provider directly.
Is our code used to train AI models?
+No. Your code is never used to train any model. See the data usage page in the docs for how code is processed during a review.
Try Mesrai on your next pull request.
14-day free trial · every feature unlocked · no credit card required.
More integrations
Install the GitHub App and every pull request gets an automatic AI review with inline comments.
Learn more JiraCheck every pull request against the acceptance criteria in its Jira ticket, before it merges.
Learn more Azure DevOpsAutomatic AI review on every Azure Repos pull request, with findings posted in the PR thread.
Learn more GitLabAutomatic AI review on every GitLab merge request, with findings posted as MR comments.
Learn more