Bitbucket MCP
Provides tools for interacting with Bitbucket Cloud, focusing on pull request review workflows including listing repositories, pull requests, diffs, comments, commits, exploring file trees, and performing actions like commenting, approving, or requesting changes on pull requests.
bitbucket-mcp
English · Português (BR)
MCP server for Bitbucket Cloud, focused on the first pass of pull-request review. stdio transport, for use with Claude Code or Claude Desktop.
Why an API token (and not an app password)
Bitbucket Cloud app passwords have been in brownout since 2026-06-09 and are removed on 2026-07-28. This server uses an API token, and the HTTP Basic pair is email:token — the Bitbucket REST API requires the Atlassian account email, not the username. Using the username results in a silent 401.
Related MCP server: bitbucket-mcp-server
1. Create the API token
Bitbucket top bar → Settings → Atlassian account settings → Security.
Create and manage API tokens → Create API token with scopes.
Name it, set an expiry, and select Bitbucket as the app.
Minimum scopes for PR review:
read:repository:bitbucket(read repositories, diffs, files)read:pullrequest:bitbucket(read PRs and comments)write:pullrequest:bitbucket(comment, approve, request changes)
Copy the token (shown only once).
2. Install and build
npm install
npm run buildThis generates dist/index.js (the server binary).
3. Configure in Claude Code
Add this to the project's .mcp.json (or to your global Claude Code config):
{
"mcpServers": {
"bitbucket": {
"command": "node",
"args": ["/absolute/path/to/bitbucket-mcp/dist/index.js"],
"env": {
"BITBUCKET_EMAIL": "your-email@domain.com",
"BITBUCKET_API_TOKEN": "your_api_token",
"BITBUCKET_WORKSPACE": "your_workspace"
}
}
}
}Alternative, via the CLI:
claude mcp add bitbucket \
-e BITBUCKET_EMAIL=your-email@domain.com \
-e BITBUCKET_API_TOKEN=your_api_token \
-e BITBUCKET_WORKSPACE=your_workspace \
-- node /absolute/path/to/bitbucket-mcp/dist/index.jsBITBUCKET_WORKSPACE is optional; if omitted, each tool must be given workspace explicitly.
Tools
Read (no side effects):
Tool | Purpose |
| Repositories in the workspace |
| PRs by state (OPEN/MERGED/DECLINED/SUPERSEDED) |
| PR metadata (description, branches, reviewers, approvals) |
| Unified diff — the basis for the review |
| Existing comments (general and inline) |
| PR commits |
| Lists the repo file tree at a commit/branch (explore the project) |
| Contents of a file (default branch if |
Write (mutate state in Bitbucket):
Tool | Purpose |
| Comment on the PR; |
| Approve the PR |
| Mark "request changes" |
Security note
The token grants read/write access to the workspace's PRs. Treat it as a secret: keep it in an environment variable / secret manager, and never commit it. For a first-pass subagent that only suggests review without mutating anything, use a read-only scoped token — that way approve/comment fail on permission rather than relying on prompt discipline.
License
MIT © José Danilo
Available Tools
11 toolsadd_pull_request_commentComment on a pull requestA
WRITE — posts a comment on the PR. Provide path and line together for an inline comment.
Inputs: id (required), repo (required), text (required), line, +2 more.
approve_pull_requestApprove a pull requestB
WRITE — records the authenticated user's approval on the PR.
Inputs: id (required), repo (required), workspace.
get_fileRead a file at a commitA
Reads a file's contents. If commit is omitted, uses the repository's default branch.
Inputs: path (required), repo (required), commit, workspace.
get_pull_requestPull request detailsA
Returns full metadata for a PR (description, branches, reviewers, state).
Inputs: id (required), repo (required), workspace.
get_pull_request_commentsPull request commentsB
Lists a PR's existing comments (general and inline).
Inputs: id (required), repo (required), workspace.
get_pull_request_commitsPull request commitsC
Lists the commits that make up the PR.
Inputs: id (required), repo (required), workspace.
get_pull_request_diffPull request diffB
Returns the PR's full unified diff — the basis for a first-pass review.
Inputs: id (required), repo (required), workspace.
list_directoryList repository treeA
Lists files and directories under a repository path at a commit/branch. Use it to explore the project structure while reviewing a PR. Empty path = root; max_depth > 1 lists recursively. To see the code as proposed in the PR, pass the source_commit returned by get_pull_request.
Inputs: repo (required), path, commit, max_depth, +1 more.
list_pull_requestsList pull requestsB
Lists a repository's PRs, filtered by state.
Inputs: repo (required), limit, state, workspace.
list_repositoriesList repositoriesA
Lists repositories in a workspace, sorted by most recently updated.
Inputs: limit, workspace.
request_changes_pull_requestRequest changes on a pull requestB
WRITE — records the authenticated user's 'request changes' on the PR.
Inputs: id (required), repo (required), workspace.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool has a clearly distinct purpose: listing repos, PRs, directory/file reading, PR metadata retrieval (diff, comments, commits), and PR write actions (comment, approve, request changes). No overlap in functionality.
All tools follow a consistent verb_noun snake_case pattern (e.g., get_pull_request, add_pull_request_comment, list_repositories). No mixing of styles or vague verbs.
11 tools is well-scoped for a Bitbucket integration, covering essential read and write operations for repositories and pull request review workflows without being excessive.
Covers core PR review actions (get, comment, approve, request changes) plus file/directory exploration. Minor gaps like merge/decline PR or update/delete comments, but sufficient for typical agent use.
Maintenance
Related MCP Connectors
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
MCP server for siGit (sigit.si): browse repos, search code, manage PRs/issues, web search.
A MCP server built for developers enabling Git based project management with project and personal…
Related MCP Servers
- AlicenseCqualityCmaintenanceMCP server for integrating with Bitbucket Cloud and Server APIs, enabling AI assistants to interact with repositories, pull requests, pipelines, and more.5933 npm3MIT
- FlicenseBqualityDmaintenanceMCP server for Bitbucket Cloud that exposes Pull Request operations as tools for Claude and other MCP clients.14-
- AlicenseBqualityBmaintenanceMCP server for Bitbucket Server integration, enabling project, repository, pull request, source code, branch, and code review operations via the Bitbucket Server APIs.2759 npmMIT
- FlicenseCqualityDmaintenanceAn MCP server for Bitbucket Cloud, covering pull requests, pull request comments, and pipelines.26-