bitbucket-mcp
Provides tools to interact with Bitbucket Cloud repositories and pull requests, including listing repositories, branches, pull requests, creating and updating pull requests, viewing diffs, comments, activity, and comparing branches.
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-mcplist my 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
An MCP (Model Context Protocol) server that exposes Bitbucket Cloud repository and pull request data as tools consumable by any MCP-compatible client (Claude, Cursor, etc.).
This is a port of the original Go stdio server (bradlycarpenter/bitbucket-mcp) to a Hono app running on Cloudflare Workers, built with Effect.
How it works
The worker serves the MCP streamable HTTP transport at POST /:workspace/mcp via @hono/mcp.
It is fully stateless and stores no credentials of its own: each caller creates their own
Bitbucket API token, sends it on every request, and the worker relays the call to the Bitbucket
API on their behalf. Every action is therefore attributed to the caller's own Bitbucket account.
Everything below the transport is Effect:
src/bitbucket/config.ts—BitbucketConfigservice, built per request from the caller's workspace andAuthorizationheadersrc/bitbucket/client.ts—Bitbucketservice wrapping the Bitbucket Cloud REST API onHttpClient, returning typed errorssrc/bitbucket/domain.ts—Schemadefinitions used to decode (and trim) API responsessrc/mcp/tool.ts— tool definitions whose parameters areSchemas; JSON Schema for the MCP tool list is derived from themsrc/index.ts— aManagedRuntimeper request bridges Effect into the Hono handler
Related MCP server: BitBucket-MCP-To-Review-PRs
Tools
Tool | Description |
| List all repositories in the configured workspace |
| List branches for a repository |
| List pull requests, optionally filtered by state |
| Get a specific pull request by ID |
| Create a new pull request |
| Update a pull request title and/or description |
| List commits on a pull request |
| List all comments on a pull request |
| Full activity stream for a pull request |
| Unified diff for a pull request |
| File-level change summary for a pull request |
| Unified diff between two branches |
| File-level diffstat between two branches |
| Commits in source branch not in destination branch |
Setup page
GET / serves a setup page: enter your workspace, email and API token, and it generates the
claude mcp add command (and an equivalent JSON config) ready to copy. It also lists every tool
with its arguments, rendered from the same tools array the server registers, so it cannot drift.
The form is inert — there is no submit handler and no fetch. The base64 encoding happens in
btoa in the browser, so the token only ever leaves the machine on the MCP requests your client
makes afterwards.
Request contract
There is nothing to configure on the worker — no environment variables, no secrets. Every request carries its own identity:
URL |
|
Header |
|
The Authorization header is forwarded verbatim to api.bitbucket.org; Bearer is accepted too
if you are using an OAuth access token. A request without credentials gets a 401, and a
workspace slug outside [A-Za-z0-9][A-Za-z0-9_.-]* gets a 400.
Because callers bring their own tokens, an unauthenticated request can do nothing, and the worker never sees more access than the token it was handed. Do not add request logging that captures headers — the credential is on every call.
Creating an API token
Go to https://id.atlassian.com/manage-profile/security/api-tokens
Click Create API token, label it, and copy the token — it is not shown again
Base64-encode it together with your Atlassian account email:
printf 'you@yourcompany.com:<api-token>' | base64Required scopes:
Scope | Purpose |
| List repositories and branches |
| Read pull requests, commits, diffs, comments, and activity |
| Create and update pull requests |
Local development
pnpm install
pnpm devThe endpoint is http://localhost:5173/<workspace-slug>/mcp.
Deploying
pnpm deployMCP client configuration
{
"mcpServers": {
"bitbucket": {
"type": "http",
"url": "https://<your-worker>.workers.dev/<workspace-slug>/mcp",
"headers": {
"Authorization": "Basic <base64 of email:api-token>"
}
}
}
}Or with the Claude Code CLI:
claude mcp add --transport http bitbucket \
https://<your-worker>.workers.dev/<workspace-slug>/mcp \
--header "Authorization: Basic <base64 of email:api-token>"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.
Related MCP Servers
- Alicense-qualityDmaintenanceAn 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.Last updated4,643MIT
- Alicense-qualityDmaintenanceA read-only MCP server for the Bitbucket Cloud REST API v2.0 that enables AI assistants to browse workspaces, repositories, and review pull requests.Last updated45ISC
- Alicense-qualityAmaintenanceA read-only MCP server that provides secure access to Bitbucket repositories, pull requests, issues, and more.Last updated1023MIT
- Alicense-qualityCmaintenanceMCP server for Bitbucket Cloud that exposes Pull Request operations as tools for Claude and other MCP clients.Last updated45ISC
Related MCP Connectors
Confluence MCP — wraps the Confluence Cloud REST API v2 (OAuth)
Docker Hub MCP — wraps the Docker Hub v2 API (free, no auth required for public data)
A MCP server built for developers enabling Git based project management with project and personal…
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/bradlycarpenter/bitbucket-mcp-cf'
If you have feedback or need assistance with the MCP directory API, please join our Discord server