连接器指南阅读约 6 分钟25 个 MCP 工具7 种语言

将 Bitbucket MCP 连接到 Microsoft Copilot

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。

HC作者:HelpCode 团队更新于 6 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

Bitbucket

Bitbucket

Let your AI work in Bitbucket Cloud: browse repositories, branches, commits and files, review pull requests with diffs and comments, approve, comment and merge after you confirm, and check Bitbucket Pipelines runs, step logs and deployments.

个工具

25

区域

INTL

类别

基础设施

身份验证

Bearer Token

所需环境变量

BITBUCKET_API_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

摘要

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。

引导式设置

2 分钟将 Bitbucket 连接到 Microsoft Copilot

开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 Bitbucket,再把你的 MCP URL 添加到 Microsoft Copilot。无需代码,也无需自行运行服务器。

无需信用卡 · 7 天试用 · 提供自托管方案

试试这样问

Bitbucket 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

Bitbucket · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Bitbucket、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无 git clone、无本地服务器。

Bitbucket + Microsoft Copilot

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。

前提条件

完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:

BITBUCKET_API_TOKEN

步骤 1 — 获取凭证

  1. 登录 https://id.atlassian.com/manage-profile/security/api-tokens(Atlassian 账户中的 Security → API tokens),点击 Create API token with scopes。
  2. 给令牌起个名字(例如 AnythingMCP),选择到期日期,并选择应用 Bitbucket。
  3. 勾选读取范围 read:user:bitbucket、read:workspace:bitbucket、read:repository:bitbucket、read:pullrequest:bitbucket 和 read:pipeline:bitbucket。如需创建、评论、批准和合并拉取请求,再加上 write:pullrequest:bitbucket;如需启动流水线,再加上 write:pipeline:bitbucket。
  4. 复制令牌(以 ATATT 开头),不要加 Bearer 一词,粘贴到 BITBUCKET_API_TOKEN,然后安装连接器。连接器以 Bearer 令牌的方式发送它,所以不需要你的 Atlassian 邮箱。
  5. 先用 bitbucket_get_current_user,再用 bitbucket_list_workspaces 检查设置。

应用密码已不再可用:Bitbucket 于 2025 年 9 月 9 日停止创建应用密码,并于 2026 年 7 月 28 日停用了剩余的应用密码。请按上述步骤使用带范围的 API 令牌。仓库、项目或工作区访问令牌(Repository settings → Access tokens;项目和工作区令牌需要 Premium 套餐)也可以填在同一字段中,但它以机器人身份运行,仅限于该仓库、项目或工作区:bitbucket_get_current_user 和 bitbucket_list_workspaces 可能会被拒绝,超出其范围的内容会返回 403 或 404。

谁能看到什么:AI 以令牌所属用户的身份操作,只能查看和修改该用户及所勾选范围允许的内容。不加两个写入范围,令牌就保持只读。

会改动真实分支并触达你的团队,所以 AI 会先问你:bitbucket_create_pull_request 以你的名义创建拉取请求(源分支必须已经推送)。bitbucket_add_pull_request_comment 发布普通评论、回复或针对某一行的代码评论,拉取请求的所有参与者都能看到,并可能收到通知。bitbucket_approve_pull_request 添加你的批准,它会计入合并检查。bitbucket_merge_pull_request 会为所有人改变目标分支,可能触发部署流水线,并且在设置 close_source_branch 时删除源分支;合并前 AI 会先用 bitbucket_get_pull_request 检查状态和批准情况。bitbucket_run_pipeline 会消耗构建分钟数,并执行流水线中的所有操作,包括部署步骤。每次调用前,AI 都会告诉你仓库、分支、拉取请求以及合并策略或流水线,并等你同意。安装时没有关闭任何工具;除了带 close_source_branch 的合并会删除源分支外,没有工具会删除仓库、分支或评论。

使用方法:bitbucket_list_workspaces 给出工作区 slug,bitbucket_list_repositories 给出仓库 slug;两者都出现在地址 bitbucket.org/<workspace>/<repo> 中。代码:bitbucket_get_repository(主分支)、bitbucket_list_branches、bitbucket_list_commits、bitbucket_get_commit 和 bitbucket_get_file(文件文本或文件夹列表)。评审:bitbucket_list_pull_requests、bitbucket_get_pull_request、用于查看改动规模的 bitbucket_get_pull_request_diffstat,然后是 bitbucket_get_pull_request_diff、bitbucket_list_pull_request_commits 和 bitbucket_list_pull_request_comments。部署:bitbucket_list_environments 和 bitbucket_list_deployments。

