bitbucket
mcp-bitbucket
用于 Bitbucket Cloud REST API 2.0 的 MCP(stdio)服务器。可与 Cursor 配合使用:拉取请求、流水线、日志、克隆。
工具与典型的 bb_get / bb_post / bb_put / bb_patch / bb_delete / bb_clone 集合一致。
要求
Node.js 18+
Atlassian 作用域 API 令牌(应用密码不起作用)
令牌:id.atlassian.com → API tokens。
有用的范围:读取仓库、拉取请求、流水线和用户(read:repository:bitbucket、read:pullrequest:bitbucket、read:pipeline:bitbucket、read:user:bitbucket)。如需写入,请添加相应的 write:*。
Related MCP server: bitbucket-mcp
安装
git clone https://github.com/genkis/mcp-bitbucket.git
cd mcp-bitbucket
npm install将 .env.example 复制为 .env 并在本地填写值。不要提交 .env 文件。
Cursor(~/.cursor/mcp.json)
仅将令牌和电子邮件保存在 Cursor 的本地配置中,不要保存在此仓库中。
{
"mcpServers": {
"bitbucket": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/mcp-bitbucket/index.js"],
"env": {
"ATLASSIAN_USER_EMAIL": "you@example.com",
"ATLASSIAN_API_TOKEN": "your-scoped-api-token",
"BITBUCKET_DEFAULT_WORKSPACE": "your-workspace-slug"
}
}
}
}更改后,在 Cursor 中重新加载 MCP 服务器。
变量:
变量 | 说明 |
| Atlassian 账户的电子邮件 |
| 作用域 API 令牌 |
| 默认工作区(由 |
别名:BITBUCKET_USERNAME、BITBUCKET_API_TOKEN。
工具
/2.0 前缀会自动添加。路径以 / 开头,例如 /workspaces。
工具 | 用途 |
| 读取(PR、流水线、日志、文件) |
| 创建(PR、评论、合并) |
| 完全替换资源 |
| 部分更新 |
| 删除 / 拒绝 PR |
|
|
公共参数:path,可选 queryParams、jq(JMESPath)、outputFormat(toon 或 json)。bb_post / bb_put / bb_patch 需要 body。
路径示例:
/workspaces/repositories/{workspace}/{repo}/pullrequests/{id}/repositories/{workspace}/{repo}/pullrequests/{id}/diff/repositories/{workspace}/{repo}/pipelines/?pagelen=50&sort=-created_on/repositories/{workspace}/{repo}/pipelines/{uuid}/steps/{stepUuid}/log
在处理列表时,建议始终使用 jq 过滤器,以免将整个 JSON 拉入模型。
安全
不要提交令牌、
.env或包含机密的mcp.json。此服务器仅使用 Basic Auth(电子邮件 + 令牌)将请求转发到
api.bitbucket.org。日志和错误不会输出令牌。
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Pipefork API projects, drafts, connections, secrets, and deployments through MCP.
Confluence MCP — wraps the Confluence Cloud REST API v2 (OAuth)
GitLab MCP — wraps the GitLab REST API v4 (BYO API key)
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- FlicenseBqualityCmaintenanceEnables interaction with a Bitbucket Server/Data Center instance, exposing its REST v1.0 API as MCP tools to manage projects, repositories, branches, pull requests, comments, diffs, commits, files, search, and build status.41-
- AlicenseAqualityCmaintenanceEnables MCP clients to browse and interact with Bitbucket Cloud, exposing workspace, repository, branch, and pull request operations as tools.1812 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Bitbucket workspaces, repositories, branches, commits, and pull requests through MCP tools for listing, retrieving, commenting, searching, and managing version control workflows. It supports generic GET, POST, PUT, PATCH, DELETE, and clone operations against Bitbucket Cloud REST API endpoints.MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Bitbucket Cloud workspaces, repositories, pull requests, commits, branches, diffs, comments, issues, pipelines, and deployments through MCP tools for listing, reading, creating, updating, deleting, searching, commenting, and cloning via the Bitbucket API.MIT