@jestay/bitbucket-mcp
This server provides Bitbucket Cloud pull request review and management capabilities via MCP tools.
List PRs:
list_pull_requests— list repository PRs filtered by state (default OPEN), paginated.Get PR details:
get_pull_request— full metadata: branches, commits, reviewers, approval status, title, description.Read diffs:
get_pull_request_diff— unified diff of a PR as plain text.Read file contents:
get_file_content— raw file content at a branch, tag, or commit.List comments:
list_pull_request_comments— existing general and inline PR comments with resolution status.Post comments:
create_pull_request_comment— general comments, inline comments on specific lines, or replies to existing comments.Resolve comment threads:
resolve_pull_request_comment— resolve or reopen top-level comment threads.Update PR:
update_pull_request— change the title and/or description of an open PR while preserving other fields.Review workflow support: defaults to ask-before-commenting; can be disabled with
BITBUCKET_YOLO=truefor automation/CI.
Provides tools for code review of Bitbucket Cloud pull requests: list PRs, read diffs, file contents and comments, and post review comments (general, inline, or replies).
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., "@@jestay/bitbucket-mcplist open pull requests in my-workspace/my-repo"
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.
@jestay/bitbucket-mcp
MCP server for code review of Bitbucket Cloud pull requests: list PRs, read diffs, file contents and comments, post review comments (general, inline on specific lines, or replies), resolve comment threads and update the PR title/description.
Tools
Tool | Description |
| List PRs of a repo, filtered by state (default OPEN) |
| Full PR metadata: branches, commits, reviewers, approval status |
| Unified diff of the PR (plain text) |
| Raw file content at a branch/tag/commit |
| Existing PR comments (general and inline), with resolution status |
| Post a comment: general, inline ( |
| Resolve (or reopen with |
| Update the |
Bitbucket Cloud allows resolving any top-level comment, general or inline; replies cannot be resolved, so pass the id of the comment that opens the thread. Liking a comment is not exposed by the public REST API 2.0, so it is not available here.
Bitbucket's PUT /pullrequests/{id} is a full replace: any field omitted from
the body is dropped (reviewers included). update_pull_request therefore reads
the PR first and sends reviewers, close_source_branch and draft back
unchanged, so only the title/description you pass actually change.
Related MCP server: Bitbucket MCP Server
Review workflow
By default the server ships MCP instructions telling the connected agent to
review first and comment later: read the diff, consolidate all findings,
present them to the user, and post only the comments the user explicitly
approved. create_pull_request_comment carries the same warning in its
description, and the other mutating tools (resolve_pull_request_comment,
update_pull_request) ask the agent to act only on an explicit user request.
For unattended use (automation/CI), set BITBUCKET_YOLO=true to remove the
approval gate and let the agent comment autonomously.
Requirements
Node.js 20.6+
An Atlassian API token (see below)
Creating the API token
Create an API token with scopes at https://id.atlassian.com/manage-profile/security/api-tokens, select Bitbucket as the app, and grant these scopes:
Scope | Used for |
| Authentication / identifying the token's user |
| Resolving the workspace in API routes |
| Reading repository file contents ( |
| Listing and reading PRs, diffs and comments |
| Posting review comments, resolving threads, updating the PR |
No other scopes are needed — in particular, write:repository:bitbucket is
NOT required (this server never pushes code).
Note: Atlassian App Passwords are deprecated — use API tokens.
Usage (npx)
No installation needed — any machine with Node 20.6+ can run it via npx.
.mcp.json (Claude Code) or claude_desktop_config.json (Claude Desktop):
{
"mcpServers": {
"bitbucket": {
"command": "npx",
"args": ["-y", "@jestay/bitbucket-mcp"],
"env": {
"BITBUCKET_EMAIL": "you@company.com",
"BITBUCKET_API_TOKEN": "your_token_here",
"BITBUCKET_WORKSPACE": "your-workspace"
}
}
}
}Or with the Claude Code CLI:
claude mcp add bitbucket \
-e BITBUCKET_EMAIL=you@company.com \
-e BITBUCKET_API_TOKEN=your_token_here \
-e BITBUCKET_WORKSPACE=your-workspace \
-- npx -y @jestay/bitbucket-mcpEnvironment variables
Variable | Required | Description |
| Yes | Atlassian account email |
| Yes | Atlassian API token (scopes above) |
| No | Default workspace so tools don't need it per call |
| No | Set to |
Local development
pnpm install
pnpm build
cp .env.example .env # then fill in the values
pnpm dev # run from source (tsx)
pnpm start # run the compiled buildpnpm dev and pnpm start load environment variables from a .env file in
the project root. When registering the server in an MCP client, environment
variables come from the client's own config instead and no .env file is
needed. To register a local build, use
node /absolute/path/to/bitbucket-mcp/dist/index.js as the command.
Project layout
src/
├── index.ts # entry point
├── config.ts # env-var configuration
├── client.ts # HTTP client for the Bitbucket Cloud API 2.0 (auth lives here)
└── server.ts # McpServer + tool registrationAvailable Tools
6 toolscreate_pull_request_commentA
Posts publicly visible content to Bitbucket — do NOT call this tool unless the user has explicitly approved the exact comment text. Post a comment on a pull request. Three modes: general (only content), inline on a specific line (file_path + line, with line_type indicating whether the line is added or removed in the diff), or a reply to an existing comment (parent_id).
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | For inline comments: 1-based line number the comment anchors to. | |
| repo | Yes | Repository slug, e.g. "my-service" (not the full URL). | |
| pr_id | Yes | Pull request id, e.g. 42. | |
| content | Yes | Comment body (Markdown supported). | |
| file_path | No | For inline comments: file path exactly as it appears in the diff. | |
| line_type | No | Whether `line` refers to a line added ("+", numbered in the new file) or removed ("-", numbered in the old file) in the diff. Default: added. | |
| parent_id | No | Id of an existing comment to reply to. | |
| workspace | No | Workspace id. Optional when the BITBUCKET_WORKSPACE env var is set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It discloses that content is 'publicly visible' and requires explicit user approval, which is crucial behavioral context. It also explains the three comment modes. It lacks details about errors or auth, but the key public side-effect is clearly stated.
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 three sentences, front-loaded with a critical warning, then a clear purpose, then the mode breakdown. Every sentence adds value with no redundancy or fluff.
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 8 parameters, 3 modes, and no output schema, the description covers all usage variants and the key approval constraint. It doesn't explain return values or error handling, but the schema covers parameter details and the mode explanations sufficiently address the tool's complexity.
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?
Although the schema already provides 100% parameter descriptions, the description adds meaningful semantic grouping: general mode (only content), inline mode (file_path + line with line_type), and reply mode (parent_id). This relational understanding goes beyond what the schema individually 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's function: 'Post a comment on a pull request.' It specifies the resource (pull request comment) and the verb (post/create), and the three modes further clarify exactly what the tool does, distinguishing it from sibling list/get 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?
The description provides strong usage guidance: 'do NOT call this tool unless the user has explicitly approved the exact comment text' sets a critical precondition, and the three-mode explanation tells when to use different parameter combinations. However, it does not explicitly name sibling tools as alternatives for reading comments.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_contentA
Get the raw content of a file at a given ref (branch name, tag or commit hash). Useful to see full context beyond the diff hunks during a review.
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | Branch name, tag or commit hash (e.g. the PR source branch or source_commit from get_pull_request). Branch names containing slashes (e.g. "bugfix/foo") are supported and resolved to a commit hash automatically. | |
| path | Yes | File path inside the repo, e.g. "src/app/main.ts". | |
| repo | Yes | Repository slug, e.g. "my-service" (not the full URL). | |
| workspace | No | Workspace id. Optional when the BITBUCKET_WORKSPACE env var is set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry transparency. It discloses that the tool returns raw content and supports branch/tag/commit refs, but does not mention error handling, size limits, or whether binary content is encoded. The read-only nature is implied by 'get' but not explicitly stated.
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?
Two short sentences—first defines the action, second gives a concrete use case. No wasted words; the front-loaded verb 'Get' makes it immediately clear.
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?
The description covers the tool's purpose, ref types, and a practical review scenario. While there is no output schema, 'raw content' sufficiently implies the response body, though it does not specify encoding or error cases—minor gaps for a simple getter.
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 input schema already describes all four parameters with 100% coverage, so the description adds little beyond the schema. It reaffirms 'raw content' and ref types, which are also in parameter descriptions.
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 action ('Get the raw content of a file') and specifies the ref parameter (branch, tag, commit). This distinguishes it from sibling tools focused on pull request metadata, diffs, and comments.
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 explicitly notes it is useful for seeing full context beyond diff hunks during a review, guiding the agent to use this tool when a diff is insufficient. It does not list exclusions or alternative tools by name, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pull_requestA
Get full metadata of a pull request: title, description, author, branches with commit hashes, state, and reviewers with their approval status.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository slug, e.g. "my-service" (not the full URL). | |
| pr_id | Yes | Pull request id, e.g. 42. | |
| workspace | No | Workspace id. Optional when the BITBUCKET_WORKSPACE env var is set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must carry the behavioral transparency burden. It outlines the output scope (metadata fields) but does not disclose authentication needs, failure behavior, or explicitly confirm read-only semantics beyond the verb 'Get'. It is adequate but not rich.
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 sentence that front-loads the purpose and lists the included metadata. Every word contributes to understanding the tool's function; there is no unnecessary filler.
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?
The tool has only 3 parameters with full schema coverage and no output schema, so the description's listing of return fields compensates for missing output schema. It does not mention error cases or workspace usage, but for a straightforward GET operation, this is reasonably complete.
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 input schema has 100% description coverage for all three parameters (repo, pr_id, workspace), so the baseline is 3. The description adds no parameter-specific meaning beyond what the schema already 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 uses a specific verb and resource ('Get full metadata of a pull request') and lists the exact fields returned (title, description, author, branches, state, reviewers). This distinguishes it clearly from sibling tools like get_pull_request_diff or list_pull_request_comments.
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 implies its use for retrieving pull request metadata, but it does not explicitly state when to use this tool versus alternatives or provide exclusions. Sibling tools are not referenced, leaving usage to be inferred from the purpose statement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_pull_request_diffA
Get the unified diff of a pull request as plain text. This is the primary input for a code review.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository slug, e.g. "my-service" (not the full URL). | |
| pr_id | Yes | Pull request id, e.g. 42. | |
| workspace | No | Workspace id. Optional when the BITBUCKET_WORKSPACE env var is set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It mentions the output is a unified diff as plain text, which conveys a read-only, text-returning behavior. However, it does not disclose potential size limits, error behavior, or required permissions, leaving the agent with incomplete 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?
The description is a single, front-loaded sentence. Every phrase earns its place: the verb-resource pair specifies the operation, 'as plain text' clarifies the return format, and the second sentence provides useful usage context without fluff.
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, read-only diff-fetching tool, the description is largely complete: it names the tool's purpose, output format, and primary use case. It lacks details about pagination, diff size limits, or error scenarios, but these are not essential for basic invocation and the input schema fully covers parameters.
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 all parameters documented in the input schema. The description adds no parameter-specific meaning beyond the schema, so the baseline score applies.
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 a specific action ('Get the unified diff') and resource ('pull request'), and notes the output is plain text. It is distinct from sibling tools like get_pull_request, which presumably returns metadata, and get_file_content, which targets a single file.
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 phrase 'This is the primary input for a code review' provides clear context for when the tool is appropriate. It does not explicitly name alternatives or exclusions, but the intended use case is well implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_pull_request_commentsA
List the comments of a pull request (general and inline). Use it before posting review comments to avoid repeating observations already made. Paginated; next_page is set when more results exist.
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based). | |
| repo | Yes | Repository slug, e.g. "my-service" (not the full URL). | |
| pr_id | Yes | Pull request id, e.g. 42. | |
| pagelen | No | Results per page (max 50, default 10). | |
| workspace | No | Workspace id. Optional when the BITBUCKET_WORKSPACE env var is set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the transparency burden. It adds useful behavioral details such as pagination ('Paginated; `next_page` is set when more results exist') and the inclusion of general and inline comments. However, it does not explicitly confirm that the operation is read-only, nor does it describe sorting or error behavior.
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 three sentences, all of which are relevant: main action, usage guidance, and pagination behavior. It is front-loaded with the purpose and contains no filler.
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?
The description covers purpose, usage, and pagination for a list tool with 5 parameters (fully schema-documented) and no output schema. It could be more complete by describing the return structure, but the information provided is sufficient for basic invocation and understanding.
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 description adds no parameter-specific meaning beyond what the schema provides. The pagination mention relates to page/pagelen but does not add new syntax or format details.
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 function: 'List the comments of a pull request (general and inline)'. This is a specific verb and resource, and it distinguishes itself from sibling tools like list_pull_requests, get_pull_request_diff, and create_pull_request_comment.
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 a clear usage context: 'Use it before posting review comments to avoid repeating observations already made.' This tells the agent when to use the tool, but it does not explicitly name alternatives or state 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.
list_pull_requestsA
List pull requests of a repository, filtered by state (default OPEN). Returns a summary per PR: id, title, author, branches, state, comment count and last update. Paginated; next_page is set when more results exist.
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (1-based). | |
| repo | Yes | Repository slug, e.g. "my-service" (not the full URL). | |
| state | No | PR state to filter by (default OPEN). | |
| pagelen | No | Results per page (max 50, default 10). | |
| workspace | No | Workspace id. Optional when the BITBUCKET_WORKSPACE env var is set. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. It discloses pagination via `next_page`, the summary fields returned, and the default state behavior. It does not explicitly state it is read-only, but the 'List' and 'Returns a summary' wording implies a non-mutating operation.
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?
Two sentences, front-loaded with the main purpose, followed by concrete details. No redundant or vague wording.
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?
The description covers the core behavior, return summary, and pagination. It does not mention auth requirements or error behavior, but these are less critical for a list operation. The schema covers parameter details, so the description is adequate.
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 the baseline is 3. The description repeats the default OPEN state (already in schema) and mentions pagination but does not add new detail about page or pagelen 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 verb 'List' and the resource 'pull requests of a repository', and includes the state filter. It is distinct from sibling tools like get_pull_request (singular) or list_pull_request_comments.
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 clear context for when to use this tool (listing PRs with optional state filtering) but does not explicitly mention alternatives or exclusions. The context is sufficient for an agent to distinguish it from siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.2- First observed
create_pull_request_comment - First observed
get_file_content - First observed
get_pull_request - First observed
get_pull_request_diff - First observed
list_pull_request_comments - First observed
list_pull_requests
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose: listing PRs, getting PR metadata, getting the diff, reading file content, listing comments, and posting comments. There is no overlap or ambiguity between them.
All tool names follow a consistent verb_noun pattern using snake_case, such as list_pull_requests, get_pull_request_diff, and create_pull_request_comment. The naming is uniform and predictable.
With exactly 6 tools, the server is well-scoped for a pull request review workflow. Each tool serves a necessary function without redundancy or bloat.
The tool set covers the full review loop: discover PRs, inspect details and diffs, view file contents for context, check existing comments, and post new feedback. No critical gaps are apparent for the intended purpose.
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
MCP server for visual regression testing: triage a PR's UI diffs from your coding agent.
A MCP server built for developers enabling Git based project management with project and personal…
MCP server for siGit (sigit.si): browse repos, search code, manage PRs/issues, web search.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for Bitbucket Cloud, focused on pull-request review workflows112,111MIT
- AlicenseBqualityBmaintenanceMCP server for Bitbucket Server integration, enabling project, repository, pull request, source code, branch, and code review operations via the Bitbucket Server APIs.2713MIT
- FlicenseCqualityCmaintenanceAn MCP server for Bitbucket Cloud, covering pull requests, pull request comments, and pipelines.26-
- AlicenseAqualityCmaintenanceMCP server for Bitbucket Cloud that enables reviewing, managing, and merging pull requests, assigning reviewers by name, reading files at a ref, and inspecting pipeline status from any MCP client.14MIT