Bitbucket 服务器 MCP
用于管理 Bitbucket Server 拉取请求的 MCP(模型上下文协议)服务器。该服务器提供通过 MCP 协议与 Bitbucket Server API 交互的工具和资源。
要求
Node.js >= 16
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Bitbucket Server:
手动安装
建造
特征
该服务器为 Bitbucket Server 集成提供了以下工具:
create_pull_request
创建一个新的拉取请求。
参数:
project:Bitbucket 项目密钥(如果设置,则默认为 BITBUCKET_DEFAULT_PROJECT)repository(必需):存储库 slugtitle(必填):PR 标题description:PR 描述sourceBranch(必需):源分支名称targetBranch(必填):目标分支名称reviewers:审阅者用户名数组
get_pull_request
检索有关特定拉取请求的详细信息。
参数:
project:Bitbucket 项目密钥(如果设置,则默认为 BITBUCKET_DEFAULT_PROJECT)repository(必需):存储库 slugprId(必填):拉取请求 ID
merge_pull_request
合并拉取请求。
参数:
project:Bitbucket 项目密钥(如果设置,则默认为 BITBUCKET_DEFAULT_PROJECT)repository(必需):存储库 slugprId(必填):拉取请求 IDmessage:合并提交消息strategy:以下之一:merge-commit(默认)squashfast-forward
decline_pull_request
拒绝拉取请求。
参数:
project:Bitbucket 项目密钥(如果设置,则默认为 BITBUCKET_DEFAULT_PROJECT)repository(必需):存储库 slugprId(必填):拉取请求 IDmessage:拒绝的原因
add_comment
向拉取请求添加评论。
参数:
project:Bitbucket 项目密钥(如果设置,则默认为 BITBUCKET_DEFAULT_PROJECT)repository(必需):存储库 slugprId(必填):拉取请求 IDtext(必填):评论文本parentId:回复的父评论 ID
get_diff
检索拉取请求的差异。
参数:
project:Bitbucket 项目密钥(如果设置,则默认为 BITBUCKET_DEFAULT_PROJECT)repository(必需):存储库 slugprId(必填):拉取请求 IDcontextLines:上下文行数(默认值:10)
get_reviews
获取拉取请求的审核历史记录,包括批准和审核。
参数:
project:Bitbucket 项目密钥(如果设置,则默认为 BITBUCKET_DEFAULT_PROJECT)repository(必需):存储库 slugprId(必填):拉取请求 ID
依赖项
@modelcontextprotocol/sdk- 用于 MCP 协议实现的 SDKaxios- 用于 API 请求的 HTTP 客户端winston- 日志框架
配置
该服务器需要在 VSCode MCP 设置文件中进行配置。以下是示例配置:
环境变量
BITBUCKET_URL(必需):Bitbucket Server 实例的基本 URL身份验证(需要以下其中一项):
BITBUCKET_TOKEN:个人访问令牌BITBUCKET_USERNAME和BITBUCKET_PASSWORD:基本身份验证凭据
BITBUCKET_DEFAULT_PROJECT:工具调用中未指定时使用的默认项目密钥
日志记录
服务器使用 Winston 将所有操作记录到bitbucket.log以进行调试和监控。
Related MCP Servers
- Asecurity-licenseAqualityAn MCP server that fetches GitHub Pull Request comments with file paths, line ranges, and replies using a GitHub personal access token.Last updated -13MIT License
- -security-license-qualityProvides tools for interacting with GitHub's API through the MCP protocol, allowing users to create repositories, push content, and retrieve user information.Last updated -
- Asecurity-licenseAqualityAn 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.Last updated -1982011MIT License
- -security-license-qualityAn MCP server that enables Git repository operations and GitHub PR workflows, allowing users to manage repositories, create branches, commit changes, and create pull requests through natural language.Last updated -1