bb-mcp-server
Provides tools for managing Bitbucket Cloud pull requests, including listing, fetching, creating, updating, merging, declining, approving, and retrieving diffs and diffstats, as well as managing pull request comments and descriptions.
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., "@bb-mcp-serverShow me the open pull requests in our Bitbucket 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.
bb-mcp-server
An MCP server for Bitbucket Cloud, giving MCP clients (Claude Code, Claude Desktop, etc.) tools to read and manage pull requests, their comments, and their descriptions.
Atlassian has announced an official Bitbucket MCP server; at the time this was written it wasn't yet available, so this fills the gap with the same underlying REST API.
Features
Pull requests — list, get, create, update, merge, decline, approve/unapprove, diff, diffstat
Comments — list, get, create (general, inline, or as a reply), update, delete
Descriptions — focused get/update tools that touch only the description field
See Tools below for the full list.
Related MCP server: Bitbucket MCP
Requirements
Node.js >= 18.17
A Bitbucket Cloud account with an Atlassian API token
Setup
npm install
npm run buildConfigure credentials via environment variables (see .env.example):
Variable | Required | Description |
| yes | Atlassian account email, used with the API token for Basic Auth. |
| yes | API token from id.atlassian.com. |
| no | Default workspace slug, so tools can omit |
| no | Default repository slug, so tools can omit |
| no | API base URL override. Defaults to |
Register with an MCP client
Example for Claude Code (claude mcp add) or a client's mcp.json:
{
"mcpServers": {
"bitbucket": {
"command": "node",
"args": ["/absolute/path/to/bb-mcp-server/dist/index.js"],
"env": {
"BITBUCKET_EMAIL": "you@example.com",
"BITBUCKET_API_TOKEN": "your-api-token",
"BITBUCKET_WORKSPACE": "my-workspace",
"BITBUCKET_REPO_SLUG": "my-repo"
}
}
}
}BITBUCKET_WORKSPACE and BITBUCKET_REPO_SLUG are optional — omit them to require every tool
call to specify workspace/repoSlug explicitly, which is useful if the client should be able to
work across multiple repositories.
Try it with the MCP Inspector
npm run inspectorTools
All tools accept optional workspace / repoSlug arguments that fall back to
BITBUCKET_WORKSPACE / BITBUCKET_REPO_SLUG when omitted.
Pull requests
Tool | Description |
| List PRs, filterable by state or a Bitbucket query string. |
| Fetch full details of one PR. |
| Open a new PR. |
| Update title, description, reviewers, and/or destination. |
| Merge an open PR. |
| Decline an open PR. |
| Approve a PR as the authenticated user. |
| Remove the authenticated user's approval. |
| Fetch the unified diff as raw text. |
| Fetch a per-file change summary. |
Comments
Tool | Description |
| List all (non-deleted) comments on a PR. |
| Fetch a single comment. |
| Add a comment — general, inline (via |
| Edit a comment's body. |
| Delete a comment. |
Descriptions
Tool | Description |
| Read just a PR's description. |
| Replace just a PR's description, without touching other fields. |
Development
npm run dev # run the server directly with tsx (no build step)
npm run typecheck # tsc --noEmit
npm run lint # eslint
npm run format # prettier --write
npm test # vitest
npm run build # compile to dist/Architecture
src/
config.ts # env var loading/validation (zod)
bitbucket/
client.ts # typed Bitbucket REST API v2.0 client (auth, pagination, errors)
errors.ts # BitbucketApiError
types.ts # Bitbucket API response shapes
tools/
shared.ts # zod param helpers, workspace/repo resolution, error wrapping
pullRequests.ts # bb_* PR tools
comments.ts # bb_* comment tools
descriptions.ts # bb_* description tools
index.ts # registerAllTools
server.ts # builds the McpServer and registers tools
index.ts # stdio entrypointAuthentication notes
This server authenticates with HTTP Basic Auth using your Atlassian account email and an API token — the auth method Atlassian currently recommends for Bitbucket Cloud (app passwords are being phased out). The token only needs the Pull Requests scope for the operations this server performs.
License
MIT
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 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.Last updated194,43424MIT
- Alicense-qualityCmaintenanceAn MCP server for Bitbucket Cloud that enables managing pull requests, branches, and repositories in natural language from any MCP-capable client.Last updated1114MIT
- Flicense-qualityCmaintenanceAn MCP server for Bitbucket Cloud, covering pull requests, pull request comments, and pipelines.Last updated
- 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.Last updated14MIT
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
MCP server for Appcircle mobile CI/CD platform.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/donchoko/bb-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server