bitbucket-mcp
Provides tools for managing pull-requests on Bitbucket Cloud, including reading PR metadata, comments, diffs, posting comments, and approving PRs.
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-mcpshow the diff for PR #12"
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
A small local MCP server wrapping the
Bitbucket Cloud API for pull-request reviews in Claude Code. Works with any
workspace/repo via env vars; the workspace defaults to campsys, and you set
BB_REPO per repo you review.
Tools
Tool | Type | Purpose |
| read | PR metadata (title, state, branches, commit hashes) |
| read | All comments (paginated), inline path/line, reply parent ids |
| read | PR diff via local |
| write | Post a comment; supports inline ( |
| write | Approve the PR |
Related MCP server: Atlassian Bitbucket MCP Server
Requirements
Node 18+ (uses built-in
fetch; developed on Node 25).git on
PATH(used byget_diff).A scoped Atlassian API token — see below. The token is per-person and is never committed or shared.
1. Get your own Atlassian API token
App Passwords are being removed by Atlassian (final removal 2026-07-28), so use a scoped API token:
Create one at https://id.atlassian.com/manage-profile/security/api-tokens.
Give it these Bitbucket scopes:
read:pullrequest:bitbucket,write:pullrequest:bitbucket,read:repository:bitbucket,read:account. (A plain Jira token without Bitbucket scopes returns 401.)
Set these environment variables (persist them for your user/shell):
Var | Value |
| your Atlassian account email |
| the scoped token from step 1 |
Windows (PowerShell, persistent):
[Environment]::SetEnvironmentVariable('BB_EMAIL','you@company.com','User')
[Environment]::SetEnvironmentVariable('BB_API_TOKEN','<token>','User')macOS/Linux: add export BB_EMAIL=... / export BB_API_TOKEN=... to your
shell profile.
2. Clone and install
git clone <REPO_URL> bitbucket-mcp
cd bitbucket-mcp
npm install3. Register with Claude Code
Option A — user scope (recommended; available in every project):
claude mcp add bitbucket --scope user -- node /absolute/path/to/bitbucket-mcp/server.jsThe server inherits BB_EMAIL/BB_API_TOKEN from your environment.
Option B — a single project: copy the bitbucket block from
mcp-config.example.json into that project's
.mcp.json, replacing the path. (Add .mcp.json to that repo's .gitignore if
you don't want it committed.)
Restart Claude Code; approve the bitbucket server when prompted.
Configuration (env)
Var | Default | Notes |
| — | required |
| — | required |
| — | required; repo slug being reviewed |
|
| Bitbucket workspace |
| current working dir | local checkout used by |
get_diff fetches the PR source branch into refs/remotes/origin/bb-mcp-tmp
and diffs three-dot against the PR's destination.commit.hash. It runs git in
BB_REPO_PATH, so that must be a local clone of the repo being reviewed.
Smoke test
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"1.0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
| node server.jsShould list the five tools.
Note on write tools
post_comment and approve mutate the PR. The intended workflow is to draft
content, get explicit human approval, then call the write tool — not to post
automatically.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/sravanthi-mallikarjuna/bitbucket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server