remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Provides authentication and integration with Atlassian services, specifically focused on Bitbucket functionality using Atlassian API tokens.
Allows AI assistants to interact with Bitbucket repositories, including listing repositories, accessing pull requests, viewing commit information, and exploring workspaces.
Atlassian Bitbucket MCP 服务器
该项目提供了一个模型上下文协议 (MCP) 服务器,它充当 AI 助手(例如 Anthropic 的 Claude、Cursor AI 或其他兼容 MCP 的客户端)与您的 Atlassian Bitbucket 实例之间的桥梁。它允许 AI 实时安全地访问您的代码库、拉取请求和工作区并与之交互。
概述
什么是 MCP?
模型上下文协议 (MCP) 是一种开放标准,允许 AI 系统安全且上下文地与外部工具和数据源连接。
该服务器专门为 Bitbucket Cloud 实现 MCP,将您的 Bitbucket 数据与 AI 助手连接起来。
为什么要使用此服务器?
- 最小输入,最大输出理念:您只需要像
workspaceSlug
和repoSlug
这样的简单标识符。每个工具都会返回全面的详细信息,无需额外的参数。 - 丰富的代码可视化:通过文件统计、差异视图和围绕代码修改的智能上下文,深入了解存储库和代码更改。
- 安全的本地身份验证:凭证永远不会存储在服务器中。服务器在本地运行,因此您的令牌永远不会离开您的计算机,并且您可以只请求所需的权限。
- 直观的 Markdown 回复:所有回复均使用结构良好的 Markdown,具有一致的格式和导航链接,以提高可读性。
- 完整的 Bitbucket 集成:通过统一的界面访问工作区、存储库、拉取请求、评论、代码搜索等。
入门
先决条件
- Node.js (>=18.x):下载
- Bitbucket 云帐户
步骤 1:验证
选择以下身份验证方法之一:
选项 A:Bitbucket 应用程序密码(推荐)
从Bitbucket App Passwords生成一个。最低权限:
- 工作区:阅读
- 存储库:阅读
- 拉取请求:阅读
选项 B:Atlassian API 令牌
从Atlassian API Tokens生成一个。
第 2 步:配置凭证
方法A:MCP配置文件(推荐)
创建或编辑~/.mcp/configs.json
:
使用 Bitbucket 应用程序密码:
使用 Atlassian API 令牌:
方法B:环境变量
运行服务器时直接传递凭据:
步骤3:连接你的AI助手
配置与 MCP 兼容的客户端以启动此服务器。
克劳德/光标配置:
此配置在运行时自动启动服务器。
工具
本节介绍将此服务器与 AI 助手配合使用时可用的 MCP 工具。请注意,MCP 工具使用snake_case
-case) 来命名工具名称,使用camelCase
来命名参数。
list_workspaces
列出可用的 Bitbucket 工作区。
或者:
“显示我所有的 Bitbucket 工作区。”
get_workspace
获取特定工作区的完整详细信息。
“告诉我有关‘acme-corp’工作区的更多信息。”
list_repositories
列出工作区中的存储库。
或者:
“列出‘acme-corp’中的存储库。”
get_repository
获取特定存储库的详细信息。
“向我显示‘acme-corp’中的‘backend-api’存储库。”
search
搜索 Bitbucket 内容。
存储库:
拉取请求:
提交:
代码:
“在‘acme-corp’工作区中搜索‘function getUser’。”
list_pull_requests
列出存储库中的拉取请求。
“在‘frontend-app’中显示打开的 PR。”
get_pull_request
获取拉取请求的完整详细信息,包括代码差异和文件更改。
“从‘frontend-app’获取 PR #42 以及所有代码更改。”
list_pr_comments
列出对特定拉取请求的评论。
“显示 PR #42 上的所有评论。”
add_pr_comment
向拉取请求添加评论。
一般的:
排队:
“在第 42 行向 PR #42 添加一条评论。”
pull_requests_create
创建一个新的拉取请求。
“创建从‘feature/login’到‘main’的 PR。”
命令行界面 (CLI)
CLI 使用 kebab-case 来表示命令(例如, list-workspaces
)和选项(例如, --workspace-slug
)。
使用npx
快速使用
全局安装
然后直接运行:
发现更多 CLI 选项
使用--help
查看所有可用命令的标志和用法:
或者获取特定命令的详细帮助:
执照
You must be authenticated.
一种集成工具,使 Claude 等 AI 助手能够直接访问和交互 Bitbucket 存储库、拉取请求和代码,而无需复制/粘贴操作。
Appeared in Searches
- A platform for code hosting and collaboration
- Exploring a GitHub repository and creating a detailed flowchart of its functionality
- A server for reading and navigating GitHub repositories using provided URLs
- A platform for managing and hosting Git repositories
- DevSecOps tools for integration with GitLab or development environments