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

将 CircleCI MCP 接入 Microsoft Copilot

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。

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

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

CircleCI

CircleCI

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

个工具

22

区域

INTL

类别

基础设施

身份验证

API Key

所需环境变量

CIRCLECI_TOKEN
在 Cloud 上一键安装

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

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

摘要

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。

引导式设置

2 分钟将 CircleCI 连接到 Microsoft Copilot

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

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

试试这样问

CircleCI 的示例提示

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

CircleCI · 通过 MCP 实时
分享
Opus 4.7

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

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

CircleCI + Microsoft Copilot

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。

前提条件

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

CIRCLECI_TOKEN

步骤 1 — 获取凭证

  1. 在 https://app.circleci.com 登录 CircleCI,打开 User Settings → Personal API Tokens(https://app.circleci.com/settings/user/tokens)。
  2. 点击 Create New Token,为它命名并复制。较新的令牌以 CCIPAT_ 开头。项目设置中的项目 API 令牌不能用于 API v2。
  3. 把令牌原样粘贴到 CIRCLECI_TOKEN,不要加前缀,然后安装连接器。令牌只会通过 Circle-Token 请求头发送到 circleci.com。
  4. 用 circleci_get_current_user 检查设置,再用 circleci_list_collaborations 查看你所属的组织。

谁能看到什么:令牌在你所属的每个组织中都拥有与你的 CircleCI 用户相同的权限。请只把 MCP 服务器分享给可以查看这些构建的人。

项目 slug:大多数工具需要项目 slug,可在 Project Settings → Overview 中找到。通过 GitHub OAuth 和 Bitbucket Cloud 连接的项目使用 gh/<org>/<repo> 或 bb/<workspace>/<repo>(例如 gh/acme/web-app);通过 GitHub App 和 GitLab 连接的项目使用 circleci/<organization id>/<project id>。请连同斜杠原样传入 slug。

会启动构建并停止正在运行的工作,所以 AI 会先问你:circleci_trigger_pipeline 在某个分支或标签上启动新的流水线。它需要来自 circleci_list_pipeline_definitions 的定义 ID,而后者又需要来自 circleci_get_project 的项目 ID;GitLab 项目不支持此功能。circleci_rerun_workflow 把工作流作为新的工作流重新运行:全部作业、仅从失败的作业开始,或你选定的作业。circleci_cancel_workflow 会停止正在运行的工作流,尚未开始的作业将不再运行。启动和重新运行会消耗额度,并执行配置中的所有内容,包括部署作业;取消可能会让部署停在一半。每次调用前,AI 都会告诉你项目、分支、工作流或作业,并等你同意。安装时没有任何工具被关闭,这里也没有任何操作会删除项目、上下文或变量。

查明构建失败的原因:circleci_list_pipelines(最新的在前,可只看一个分支),按 ID 查询的 circleci_get_pipeline,或按应用中显示的 #编号查询的 circleci_get_pipeline_by_number;然后用 circleci_list_pipeline_workflows 和 circleci_list_workflow_jobs 找到失败的作业及其作业编号。circleci_get_job 提供状态、耗时、执行器、使用的上下文和网页链接。circleci_list_job_tests 统计通过、跳过和失败的测试数量,并列出每个失败测试及其消息(仅限保存了测试结果的作业)。circleci_list_job_artifacts 列出已保存的构建产物及下载链接,下载时需要同一个令牌。完整的步骤日志只能通过作业的 web_url 在 CircleCI 应用中查看。

趋势和不稳定测试:circleci_get_workflow_metrics 汇总项目所有工作流在最近 24 小时到最近 90 天之间某个时间窗口内的数据(运行次数、成功率、耗时、消耗的额度、恢复时间),可针对一个分支或全部分支。circleci_get_workflow_summary 显示单个工作流最近 90 天的数据及与上一周期相比的趋势。circleci_list_flaky_tests 列出在同一提交上既通过又失败过的测试,以及出现次数和浪费的时间。Insights 数据每天更新一次,不是实时的。

上下文和变量:circleci_list_contexts 需要来自 circleci_list_collaborations 的组织 ID(对于 GitHub OAuth 和 Bitbucket 组织,也可以用 gh/acme 这样的组织 slug)。circleci_list_context_env_var_names 和 circleci_list_project_env_var_names 只返回环境变量的名称,从不返回它们的值。

分页:列表会返回 next_page_token;AI 会把它作为 page_token 传回,直到它为空。

