
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 分