Provider-agnostic, AI-review-first MCP server for Bitbucket Cloud.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Provider-agnostic, AI-review-first Model Context Protocol (MCP) server for Bitbucket Cloud.
The primary value of this server is AI-powered code review and pull request analysis, not CRUD against the Bitbucket API. Every major dependency (SCM access, cache, token storage, rate limiting, LLM, events) is hidden behind a provider-agnostic interface so the same business logic can later target GitHub / GitLab / Azure DevOps and OpenAI / Anthropic / Gemini / Bedrock without changes to use-cases, agents, or domain contracts.
Status: Phase 1. See Roadmap.
http, for remote/production).ToolRegistry β no manual registration.BitbucketContext (workspace + optional repository) on every tool β multi-workspace ready.BitbucketClient: auth injection, auto-pagination, retry/backoff, rate-limit handling, caching, secret masking.analyze_pull_request) backed by a CodeReviewAgent that chunks large PRs and returns a standard ReviewResult.| Tool | Description |
|---|---|
get_current_user | Authenticated user. |
list_pull_requests | List PRs (filter by state/query). |
get_pull_request | Fetch a PR by id. |
create_pull_request | Open a PR. |
get_pull_request_diff | Raw unified diff. |
get_pull_request_files | Changed files + line stats. |
get_pull_request_comments | PR comments. |
comment_pull_request | Add a (optionally inline) comment. |
analyze_pull_request | AI review returning a standard ReviewResult. |
All tool inputs accept workspace (optional if BITBUCKET_DEFAULT_WORKSPACE is set) and, where applicable, repository.
Flow: tool -> use-case -> (agent | repository contract) -> repositories/bitbucket -> BitbucketClient. Agents may also use the LlmProvider and EventBus. Tools never contain business logic.
Published as @droplinkperformance/bitbucket-mcp-server.
From source:
Merges to main run .github/workflows/release.yml: tests, build, then semantic-release. Version and npm publish happen only when the merge includes Conventional Commits:
| Commit | Bump |
|---|---|
fix: | patch |
feat: | minor |
BREAKING CHANGE / feat!: | major |
Other messages skip publish. The GitHub secret NPM_TOKEN (npm Automation token for the droplinkperformance org) is required.
After a successful npm release, the same workflow publishes metadata to the MCP Registry as io.github.droplinkperformance/bitbucket-mcp-server (OIDC, no extra secret). github.com/mcp syncs from that registry; if the server does not appear, email partnerships@github.com.
To stay on 0.x for the first release, tag the current commit (git tag v0.1.0 && git push origin v0.1.0) before the first conventional merge; otherwise semantic-release starts at 1.0.0.
Copy .env.example to .env and fill in values. Load it with Node's built-in flag:
Key variables:
| Variable | Default | Notes |
|---|---|---|
MCP_TRANSPORT | stdio | stdio or http. |
HTTP_HOST / HTTP_PORT | 0.0.0.0 / 3000 | HTTP transport bind. |
BITBUCKET_DEFAULT_WORKSPACE | β | Fallback when a tool omits workspace. |
BITBUCKET_ACCESS_TOKEN | β | API token (ATATTβ¦), app password, or OAuth access token |
BITBUCKET_EMAIL | β | Required with API tokens (ATATTβ¦) β your Atlassian account email |
BITBUCKET_CLIENT_ID / BITBUCKET_CLIENT_SECRET | β | Required for OAuth (when no access token). |
BITBUCKET_REFRESH_TOKEN | β | Optional seed for headless OAuth. |
TOKEN_STORE | file | file | memory | redis. |
CACHE_PROVIDER | memory | memory | redis. |
LLM_PROVIDER | openai | openai | anthropic | gemini | bedrock. |
MAX_FILES_PER_CHUNK / MAX_DIFF_LINES_PER_CHUNK | 50 / 5000 | Large-PR chunking thresholds. |
OTEL_ENABLED | false | No-op metrics unless enabled. |
Bearer (OAuth access token): set BITBUCKET_ACCESS_TOKEN only (non-ATATT tokens).
API token (recommended, ATATTβ¦): set BITBUCKET_ACCESS_TOKEN and BITBUCKET_EMAIL (your Atlassian account email from Bitbucket β Personal settings β Email aliases). API tokens use HTTP Basic auth, not Bearer.
App password (legacy, until June 2026): set BITBUCKET_ACCESS_TOKEN and BITBUCKET_USERNAME (your Bitbucket username).
OAuth 2.0 (Authorization Code): set BITBUCKET_CLIENT_ID / BITBUCKET_CLIENT_SECRET. Tokens are persisted by the configured TOKEN_STORE; Bitbucket rotates refresh tokens, and the server persists the new one on every refresh. For headless boot, provide a previously obtained BITBUCKET_REFRESH_TOKEN.
Bitbucket OAuth endpoints used: authorize https://bitbucket.org/site/oauth2/authorize, token https://bitbucket.org/site/oauth2/access_token. The authorize URL can be built from OAuthProvider.buildAuthorizeUrl() and the returned ?code= exchanged via OAuthProvider.loginWithCode(code).
Set LLM_PROVIDER and the matching key:
ioredis (Redis providers) and @aws-sdk/client-bedrock-runtime (Bedrock) are optional and loaded lazily β only needed when selected.
~/.cursor/mcp.json (or project .cursor/mcp.json):
claude_desktop_config.json:
BitbucketClient, tool auto-discovery, PR tools, analyze_pull_request.pipeline-investigator agent, auto_review_pull_request (dry-run / publish inline comments).analyze_dotnet_pull_request (dotnet-review agent), advanced agents, automation workflows.MIT
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/bitbucket-mcp-server)<a href="https://allmcps.com/mcp/bitbucket-mcp-server"><img src="https://allmcps.com/api/badge/bitbucket-mcp-server?style=directory" alt="Bitbucket MCP Server on AllMCPs" /></a>