bitbucket-mcp
Provides tools for managing Bitbucket pull requests, comments, and pipelines.
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 list open pull requests"
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.
bitbucket-mcp
⚠️ This is a personal project built for fun and carries no support or guarantees. For anything that matters, prefer the official Atlassian MCP server.
An MCP server for Bitbucket Cloud, covering pull requests, pull request comments, and pipelines. Distributed as a Claude Code plugin.
Setup
Requires uv on PATH.
1. Install
claude plugin marketplace add Zomino/bitbucket-mcp
claude plugin install bitbucket@bitbucket2. Create a token
Create a Bitbucket API token at https://id.atlassian.com/manage-profile/security/api-tokens. Grant exactly these scopes:
Scope | Why |
| List and read pull requests, diffs, commits, statuses, and comments |
| Create, update, comment, approve, request changes, decline, and merge |
| Read pipelines, steps, and step logs |
| Read the repository content behind pull request diffs and commits |
With BITBUCKET_READ_ONLY=true, drop write:pullrequest:bitbucket and grant
only the three read: scopes.
3. Set the env vars
Set these in the env block of a Claude Code settings file
(~/.claude/settings.json for every project, or .claude/settings.json for
one), then restart the session.
{
"env": {
"BITBUCKET_WORKSPACE": "my-workspace",
"BITBUCKET_REPO": "my-repo",
"BITBUCKET_USERNAME": "me@example.com",
"BITBUCKET_API_TOKEN": "…"
}
}Variable | Required | Default | Purpose |
| yes | Workspace slug | |
| yes | Repository slug | |
| yes | Atlassian account email | |
| yes | Token from step 2 | |
| no |
| Expose read-only tools only |
| no |
| Toggle pull request tools |
| no |
| Toggle pipeline tools |
Related MCP server: Bitbucket MCP Server
Development
Run the test suite with
uv run pytest.Build a wheel with
uv build.Publish with
uv publish.
One server instance targets one workspace and repository, selected by the env vars above.
Available Tools
26 toolsapprove_pull_requestD
Approve a pull request.
Inputs: pull_request_id (required). Returns: result
create_inline_pull_request_commentC
Add an inline comment to a pull request.
Inputs: line (required), path (required), text (required), pull_request_id (required), +1 more. Returns: id, line, path, text, +2 more
create_pull_requestC
Open a pull request.
Inputs: title (required), source_branch (required), description, destination_branch, +1 more. Returns: id, state, title, author, +8 more
create_pull_request_commentC
Add a comment to a pull request.
Inputs: text (required), pull_request_id (required), pending. Returns: id, line, path, text, +2 more
decline_pull_requestC
Decline a pull request.
Inputs: pull_request_id (required). Returns: result
delete_pull_request_commentC
Delete a pull request comment.
Inputs: comment_id (required), pull_request_id (required). Returns: result
diagnose_pipeline_failureA
Get a failed pipeline's failed steps.
Inputs: pipeline_id (required). Returns: pipeline, failed_steps
edit_pull_request_commentC
Edit a pull request comment.
Inputs: text (required), comment_id (required), pull_request_id (required). Returns: id, line, path, text, +2 more
get_open_pull_requestsA
List open pull requests.
Inputs: no named parameters. Returns: result
get_pipelineC
Get a pipeline run.
Inputs: pipeline_id (required). Returns: uuid, state, result, ref_name, +2 more
get_pipelinesA
List recent pipeline runs.
Inputs: no named parameters. Returns: result
get_pipeline_step_logC
Get the log for a pipeline step.
Inputs: step_uuid (required), pipeline_id (required). Returns: result
get_pipeline_stepsC
Get a pipeline's steps.
Inputs: pipeline_id (required). Returns: result
get_pull_requestC
Get a pull request's details.
Inputs: pull_request_id (required). Returns: id, state, title, author, +8 more
get_pull_request_commentsC
Get a pull request's comments.
Inputs: pull_request_id (required). Returns: result
get_pull_request_commitsB
Get a pull request's commits.
Inputs: pull_request_id (required). Returns: result
get_pull_request_diffB
Get a pull request's diff.
Inputs: pull_request_id (required). Returns: result
get_pull_request_statusesB
Get a pull request's build statuses.
Inputs: pull_request_id (required). Returns: result
merge_pull_requestC
Merge a pull request.
Inputs: pull_request_id (required), message, merge_strategy, close_source_branch. Returns: result
reopen_pull_request_commentB
Reopen a pull request comment thread.
Inputs: comment_id (required), pull_request_id (required). Returns: result
reply_to_pull_request_commentC
Reply to a pull request comment.
Inputs: text (required), reply_to (required), pull_request_id (required), pending. Returns: id, line, path, text, +2 more
request_pull_request_changesC
Request changes on a pull request.
Inputs: pull_request_id (required). Returns: result
resolve_pull_request_commentC
Resolve a pull request comment thread.
Inputs: comment_id (required), pull_request_id (required). Returns: result
unapprove_pull_requestC
Remove your approval from a pull request.
Inputs: pull_request_id (required). Returns: result
update_pull_requestD
Update a pull request.
Inputs: pull_request_id (required), title, description. Returns: id, state, title, author, +8 more
withdraw_pull_request_changesB
Withdraw your changes request on a pull request.
Inputs: pull_request_id (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 26 tools
Each tool targets a distinct resource and action. Pull request tools are clearly separated by operation (get, create, update, merge, approve, etc.) and by scope (list vs detail, comments vs inline comments vs replies). Pipeline tools are similarly distinct for runs, steps, and logs.
Tool names consistently follow a verb_noun pattern (e.g., get_pull_request, create_pull_request_comment, get_pipeline_steps). Even the slightly longer names like request_pull_request_changes or diagnose_pipeline_failure remain readable and align with the pattern.
26 tools is slightly above the typical 3-15 range, but the scope intentionally covers both pull request management (21 tools) and pipeline inspection (5 tools). Each tool serves a distinct, non-redundant purpose, making the count justified rather than bloated.
The pull request lifecycle is well covered: create, update, merge, decline, approve, request changes, comments, diffs, commits, and statuses. Pipelines cover listing, getting details, steps, logs, and failure diagnosis. Minor gaps exist (e.g., no general list of PRs filtered by state, no pipeline triggering), but they are non-critical for most workflows.
Maintenance
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
MCP server for Appcircle mobile CI/CD platform.
Related MCP Servers
- AlicenseBqualityCmaintenanceAn MCP server that enables interaction with Bitbucket repositories through the Model Context Protocol, supporting both Bitbucket Cloud and Server with features for PR lifecycle management and code review.204,104 npm31MIT
- AlicenseBqualityDmaintenanceAn MCP server that provides tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server, enabling pull request, branch, file, code review, and search operations.19MIT
- AlicenseBqualityDmaintenanceAn MCP server for Bitbucket Cloud that enables managing pull requests, branches, and repositories in natural language from any MCP-capable client.23542 npm4MIT
- AlicenseAqualityDmaintenanceMCP 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