Skip to main content
Glama

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:bitbucketread:pullrequest:bitbucketread:pipeline:bitbucketread:user:bitbucket)。如需写入,请添加相应的 write:*

Related MCP server: Bitbucket Cloud MCP Server

安装

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_USER_EMAIL

Atlassian 账户的电子邮件

ATLASSIAN_API_TOKEN

作用域 API 令牌

BITBUCKET_DEFAULT_WORKSPACE

默认工作区(由 bb_clone 使用)

别名:BITBUCKET_USERNAMEBITBUCKET_API_TOKEN

工具

/2.0 前缀会自动添加。路径以 / 开头,例如 /workspaces

工具

用途

bb_get

读取(PR、流水线、日志、文件)

bb_post

创建(PR、评论、合并)

bb_put

完全替换资源

bb_patch

部分更新

bb_delete

删除 / 拒绝 PR

bb_clone

git clone(先 SSH,后 HTTPS)

公共参数:path,可选 queryParamsjq(JMESPath)、outputFormattoonjson)。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

  • 日志和错误不会输出令牌。

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Facilitates interaction with Bitbucket Server for pull request management using the MCP protocol, supporting operations such as creating, merging, commenting, and reviewing pull requests.
    15
    66
    Apache 2.0
  • A
    license
    B
    quality
    C
    maintenance
    Enables interaction with Bitbucket Cloud through 25+ tools for managing repositories, pull requests, branches, commits, issues, pipelines, and code search with OAuth 2.0 authentication.
    34
    13
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    An MCP server that provides tools for interacting with the Bitbucket API, supporting both Bitbucket Cloud and Bitbucket Server, enabling pull request, branch, file, code review, and search operations.
    19
    5,234
    MIT
  • A
    license
    C
    quality
    B
    maintenance
    MCP server for integrating with Bitbucket Cloud and Server APIs, enabling AI assistants to interact with repositories, pull requests, pipelines, and more.
    59
    54
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Confluence MCP — wraps the Confluence Cloud REST API v2 (OAuth)

  • GitLab MCP — wraps the GitLab REST API v4 (BYO API key)

  • A MCP server built for developers enabling Git based project management with project and personal…

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/genkis/mcp-bitbucket'

If you have feedback or need assistance with the MCP directory API, please join our Discord server