流水线:先用 bitbucket_list_pipelines,然后对失败的步骤使用 bitbucket_get_pipeline、bitbucket_list_pipeline_steps 和 bitbucket_get_pipeline_step_log。流水线和步骤的 uuid 带有花括号;AI 会按返回的原样传递。超过 200 KB 的步骤日志会被截断并保留开头部分,而错误通常在末尾,所以对于长日志,AI 会用类似 bytes=-150000(最后 150 KB)的范围读取末尾。差异和文件同样在 200 KB 处截断。

列表和筛选:有下一页时,列表结果中会带有 next;AI 会带上 page 再次调用(大多数列表是页码,提交列表是不透明的令牌),pagelen 设置每页条数。q 使用 Bitbucket 的查询语言,例如 name ~ "api" 或 destination.branch.name = "main"。

没有问题跟踪和 Wiki:Bitbucket 已于 2026 年 8 月 20 日移除内置的问题跟踪器和 Wiki(API 返回 410),因此本连接器没有相关工具。如需管理问题,请添加 Jira 连接器。

常见错误:401:令牌错误、已过期或已撤销,或者是旧的应用密码;请创建带范围的 API 令牌。403:缺少某个范围(错误信息会指出是哪个),或用户没有权限。404:工作区、仓库或条目不存在,或令牌看不到它。429:已达到每小时速率限制;请稍候重试。

该连接器不涉及创建或删除仓库和分支、编辑文件或推送提交、拒绝拉取请求、停止流水线、仓库变量和设置以及管理功能。

步骤 2 — 安装 adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

步骤 3 — 在 Microsoft Copilot 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Microsoft Copilot 通过在 Copilot Studio 中构建的智能体使用 MCP 服务器:把 AnythingMCP 作为工具添加到智能体,然后把智能体发布到 Microsoft 365 Copilot 和 Teams。Copilot Studio 从 Microsoft 的云端通过 Streamable HTTP 连接,AnythingMCP 支持这种方式。

  1. 在 Copilot Studio 中打开你的智能体(或新建一个),进入 Tools,选择 Add a tool → New tool → Model Context Protocol。
  2. 填写 Server name(例如 AnythingMCP)、说明连接器用途的 Server description,以及 Server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。Copilot Studio 根据描述决定何时调用该服务器。
  3. 身份验证选择 API key,把 Type 设为 Header,请求头名称填 X-API-Key,然后选择 Create。
  4. 在 Add tool 中选择 Create a new connection,粘贴 AnythingMCP 的 MCP API 密钥(MCP Servers → 你的服务器 → API keys),然后选择 Add to agent。
  5. 在智能体的 Test 窗格中试一试:提出需要用到 Bitbucket 的工具的请求。
  6. 选择 Publish,然后进入 Channels → Microsoft 365 and Microsoft Teams,保持勾选 Make agent available in Microsoft Copilot,再选择 Add channel。See agent in Teams 会为你安装该智能体;在 Microsoft 365 Copilot 中输入 @ 并选择该智能体。

希望每个用户各自登录?请选择 OAuth 2.0 → Dynamic discovery 代替 API 密钥:每个用户会在智能体首次调用时登录 AnythingMCP。

自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Copilot Studio 从 Microsoft 的云端连接,因此 localhost 无法使用。

可用工具

