Bitbucket Cloud MCP

Bitbucket Cloud MCP

site icon
2025.03.29 0
JavaScriptPull Request 管理Bitbucket Cloud 集成交流协作
Bitbucket Cloud MCP 服务器是一个基于 Model Context Protocol (MCP) 的服务,专门用于管理 Bitbucket Cloud 的 Pull Request。该服务器提供只读工具,通过 MCP 协议与 Bitbucket Cloud API 进行交互,主要用于获取 Pull Request 的详细信息和差异内容。
View on GitHub

Overview

基本能力

产品定位

Bitbucket Cloud MCP 服务器是一个用于管理 Bitbucket Cloud Pull Request 的工具,通过 MCP 协议提供只读访问功能。

核心功能

  1. 获取 Pull Request 详细信息 (get_bb_pull_request):
  2. 参数: workspace (Bitbucket 工作区), repo_slug (仓库 slug), pull_request_id (Pull Request ID)
  3. 获取 Pull Request 差异内容 (get_bb_diff):
  4. 参数: workspace, repo_slug, pull_request_id

适用场景

  • 开发团队需要自动化获取 Pull Request 信息
  • 集成 Bitbucket Cloud 数据到其他工具或工作流中
  • AI 助手通过 MCP 协议访问 Bitbucket Cloud 数据

工具列表

  1. get_bb_pull_request: 获取特定 Pull Request 的详细信息。
  2. get_bb_diff: 获取 Pull Request 的差异内容。

常见问题解答

  • 如何配置 Bitbucket Cloud 访问令牌?
  • 需要在环境变量中设置 BITBUCKET_TOKEN,并确保令牌具有仓库和 Pull Request 的读取权限。
  • 如何设置默认工作区?
  • 可以通过环境变量 BITBUCKET_WORKSPACE 设置默认工作区。

使用教程

使用依赖

  • Node.js >= 18

安装教程

npm install
npm run build

调试方式

  1. 复制 .env.example.env
  2. .env 中设置 Bitbucket Cloud 令牌
  3. 运行开发服务器
npm start
  1. 运行测试
npm test

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。