bitbucket-mcp
Enables code review workflows on Bitbucket, including reviewing pull requests with custom checklists.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@bitbucket-mcp Review pull request https://bitbucket.org/myteam/myapp/pull-requests/42"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Bitbucket Review Server
This is an MCP server for LLMs to use capabilities of bitbucket to it's code review workflows.
Installation
You need python 3.10 or above for this to work.
Install from pip:
pip install mcp-bitbucket-reviewRelated MCP server: Bitbucket MCP Server
Configuration in Cursor
Go to
File->Preferences->Cursor Settings->MCP & Integrations.Add a new MCP server.
Add the bitbucket server MCP from the following to the mcpServers object of mcp.json:
{ "mcpServers": { // ... your rest of the MCP servers "bitbucket": { "command": "mcp-bitbucket-review-server", "env": { "BITBUCKET_EMAIL": "YOUR_BITBUCKET_EMAIL", "BITBUCKET_API_TOKEN": "YOUR_BITBUCKET_API_TOKEN" } } } }Save the settings.
Usage sample
Open new chat and give following prompt:
Review pull request <YOUR_PULL_REQUEST_URL>
Code Review Checklist
You can provide a custom code review checklist to be used during the review process. The checklist is read from a file and can have both general guidelines and guidelines specific to each repository.
Checklist file structure
The checklist file is a plain text file with sections for each repository. A section starts with the repository name in square brackets (e.g., [my-repo]). A special section named [general] can be used for guidelines that apply to all repositories.
Here is an example of a checklist file:
[general]
Ensure code is well-documented.
Check for any commented-out code that should be removed.
[my-awesome-repo]
Follow the "Awesome Repo" coding style.
Make sure to update the `awesome-spec.json` file.
[another-repo]
All new features must be covered by integration tests.Configuration
To use the checklist, you need to set the BITBUCKET_CODE_REVIEW_CHECKLIST environment variable to the absolute path of your checklist file.
You can add this to your mcp.json configuration file:
{
"mcpServers": {
// ... your rest of the MCP servers
"bitbucket": {
"command": "mcp-bitbucket-review-server",
"env": {
// ... other environment variables
"BITBUCKET_CODE_REVIEW_CHECKLIST": "C:\\path\\to\\your\\checklist.txt"
}
}
}
}Get API token from bitbucket
Go to https://id.atlassian.com/manage-profile/security/api-tokens
Click on button labelled
Create API token with scopesGive scopes and store the API token. Make sure you give the following scopes to the API token:
read:pullrequest:bitbucket write:pullrequest:bitbucket read:repository:bitbucket
Happy coding!
Available Tools
5 toolsget_bitbucket_credsA
Retrieve Bitbucket credentials from environment variables. Returns: tuple: Containing the Bitbucket email and API token.
Inputs: no named parameters. Returns: result
get_bitbucket_pr_diffB
Get the diff for a Bitbucket pull request.
Inputs: workspace (required), repo_slug (required), pr_id (required), email (required), +4 more. Returns: result
get_code_review_checklistA
Get code review checklist which acts as a guideline to review pull request. LLM must call this to get repository specific review guidelines.
Inputs: repository_name (required). Returns: result
get_pr_detailsB
Get detailed information about a Bitbucket pull request.
Inputs: workspace (required), repo_slug (required), pr_id (required), email (required), +1 more. Returns: object
parse_bitbucket_pr_urlA
Parse a Bitbucket pull request URL to extract workspace, repository, and PR ID.
Inputs: pr_url (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: credentials, diff, checklist, PR details, and URL parsing. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern with underscores, e.g., get_bitbucket_pr_diff, parse_bitbucket_pr_url. No mixing of conventions.
With 5 tools, the set is slightly minimal but still reasonable for focused Bitbucket PR-related tasks. Could include more operations like listing PRs.
The tools cover credential retrieval, diff, review guidelines, PR details, and URL parsing, but lack essential CRUD operations like creating or updating PRs, listing PRs, or commenting.
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Assess pull requests and read verdicts, findings, evidence and suggested fixes from coding agents.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with Bitbucket Cloud and self-hosted instances for pull request reviews, code search, repository operations, and managing PR comments and approvals.19GPL 3.0
- AlicenseBqualityDmaintenanceEnables LLMs to interact with Bitbucket repositories to manage pull requests, branches, and commits through the Model Context Protocol. It supports repository operations such as searching code, accessing file contents, and comparing branches using natural language.166,189 npmMIT
- AlicenseBqualityDmaintenanceEnables AI assistants to read Bitbucket Cloud pull requests and diffs through natural conversation.223 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Bitbucket Cloud and Server APIs to list and retrieve repositories, fetch and create pull requests, and manage related resources through natural language.6,189 npmMIT