Bitbucket MCP
Bitbucket MCP
一个模型上下文协议 (MCP) 服务器,用于与 Bitbucket Cloud 和服务器 API 集成。此 MCP 服务器使 Cursor 等 AI 助手能够与您的 Bitbucket 存储库、拉取请求和其他资源进行交互。
安全第一
这是一个安全可靠的软件包——不使用任何 DELETE 操作,因此不存在数据丢失的风险。每个拉取请求都使用 CodeQL 进行分析,以确保代码安全。
Related MCP server: Bitbucket MCP Server
概述
查看官方 npm 软件包。该服务器实现了模型上下文协议标准,为 AI 助手提供访问 Bitbucket 数据和操作的权限。它包含以下工具:
列出和检索存储库
获取存储库详细信息
获取拉取请求
还有更多...
安装
使用 NPX(推荐)
使用此 MCP 服务器的最简单方法是通过 NPX,它允许您无需全局安装即可运行它:
# Run with environment variables
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx -y bitbucket-mcp@latest手动安装
或者,您可以全局安装它或将其作为项目的一部分安装:
# Install globally
npm install -g bitbucket-mcp
# Or install in your project
npm install bitbucket-mcp然后运行它:
# If installed globally
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
bitbucket-mcp
# If installed in your project
BITBUCKET_URL="https://bitbucket.org/your-workspace" \
BITBUCKET_USERNAME="your-username" \
BITBUCKET_PASSWORD="your-app-password" \
npx bitbucket-mcp配置
环境变量
使用以下环境变量配置服务器:
多变的 | 描述 | 必需的 |
| Bitbucket 基本 URL(例如“ https://bitbucket.org/your-workspace ”) | 是的 |
| 您的 Bitbucket 用户名 | 是的* |
| 您的 Bitbucket 应用密码 | 是的* |
| 您的 Bitbucket 访问令牌(用户名/密码的替代) | 不 |
| 未指定时使用的默认工作区 | 不 |
* 必须提供BITBUCKET_TOKEN或BITBUCKET_USERNAME和BITBUCKET_PASSWORD 。
创建 Bitbucket 应用程序密码
登录您的 Bitbucket 帐户
前往“个人设置”>“应用密码”
使用以下权限创建新的应用密码:
存储库:阅读
拉取请求:读、写
复制生成的密码并将其用作
BITBUCKET_PASSWORD环境变量
与 Cursor 集成
要将此 MCP 服务器与 Cursor 集成:
打开游标
前往“设置”>“扩展程序”
点击“模型上下文协议”
添加新的 MCP 配置:
"bitbucket": {
"command": "npx",
"env": {
"BITBUCKET_URL": "https://bitbucket.org/your-workspace",
"BITBUCKET_USERNAME": "your-username",
"BITBUCKET_PASSWORD": "your-app-password"
},
"args": ["-y", "bitbucket-mcp@latest"]
}保存配置
使用 Cursor 中的“/bitbucket”命令访问 Bitbucket 存储库和拉取请求
使用带光标的本地构建
如果您正在本地开发并想要测试您的更改:
"bitbucket-local": {
"command": "node",
"env": {
"BITBUCKET_URL": "https://bitbucket.org/your-workspace",
"BITBUCKET_USERNAME": "your-username",
"BITBUCKET_PASSWORD": "your-app-password"
},
"args": ["/path/to/your/local/bitbucket-mcp/dist/index.js"]
}可用工具
此 MCP 服务器提供与 Bitbucket 仓库和拉取请求交互的工具。以下是可用操作的完整列表:
存储库操作
listRepositories
列出工作区中的存储库。
参数:
workspace(可选):Bitbucket 工作区名称limit(可选):返回的最大存储库数量
getRepository
获取特定存储库的详细信息。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slug
拉取请求操作
getPullRequests
获取存储库的拉取请求。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugstate(可选):拉取请求状态(OPEN,MERGED,DECLINED,SUPERSEDED)limit(可选):返回的最大拉取请求数量
createPullRequest
创建一个新的拉取请求。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugtitle:拉取请求标题description:拉取请求描述sourceBranch:源分支名称targetBranch:目标分支名称reviewers(可选):审阅者用户名列表
getPullRequest
获取特定拉取请求的详细信息。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
updatePullRequest
更新拉取请求。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID各种可选的更新参数(标题、描述等)
getPullRequestActivity
获取拉取请求的活动日志。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
approvePullRequest
批准拉取请求。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
unapprovePullRequest
从拉取请求中删除批准。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
declinePullRequest
拒绝拉取请求。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDmessage(可选):拒绝的原因
mergePullRequest
合并拉取请求。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDmessage(可选):合并提交消息strategy(可选):合并策略(merge-commit、squash、fast-forward)
requestChanges
请求对拉取请求进行更改。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
removeChangeRequest
从拉取请求中删除变更请求。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
拉取请求评论操作
getPullRequestComments
列出对拉取请求的评论。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
createPullRequestComment
对拉取请求创建评论。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDcontent:评论内容inline(可选):内联注释信息
getPullRequestComment
获取对拉取请求的特定评论。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDcomment_id:评论ID
updatePullRequestComment
更新拉取请求的评论。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDcomment_id:评论IDcontent:更新的评论内容
deletePullRequestComment
删除对拉取请求的评论。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDcomment_id:评论ID
resolveComment
解决拉取请求上的评论线程。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDcomment_id:评论ID
reopenComment
重新打开拉取请求中已解决的评论线程。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDcomment_id:评论ID
拉取请求差异操作
getPullRequestDiff
获取拉取请求的差异。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
getPullRequestDiffStat
获取拉取请求的差异统计信息。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
getPullRequestPatch
获取拉取请求的补丁。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
拉取请求任务操作
getPullRequestTasks
列出拉取请求上的任务。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
createPullRequestTask
根据拉取请求创建任务。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDcontent:任务内容comment(可选):与任务关联的评论IDpending(可选):任务是否处于待处理状态
getPullRequestTask
获取拉取请求上的特定任务。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDtask_id:任务ID
updatePullRequestTask
更新拉取请求上的任务。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDtask_id:任务IDcontent(可选):更新的任务内容state(可选):更新的任务状态
deletePullRequestTask
删除拉取请求上的任务。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 IDtask_id:任务ID
其他拉取请求操作
getPullRequestCommits
列出拉取请求的提交。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
getPullRequestStatuses
列出拉取请求的提交状态。
参数:
workspace:Bitbucket 工作区名称repo_slug:存储库 slugpull_request_id:拉取请求 ID
发展
先决条件
Node.js 18 或更高版本
npm 或 yarn
设置
# Clone the repository
git clone https://github.com/MatanYemini/bitbucket-mcp.git
cd bitbucket-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
链接
Available Tools
3 toolsgetPullRequestsD
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of pull requests to return | |
| repo_slug | Yes | Repository slug | |
| state | No | Pull request state | |
| workspace | Yes | Bitbucket workspace name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getRepositoryD
| Name | Required | Description | Default |
|---|---|---|---|
| repo_slug | Yes | Repository slug | |
| workspace | Yes | Bitbucket workspace name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
listRepositoriesD
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of repositories to return | |
| workspace | No | Bitbucket workspace name |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v1.0.0- First observed
getPullRequests - First observed
getRepository - First observed
listRepositories
TDQS
Each tool has a clearly distinct purpose: getPullRequests retrieves pull requests, getRepository fetches a specific repository, and listRepositories lists all repositories. There is no overlap or ambiguity between these operations.
The tools follow a consistent verb_noun pattern (getPullRequests, getRepository, listRepositories), but there is a minor deviation in verb choice between 'get' and 'list'. This is still highly readable and predictable.
With only 3 tools, the server feels thin for a Bitbucket integration, lacking essential operations like creating or updating repositories, managing pull requests (e.g., create, merge), or handling issues. The scope is incomplete for typical version control workflows.
The tool surface is severely incomplete for a Bitbucket server, missing core CRUD operations (e.g., create_repository, update_pull_request, delete_branch) and lifecycle management. Agents will face dead ends when trying to perform basic tasks like modifying repositories or pull requests.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
The Buildkite MCP server exposes Buildkite product data (pipelines, builds, jobs, and test data) to AI tools, editors, and agents through the Model Context Protocol. It provides capabilities including pipeline creation and management, build monitoring with specialized tools like 'wait_for_build', efficient log querying using Apache Parquet conversion and caching, and OAuth-based authentication for both read-write and read-only access to Buildkite's REST API.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables interaction with Bitbucket repositories through the Model Context Protocol, supporting both Bitbucket Cloud and Server with features for PR lifecycle management and code review.195,58928MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that integrates Cursor IDE with Bitbucket Cloud, allowing developers to fetch repository information and commit data directly from their Bitbucket workspace.15394MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Bitbucket Cloud repositories, pull requests, branches, commits, pipelines, issues, and webhooks through the Model Context Protocol.8670MIT
- AlicenseCqualityBmaintenanceMCP server for integrating with Bitbucket Cloud and Server APIs, enabling AI assistants to interact with repositories, pull requests, pipelines, and more.59373MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/MatanYemini/bitbucket-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server