
Bitbucket Mcp Server
io.github.droplinkperformance由 GitHub 帳號 droplinkperformance 發布v1.2.0更新於 Oct 24, 2026
Provider-agnostic, AI-review-first MCP server for Bitbucket Cloud.
概覽
針對 Bitbucket Cloud 的 MCP 伺服器,主打 AI 程式碼審查,並支援拉取請求的查詢、建立、差異與留言操作。
- 可以做什麼
- 查詢目前驗證的 Bitbucket 使用者,並依狀態或關鍵字列出、取得拉取請求
- 建立拉取請求,修改既有拉取請求的標題或描述
- 讀取拉取請求的原始統一差異、變更檔案與行數統計、留言內容
- 在拉取請求上新增留言,可選擇行內留言
- 對拉取請求執行 AI 程式碼審查,自動分塊處理大型 PR 並回傳標準審查結果
- 適用情境
- 適合想讓助理直接審查 Bitbucket Cloud 拉取請求、整理差異與變更檔案,或草擬並張貼審查意見的情境。也適用於在 Bitbucket 上進行基本 PR 建立與編輯的團隊。
- 執行需求
- 以 npm 套件形式透過 npx 在本機執行,需要 Node.js 23 以上版本。需在 BITBUCKET_ACCESS_TOKEN 提供 Bitbucket 憑證,使用 API token 時還需 BITBUCKET_EMAIL;OAuth 方式則改用用戶端 ID 與密鑰。AI 審查功能需要設定 LLM 供應商及其金鑰,例如 OPENAI_API_KEY。需要連線至 Bitbucket Cloud 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Bitbucket Mcp Server,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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
來源:README.md,提交 e695c88
工具
0版本歷史
1- v1.2.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分