mcp-bitbucket
Bitbucket MCP 服务器
Bitbucket MCP 是一个高性能、无状态的服务器,它将 Bitbucket Cloud API 的全部功能引入到您的自动化、CI/CD 流水线、机器人和基于 Rust 的集成中。Bitbucket MCP 使用 Rust 构建,兼具速度与可靠性,让您可以轻松安全地访问和管理 Bitbucket 存储库、拉取请求、议题等——无论您是在构建开发工具、工作流自动化还是 DevOps 解决方案。
为什么选择 Bitbucket MCP?
无缝 Bitbucket API 集成:使用现代 Rust 代码库访问所有主要的 Bitbucket Cloud 功能——包括存储库、拉取请求、议题、分支、流水线、部署等。
自动化与机器人的理想选择:将 Bitbucket 暴露为模型上下文协议 (MCP) 工具,非常适合机器人、CI/CD 和工作流自动化。
默认安全:仅使用
rustls进行 TLS 通信(无需处理 OpenSSL 的麻烦),并支持 Bitbucket API 令牌身份验证。支持 Docker:通过我们在 GHCR 上预构建的 Docker 镜像部署到任何地方,或者在几分钟内完成本地构建。
久经考验:全面的测试套件涵盖了所有公共 API 方法,确保了集成的可靠性。
Related MCP server: Bitbucket MCP Server
快速入门:Rust 中的 Bitbucket API 自动化
1. 使用 GHCR 中的预构建 Docker 镜像
docker run -e BITBUCKET_API_USERNAME=<your_atlassian_email> -e BITBUCKET_API_TOKEN=<your_api_token> -p 8080:8080 ghcr.io/ibrahimogod/bitbucket-mcp:latest在此处查找所有标签/版本:GitHub Releases
查看 GHCR 软件包
2. 本地构建并运行 (Rust)
git clone https://github.com/Ibrahimogod/bitbucket-mcp.git
cd bitbucket-mcp
cargo build --release
$env:BITBUCKET_API_USERNAME="<your_atlassian_email>"
$env:BITBUCKET_API_TOKEN="<your_api_token>"
cargo run --release --bin bitbucket_stdio支持的 Bitbucket 操作 (通过 MCP)
列出并管理存储库、工作区、拉取请求、议题、分支、标签、提交
获取存储库、工作区和用户详情
自动化拉取请求工作流:创建、更新、批准、拒绝、合并、评论和管理任务
与 Bitbucket 流水线、部署、下载、Webhook、代码片段和项目集成
查看
src/common/bitbucket.rs获取完整 API
Bitbucket 身份验证
创建 Bitbucket API 令牌 并设置适当的范围(例如
repository:read,pullrequest:read)。将
BITBUCKET_API_USERNAME设置为您的 Atlassian 电子邮件地址。将
BITBUCKET_API_TOKEN设置为您的 API 令牌。
项目结构
src/common/bitbucket.rs— Bitbucket API 集成逻辑src/bitbucket_stdio.rs— 服务器入口点Cargo.toml— 依赖配置(仅使用rustls)Dockerfile— 多阶段构建,无 OpenSSLtests/bitbucket.rs— 所有公共 API 方法的完整测试套件
许可证
MIT
Bitbucket MCP 是使用 Rust、机器人或 CI/CD 自动化 Bitbucket Cloud 的最佳方式。为仓库加星并立即尝试吧!
示例:用于 Docker 集成的 VS Code MCP 设置
您可以配置 VS Code MCP 扩展,使其使用 Docker 自动启动 Bitbucket MCP 服务器。将以下内容添加到您的 .vscode/settings.json(或您的全局 MCP 设置文件)中:
{
"mcp": {
"servers": {
"bitbucket-mcp-docker": {
"command": "docker",
"args": [
"run",
"-i",
"-e", "BITBUCKET_API_USERNAME",
"-e", "BITBUCKET_API_TOKEN",
"-e", "RUST_BACKTRACE",
"ghcr.io/ibrahimogod/bitbucket-mcp:latest"
],
"env": {
"BITBUCKET_API_USERNAME": "<your_atlassian_email>",
"BITBUCKET_API_TOKEN": "<your_api_token>",
"RUST_BACKTRACE": "1"
}
}
}
}
}将 <your_atlassian_email> 和 <your_api_token> 替换为您的 Bitbucket 凭据。如果需要,您也可以指定特定的镜像标签而不是 latest。
此配置允许 MCP 扩展在您于 VS Code 中使用 Bitbucket 工具时,自动在 Docker 中启动 Bitbucket MCP 服务器。
示例:用于 Docker 集成的 Cursor MCP 设置
您可以配置 Cursor,使其使用 Docker 自动启动 Bitbucket MCP 服务器。将以下内容添加到您的 .cursor/mcp.json(针对项目)或 ~/.cursor/mcp.json(针对全局使用)中:
{
"mcpServers": {
"bitbucket-mcp-docker": {
"command": "docker",
"args": [
"run",
"-i",
"-e", "BITBUCKET_API_USERNAME",
"-e", "BITBUCKET_API_TOKEN",
"-e", "RUST_BACKTRACE",
"ghcr.io/ibrahimogod/bitbucket-mcp:latest"
],
"env": {
"BITBUCKET_API_USERNAME": "<your_atlassian_email>",
"BITBUCKET_API_TOKEN": "<your_api_token>",
"RUST_BACKTRACE": "1"
}
}
}
}将 <your_atlassian_email> 和 <your_api_token> 替换为您的 Bitbucket 凭据。如果需要,您也可以指定特定的镜像标签而不是 latest。
此配置允许 Cursor 在您使用 Bitbucket 工具时,自动在 Docker 中启动 Bitbucket MCP 服务器。
This server cannot be deployed
Maintenance
Related MCP Connectors
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
AI-native git hosting — repos, PRs, issues, CI gates, and AI code review over MCP (60 tools).
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.
327 dev tools via REST API and MCP. Generate Dockerfiles, schemas, K8s, APIs, and more.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Bitbucket Cloud repositories, pull requests, branches, commits, pipelines, issues, and webhooks through the Model Context Protocol.8349 npmMIT
- AlicenseBqualityDmaintenanceEnables LLMs to interact with Bitbucket repositories to manage pull requests, branches, and commits through the Model Context Protocol. It supports repository operations such as searching code, accessing file contents, and comparing branches using natural language.164,295 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Bitbucket Cloud that exposes 35 tools covering repositories, pull requests, branching models, and pipelines, enabling AI clients to automate Bitbucket workflows.3MIT
- AlicenseNot gradedqualityCmaintenanceEnables interaction with Bitbucket Cloud REST API 2.0, supporting pull requests, pipelines, logs, and repository cloning through MCP tools.22 npmMIT