LABSCO SUMMARY
Inline comments only land if you read the diff first.
The README is unusually direct about the failure mode: createInlineComment needs the exact file path as it appears in the diff, case-sensitive, and a line number from the new version that the PR actually touched. So the working sequence is always fetch the changes, then comment — which is also the sequence you want for a review that says anything useful. Note that API tokens are not app passwords; using the wrong one authenticates as nobody.
What it is
A Quarkus-based server for Bitbucket Cloud, focused on the pull request review loop: list PRs, read one in detail, get its diffstat and its actual changed lines, then comment — either on the PR or pinned to a line in the diff. It ships as Docker images, including a GraalVM native build, and offers stdio, SSE and HTTP Stream transports.
What you get
- Reading PRs:
findAllPullRequestfor a repository,findAPullRequestfor one by ID,findDiffStatForPullRequestfor change statistics,findListChangesInAPullRequestfor the added and removed lines - Commenting:
createCommentposts a Markdown comment,updateCommentedits one,findACommentandfindCommentListread them back with pagination createInlineCommentattaches a comment to a file and line number in the diff — the file path is case-sensitive and must match the diff exactly, and the line must be one the PR actually changed- A tool that returns the authenticated user's Bitbucket profile
- Three transports: stdio via the
subrutin/bitbucket-mcp-server:stdio-0.0.2image, or SSE atGET /mcp/sseand HTTP Stream atPOST /mcp/streamfromsubrutin/bitbucket-mcp-server:latest - A REST endpoint for listing repositories, and health endpoints, alongside the MCP surface
Requirements
A Bitbucket API token created at your account's API token page, with Repositories: Read and Pull requests: Read and Write. Three environment variables: BITBUCKET_EMAIL, BITBUCKET_API_TOKEN and BITBUCKET_WORKSPACE. The simplest setup is Docker — your client runs the stdio image directly with those variables passed in. For the SSE and HTTP transports the container listens on port 8080. HTTPS for SSE is not supported yet, so those transports are plain HTTP.
Setup effort
One command plus a key — docker pull subrutin/bitbucket-mcp-server:stdio-0.0.2, then supply credentials
USE CASES
Getting a review started on a PR you did not write
Fetch the PR and its changed lines, then have the model summarise what it does before you read it.
Leaving feedback on specific lines
Read the diff, identify the exact path and line, then attach the comment there rather than at the bottom.
Seeing what is open across a repository
List the pull requests and have each one summarised in a sentence.
Following an existing discussion
Page through the comments on a PR and pull up individual ones by ID.
10 tools
Listed in project code.
findAPullRequest
findDiffStatForPullRequest
findListChangesInAPullRequest
createComment
updateComment
createInlineComment
findAComment
findCommentList
Fetch user profile
Returns the authenticated user's Bitbucket profile information.
BEFORE YOU INSTALL
What to know first
Tools you get
10 tools registered in the project's code.
Requires
- docker on PATH
- BITBUCKET_API_TOKEN in your environment
- BITBUCKET_EMAIL in your environment
- BITBUCKET_WORKSPACE in your environment
INSTALLATION
Connect your client
Server setup
docker pull subrutin/bitbucket-mcp-server:stdio-0.0.2MCP Clients
Claude Desktop, Cursor
{
"mcpServers": {
"bitbucket": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"BITBUCKET_EMAIL=<YOUR_BITBUCKET_EMAIL>",
"-e",
"BITBUCKET_API_TOKEN=<YOUR_BITBUCKET_API_TOKEN>",
"-e",
"BITBUCKET_WORKSPACE=<YOUR_BITBUCKET_WORKSPACE>",
"subrutin/bitbucket-mcp-server:stdio-0.0.2"
]
}
}
}VS Code
{
"servers": {
"bitbucket": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"BITBUCKET_EMAIL=<YOUR_BITBUCKET_EMAIL>",
"-e",
"BITBUCKET_API_TOKEN=<YOUR_BITBUCKET_API_TOKEN>",
"-e",
"BITBUCKET_WORKSPACE=<YOUR_BITBUCKET_WORKSPACE>",
"subrutin/bitbucket-mcp-server:stdio-0.0.2"
]
}
}
}Cherry Studio
Start the server using Docker
The SSE transport requires the server to be running and accessible via HTTP.
docker run -d \
--name bitbucket-mcp \
-p 8080:8080 \
-e BITBUCKET_EMAIL=<YOUR_BITBUCKET_EMAIL> \
-e BITBUCKET_API_TOKEN=<YOUR_BITBUCKET_API_TOKEN> \
-e BITBUCKET_WORKSPACE=<YOUR_BITBUCKET_WORKSPACE> \
subrutin/bitbucket-mcp-server:latestGo to Settings, select MCP, click Create
Type: sse
URL: http://localhost:8080/mcp/sse
Name: Bitbucket MCP