ToolWhat it does
bitbucket_get_current_userGet the Bitbucket account the token belongs to: display name, nickname, uuid, account_id and profile link
bitbucket_list_workspacesList the workspaces the token's user belongs to: slug, name, uuid and whether the user is an administrator there
bitbucket_list_repositoriesList repositories in a workspace, most recently updated first: full_name, slug, description, private flag, language, main branch, project…
bitbucket_get_repositoryGet one repository: description, main branch, project, privacy, language, size, fork parent, clone URLs and web link
bitbucket_list_branchesList branches of a repository with the latest commit of each (hash, date, message, author)
bitbucket_list_commitsList commits newest first: hash, date, message, author and parents
bitbucket_get_commitGet one commit: full hash, date, full message, author, parents and web link
bitbucket_get_fileRead a file or list a folder at a commit or branch
bitbucket_list_pull_requestsList pull requests of a repository, open ones by default: id, title, state, draft, author, source and destination branch, comment and task…
bitbucket_get_pull_requestGet one pull request: title, description, state, branches and commits, merge commit, reviewers and participants with their approval state…
bitbucket_get_pull_request_diffstatList the files a pull request changes: status (added, removed, modified, renamed), old and new path, lines added and removed
bitbucket_get_pull_request_diffRead the unified diff of a pull request as plain text
bitbucket_list_pull_request_commitsList the commits a pull request contains, newest first: hash, date, message and author
bitbucket_list_pull_request_commentsList comments on a pull request, oldest first: id, author, text, inline position (file and line) for code comments, parent id for replies…
bitbucket_create_pull_requestOpen a pull request from a source branch into a destination branch of the same repository, as the token's user
bitbucket_add_pull_request_commentPost a comment on a pull request as the token's user: a general comment, a reply (parent) or a code comment on a line (inline)
bitbucket_approve_pull_requestApprove a pull request as the token's user
bitbucket_merge_pull_requestMerge an open pull request into its destination branch
bitbucket_list_pipelinesList Bitbucket Pipelines runs of a repository, newest first: uuid, build number, state (PENDING, IN_PROGRESS, COMPLETED), result…
bitbucket_get_pipelineGet one pipeline run: state, result, branch or tag, commit, custom pipeline name, trigger, creator, start, end and duration
bitbucket_list_pipeline_stepsList the steps of a pipeline run: uuid, name, state, result, start, end, duration, build image name and script command names
bitbucket_get_pipeline_step_logRead the log of one pipeline step as plain text
bitbucket_run_pipelineStart a Bitbucket Pipelines run on a branch or tag, optionally a custom pipeline from bitbucket-pipelines.yml
bitbucket_list_environmentsList the deployment environments of a repository (for example Test, Staging, Production): uuid, name, type, rank and lock state
bitbucket_list_deploymentsList deployments of a repository: environment uuid, state (UNDEPLOYED, IN_PROGRESS, COMPLETED), status (SUCCESSFUL, FAILED, STOPPED), who…

示例提示

  • “acme/web-app 中哪些拉取请求仍处于打开状态?分别是谁创建的,哪些还没有任何批准?”
  • “评审 web-app 中的拉取请求 #42:总结改动的文件,指出有风险的改动,并列出尚未解决的评审评论。”
  • “main 上最近一次流水线为什么失败?读取失败步骤的日志,把错误给我看。”
  • “等拉取请求 #42 有两个批准后,用 squash 方式合并到 main。先给我看分支和合并策略,合并前问我。”
  • “最近一次部署到 Production 的是什么?什么时候、由谁部署,发布的是哪个提交?”

FAQ

这适用于哪个 Copilot? 适用于工作中的 Microsoft 365 Copilot,通过 Copilot Studio 的智能体实现。面向个人账户的 Microsoft Copilot 应用无法添加自己的 MCP 服务器。

我需要什么? 一个可以使用 Copilot Studio 的工作账户(许可证或试用版),用于构建智能体。在 Microsoft 365 Copilot 或 Teams 中使用它的人需要拥有该智能体的访问权限:把它共享给他们,或请管理员为整个组织发布。如果你的组织对 Power Platform 连接器设置了数据策略,这些策略同样适用于 MCP 服务器。

智能体不调用工具。 检查请求头名称是否正好是 X-API-Key,密钥是否属于与 URL 相同的 MCP 服务器,并把 Server description 写得具体:Copilot Studio 根据它决定何时调用服务器。每次修改后重新发布智能体;在已打开的对话中输入 "start over" 即可使用新版本。

下一步

这份指南对你有帮助吗?

2 分钟将 Bitbucket 连接到 Microsoft Copilot

开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 Bitbucket,再把你的 MCP URL 添加到 Microsoft Copilot。无需代码,也无需自行运行服务器。

相关指南

连接器

Bitbucket MCP 服务器:仓库、PR 与流水线

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。

连接器

将 Bitbucket MCP 连接到 ChatGPT:PR 与流水线

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。

连接器

将 Bitbucket MCP 连接到 Claude:PR 与流水线

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。

连接器

将 Bitbucket MCP 连接到 Cursor:PR 与流水线

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。

连接器

将 Bitbucket MCP 连接到 Gemini CLI

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。

连接器

将 Bitbucket MCP 连接到 Meta Muse

让你的 AI 在 Bitbucket Cloud 中工作:浏览仓库、分支、提交和文件,评审带有差异和评论的拉取请求,在你确认后批准、评论和合并,并查看 Bitbucket Pipelines 的运行、步骤日志和部署。