常见错误:401:令牌错误或已被撤销,或者它是项目 API 令牌;请在 User Settings 中创建个人 API 令牌。404:项目 slug 错误,或你的用户看不到该项目;对于你无权访问的项目,CircleCI 返回 404 而不是 403。429:已达到速率限制;请等一分钟后重试。

该连接器不涉及批准挂起的作业,创建或删除项目、上下文、环境变量、计划任务和 Webhook,也不读取完整的步骤日志。

步骤 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 窗格中试一试:提出需要用到 CircleCI 的工具的请求。
  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
circleci_get_current_userGet the CircleCI user the personal API token belongs to: id, login and name
circleci_list_collaborationsList the organizations the user belongs to: id, name, VCS type and slug (e.g. gh/acme, or circleci/<org-id> for GitHub App and GitLab…
circleci_get_projectGet a project by slug: name, project id, organization name, slug and id, and the connected repository URL and default branch
circleci_list_pipeline_definitionsList the pipeline definitions of a project: id, name, description and where the config and code come from
circleci_list_pipelinesList the pipelines of a project, newest first: id, number, state, branch or tag, commit, trigger, actor, time and setup errors
circleci_get_pipelineGet one pipeline by id: number, state, branch or tag, commit, trigger, actor, time and setup errors
circleci_get_pipeline_by_numberGet one pipeline of a project by its number (the #123 shown in the CircleCI app)
circleci_list_pipeline_workflowsList the workflows of a pipeline: id, name, status (success, running, failed, on_hold, canceled ...), start and stop time and who started…
circleci_get_workflowGet one workflow by id: name, status, pipeline id and number, project, start and stop time, and who started, canceled or errored it
circleci_list_workflow_jobsList the jobs of a workflow: id, job number, name, type (build or approval), status, dependencies, start and stop time
circleci_get_jobGet the details of a job by project and job number: name, status, duration, executor and resource class, parallelism and per-run status…
circleci_list_job_testsSummarize the test results a job uploaded with store_test_results: how many passed, were skipped and failed, and for every failed test its…
circleci_list_job_artifactsList the artifacts a job stored with store_artifacts: path, node index and download URL
circleci_get_workflow_metricsInsights summary for every workflow of a project over a reporting window (default last 90 days): runs, success rate, failed runs, duration…
circleci_get_workflow_summaryInsights for one workflow: metrics for the last 90 days (runs, success rate, duration, credits, time to recovery) and their trend against…
circleci_list_flaky_testsList the project's flaky tests (tests that passed and failed on the same commit): test name, class, file, job and workflow, how often it…
circleci_trigger_pipelineStart a new pipeline for a project from a pipeline definition, on a branch or tag
circleci_rerun_workflowRerun a workflow as a new workflow: all jobs, only from the failed job (from_failed), or chosen jobs
circleci_cancel_workflowCancel a running workflow; its running jobs stop and jobs not yet started will not run, which can leave a deployment half done
circleci_list_contextsList the contexts (shared sets of environment variables) of an organization: id, name and creation time
circleci_list_context_env_var_namesList the names of the environment variables in a context, with created and updated time
circleci_list_project_env_var_namesList the names of a project's environment variables (Project Settings > Environment Variables) with their creation time

示例提示

  • “gh/acme/web-app 在 main 上最近一次流水线为什么失败?给我看失败的作业、失败的测试及其消息,以及作业链接。”
  • “gh/acme/web-app 里哪些测试不稳定?它们随机失败了多少次,浪费了多少时间?”
  • “比较 gh/acme/web-app 所有工作流在全部分支上最近 30 天的情况:成功率、平均耗时和消耗的额度。”
  • “从失败的作业开始重新运行流水线 #1482 的部署工作流。告诉我哪些作业会再次运行,启动前先问我。”
  • “在 release/2.4 分支上启动一条流水线,并把参数 deploy 设为 true。先给我看项目、分支和参数。”

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 分钟将 CircleCI 连接到 Microsoft Copilot

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

相关指南

连接器

CircleCI MCP 服务器:流水线、工作流与测试

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。

连接器

将 CircleCI MCP 接入 ChatGPT:查看工作流与测试

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。

连接器

将 CircleCI MCP 接入 Claude:查看流水线与测试

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。

连接器

将 CircleCI MCP 接入 Cursor:查看流水线与作业

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。

连接器

将 CircleCI MCP 接入 Gemini CLI

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。

连接器

将 CircleCI MCP 接入 Meta Muse:测试与作业

让你的 AI 检查 CircleCI:流水线、工作流和作业,失败的测试和构建产物,Insights 指标和不稳定测试,上下文和变量名称,并在你确认后启动流水线、重新运行或取消工作流。