bitbucket-mcp
Enables code review workflows on Bitbucket, including reviewing pull requests with custom checklists.
Click on "Install 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-mcpReview 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
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
While the description discloses the return type (tuple) and source (environment variables), it does not mention potential errors (e.g., missing env vars) or side effects, leaving some behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the purpose, and contains no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple credential retrieval tool with no parameters and an output schema, the description provides sufficient context: what it returns and where from.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so no parameter information is needed. The baseline for 0 parameters is 4, and the schema coverage is trivially 100%.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action 'Retrieve' and the resource 'Bitbucket credentials from environment variables', making the purpose specific and distinct from sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives (e.g., other credential tools), nor any prerequisites or conditional logic.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_bitbucket_pr_diffB
Get the diff for a Bitbucket pull request.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | Bitbucket workspace name | |
| repo_slug | Yes | Repository name/slug | |
| pr_id | Yes | Pull request ID | |
| Yes | Atlassian account email | ||
| api_token | Yes | Bitbucket API token (App password) | |
| context_lines | No | Number of context lines around changes. Defaults to 3. | |
| ignore_whitespace | No | Whether to ignore whitespace changes. Defaults to True. | |
| binary | No | Whether to include binary file diffs. Defaults to False. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, and the description only says 'Get the diff' without disclosing any behavioral traits beyond a simple read operation; does not explain the impact of optional parameters on the diff output.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that communicates the core purpose efficiently, though it could benefit from slightly more structure for a tool with 8 parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the existence of an output schema, the description does not need to explain return values, but it lacks usage context and behavioral details that would help an agent fully understand the tool's function and when to invoke it.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the input schema already describes all parameters; description adds no additional meaning beyond what the schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets a diff for a Bitbucket pull request, which is distinct from sibling tools like get_pr_details or get_code_review_checklist.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives; no prerequisites or exclusions mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| repository_name | Yes | The name of the repository. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It only states the tool's purpose but offers no behavioral details such as whether it is read-only, potential side effects, prerequisites, or error scenarios. The word 'get' implies a read, but this is insufficient for full transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, using only two sentences to convey purpose and usage guidance without any redundant or extraneous information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and the presence of an output schema (not shown), the description covers the core functionality and usage. However, it misses details like prerequisites (e.g., repository existence) or common errors, which could be helpful in a fully complete description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% with a basic description of the parameter. The tool description does not add additional meaning beyond what the schema already provides, resulting in a baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool gets a code review checklist as a guideline for reviewing pull requests, and explicitly tells the LLM to use it for repository-specific guidelines. It is well-distinguished from sibling tools which handle credentials, diffs, and PR details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit context for when to use this tool ('LLM must call this to get repository specific review guidelines'), but does not mention when not to use it or list alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pr_detailsB
Get detailed information about a Bitbucket pull request.
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | Bitbucket workspace name | |
| repo_slug | Yes | Repository name/slug | |
| pr_id | Yes | Pull request ID | |
| Yes | Atlassian account email | ||
| api_token | Yes | Bitbucket API token (App password) |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided; description only says 'get detailed information' without specifying what details are included or whether it's read-only. Lacks behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, front-loaded with action. Could expand slightly but remains concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 5 required parameters and no annotations, description is too brief. Does not explain return format or prerequisites, despite output schema existing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. Description adds no extra meaning beyond schema parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states action (Get) and resource (detailed information about a Bitbucket pull request), distinguishing it from siblings like diffs or parsing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. Does not mention prerequisites or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
parse_bitbucket_pr_urlA
Parse a Bitbucket pull request URL to extract workspace, repository, and PR ID.
| Name | Required | Description | Default |
|---|---|---|---|
| pr_url | Yes | Bitbucket pull request URL |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It explains the output components but does not disclose validation behavior, error handling, or any constraints. Given the tool's simplicity, this is minimally acceptable.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that directly conveys the tool's function without any unnecessary words or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 parameter, output schema present), the description is sufficiently complete. It covers the core functionality, though it could mention handling of invalid URLs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter pr_url already has a description in the schema. The description adds value by specifying the extracted components (workspace, repository, PR ID), going beyond the schema's generic description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: parsing a Bitbucket PR URL to extract workspace, repository, and PR ID. It distinguishes itself from sibling tools which deal with credentials, diffs, checklists, and details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like get_pr_details. The description implies usage for URL parsing but does not explicitly state when it is appropriate or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables 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
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to interact with Bitbucket repositories, primarily focusing on retrieving and reviewing pull request context. It provides a suite of tools for repository operations, allowing users to manage pull requests and explore Bitbucket resources through the Model Context Protocol.40ISC
- 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.165,033MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to read Bitbucket Cloud pull requests and diffs through natural conversation.216MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/JishadMT/bitbucket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server