
Bitbucket Mcp Server
io.github.droplinkperformancePublished by GitHub account droplinkperformancev1.2.0Updated Oct 24, 2026
Provider-agnostic, AI-review-first MCP server for Bitbucket Cloud.
Overview
Bitbucket Cloud MCP server focused on AI-powered pull request review, plus PR listing, creation, diffs, files and comments.
- What you can do
- Identify the authenticated Bitbucket user and list or fetch pull requests, filtered by state or query
- Open pull requests and edit the title or description of existing ones
- Read a PR's raw unified diff, changed files with line stats, and its comments
- Post comments on a pull request, optionally inline
- Run an AI code review of a pull request that chunks large PRs and returns a standard review result
- When to use it
- Useful when you want an assistant to review Bitbucket Cloud pull requests, summarize diffs and changed files, or draft and post review comments without leaving the chat. It also covers basic PR creation and editing for teams working in Bitbucket.
- Requirements
- Runs locally as an npm package via npx, requiring Node.js 23 or newer. Needs a Bitbucket credential in BITBUCKET_ACCESS_TOKEN, plus BITBUCKET_EMAIL for API tokens; OAuth setups use client ID and secret instead. The AI review tool needs an LLM provider and its key, such as OPENAI_API_KEY. Network access to Bitbucket Cloud.
Installation
In SourceWeft
- Open Bitbucket Mcp Server in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
@droplinkperformance/bitbucket-mcp-server
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.
Features (Phase 1)
- Dual transports: stdio (Cursor / Claude Desktop) and Streamable HTTP (Node
http, for remote/production). - Auto-discovered tools via a
ToolRegistry— no manual registration. - Explicit
BitbucketContext(workspace+ optionalrepository) on every tool — multi-workspace ready. - Resilient
BitbucketClient: auth injection, auto-pagination, retry/backoff, rate-limit handling, caching, secret masking. - Two auth strategies: OAuth 2.0 (Authorization Code, with rotating refresh-token persistence) and Bearer token.
- AI code review (
analyze_pull_request) backed by aCodeReviewAgentthat chunks large PRs and returns a standardReviewResult. - Pluggable LLM provider (OpenAI / Anthropic / Gemini / Bedrock), cache (memory / Redis), and token store (file / memory / Redis).
Tools
All tool inputs accept workspace (optional if BITBUCKET_DEFAULT_WORKSPACE is set) and, where applicable, repository.
Architecture
Flow: tool -> use-case -> (agent | repository contract) -> repositories/bitbucket -> BitbucketClient. Agents may also use the LlmProvider and EventBus. Tools never contain business logic.
Requirements
- Node.js 23+
Install
Published as @droplinkperformance/bitbucket-mcp-server.
From source:
Release
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:
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 waits until that version is visible on the npm registry, then publishes metadata to the MCP Registry as io.github.droplinkperformance/bitbucket-mcp-server (OIDC, no extra secret). To republish MCP metadata for the current package.json version without cutting a new release, run the workflow manually with Publish mcp only. github.com/mcp syncs from that registry; if the server does not appear, email [email protected].
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.
Configuration
Copy .env.example to .env and fill in values. Load it with Node's built-in flag:
Key variables:
Authentication
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).
LLM provider
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.
Running
stdio
Streamable HTTP
MCP Inspector
Cursor
~/.cursor/mcp.json (or project .cursor/mcp.json):
Claude Desktop
claude_desktop_config.json:
Development
Roadmap
- Phase 1 (this release): auth, abstractions,
BitbucketClient, tool auto-discovery, PR tools,analyze_pull_request. - Phase 2: Pipelines + full-text paginated logs,
pipeline-investigatoragent,auto_review_pull_request(dry-run / publish inline comments). - Phase 3: Remaining CRUD — repositories, commits, branches, tags, issues, workspaces, members, search.
- Phase 4:
analyze_dotnet_pull_request(dotnet-review agent), advanced agents, automation workflows. - Phase 5: Docker, Compose, Helm, production deploy guide.
License
MIT
Source: README.md at commit e695c88
Tools
0Version history
1- v1.2.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts