跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Buildkite,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
AnythingMCP 已收录在 Claude 的连接器目录中:一键添加到 Claude (在新标签页中打开),然后登录并选择 Claude 可以使用哪些 MCP 服务器。
摘要
在 AI 智能体中查看 Buildkite:流水线、构建和作业、作业日志、制品和注释、代理、集群和队列,以及包含不稳定和慢速测试的 Test Engine 测试套件;经你确认后还能启动、重建和重试构建,解除步骤阻塞并添加注释。
试试这样问
Buildkite 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Buildkite、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Buildkite + Claude
在 AI 智能体中查看 Buildkite:流水线、构建和作业、作业日志、制品和注释、代理、集群和队列,以及包含不稳定和慢速测试的 Test Engine 测试套件;经你确认后还能启动、重建和重试构建,解除步骤阻塞并添加注释。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
BUILDKITE_API_TOKEN
步骤 1 — 获取凭证
设置大约需要 3 分钟。你需要一个能访问该组织的 Buildkite 账户。
- 在 Buildkite 中打开头像、Personal Settings、API Access Tokens(https://buildkite.com/user/api-access-tokens),点击 New API Access Token。
- 选择组织以及这些 scope:
read_builds、read_build_logs、read_pipelines、read_artifacts、read_agents、read_clusters、read_organizations、read_user,Test Engine 还需要read_suites。写入操作需另加write_builds。不希望 AI 执行的操作就不要勾选。 - 把令牌(通常以
bkua_开头)粘贴到BUILDKITE_API_TOKEN。它以Authorization: Bearer <token>的形式只发送到 api.buildkite.com,AI 以令牌所属用户的身份操作。 - 安装连接器并运行
buildkite_get_access_token:它会显示令牌的 scope。然后用buildkite_list_organizations列出组织 slug。
slug 和编号:工具使用组织 slug(org)和流水线 slug(pipeline),与 buildkite.com/<org>/<pipeline> 中一致,并使用构建 编号(#123),而不是构建的 UUID。作业、制品和代理使用 UUID。buildkite_list_test_runs 按构建的 UUID(构建的 id)筛选。
可以读取:
- 组织和流水线:
buildkite_get_current_user、buildkite_list_organizations、buildkite_get_organization、buildkite_list_pipelines(按名称或仓库 URL 的一部分筛选)和buildkite_get_pipeline,包含仓库、默认分支、分支过滤、集群和 YAML 步骤。 - 构建:
buildkite_list_builds查看整个组织,buildkite_list_pipeline_builds查看单个流水线,按时间倒序,可按分支、状态(failed、running、blocked等)、提交、创建者或日期筛选。默认不包含作业;buildkite_get_build会列出作业及其状态、退出码、step key 和代理。 - 构建为什么失败:用
state设为 failed 的buildkite_list_jobs,再用buildkite_get_job和buildkite_get_job_log,后者以纯文本返回日志末尾,默认是错误通常所在的最后 100,000 字节(tail_bytes最多 5,000,000)。buildkite_list_annotations里通常有测试或覆盖率摘要。 - 制品:
buildkite_list_build_artifacts、buildkite_list_job_artifacts(按状态或路径 glob 筛选)和buildkite_get_artifact,包含大小、MIME 类型、sha1 和下载 URL;文件本身在 Buildkite 应用中打开。 - 代理和容量:
buildkite_list_agents(主机名、版本、队列、标签、连接状态、当前作业)、buildkite_get_agent、buildkite_list_clusters、buildkite_get_cluster和buildkite_list_cluster_queues(是否暂停派发)。 - Test Engine:
buildkite_list_test_suites;buildkite_list_tests提供可靠性、耗时、执行次数、flaky 等标签和负责人(用sort_by=reliability加order=asc找出最不可靠的测试);buildkite_get_test提供不稳定性评分;以及buildkite_list_test_runs、buildkite_get_test_run和buildkite_list_failed_executions,后者给出失败原因,按需附带 backtrace。
经你确认后可以修改:buildkite_create_build(流水线、提交、分支、消息、环境变量)、buildkite_rebuild_build、buildkite_retry_failed_jobs、buildkite_retry_job、buildkite_unblock_job 和 buildkite_create_annotation。构建会在你的代理上运行真实步骤(包括部署)并消耗计算资源,因此 AI 会说明流水线、构建和分支,等你同意后再执行。buildkite_unblock_job 会批准一个人工关卡,通常是上线生产前的那一步:只有你明确要求时 AI 才会调用。
安装时关闭:buildkite_cancel_build。取消构建会停止正在运行的作业,可能让部署停在一半,而且无法继续,只能重建,因此需要时由工作区管理员开启。
数据格式:状态为小写(passed、failed、running、blocked、canceled)。时间为 UTC 的 ISO 8601。web_url 可在 Buildkite 中打开构建或作业。日志行可能包含 ANSI 颜色代码。测试耗时单位为秒,可靠性为小数(0.95 = 95%)。
分页:列表工具接受 page 和 per_page(默认 30,最多 100)。还有更多结果时,响应中会有 _pagination.nextUrl;AI 会请求下一个 page(buildkite_list_jobs 则传 after),直到 _pagination 消失。翻得过深的构建列表会返回 400;这时 AI 会用 branch 或 created_from 缩小范围。
限制:Buildkite 按组织和按用户限制每分钟的 REST 调用次数,任一额度用完都会返回 429;请等待 RateLimit-Reset 中的秒数后重试。
常见错误:401 表示令牌错误、已过期或已吊销。403 表示令牌缺少该调用所需的 scope(用 buildkite_get_access_token 检查),或无权访问该组织。404 表示 slug、编号或 id 错误。422 会说明构建或作业为何无法创建、重试或解除阻塞。
连接器不读取作业的环境变量(其中含有机密),不删除日志、制品、注释或流水线,不创建或修改流水线、集群、队列或代理令牌,不停止或暂停代理,也不涉及团队、成员、审计事件、包仓库以及静音、跳过等测试状态变更。
步骤 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 — 在 Claude 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
推荐路径:在 claude.ai web 上工作,无需触碰任何配置文件。
- 在 Claude 中打开 Customize → Connectors。
- 点击 +,然后点击 Add custom connector。
- 输入名称(例如
Buildkite)和远程 MCP 服务器 URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID,然后点击 Add。 - 点击 Connect,登录 AnythingMCP(OAuth)并允许访问。
下面所有工具都会出现在你的聊天中,开始输入提示。
可用工具
| Tool | What it does |
|---|---|
buildkite_get_access_token | Read the API access token in use: its scopes, description, expiry and owner |
buildkite_get_current_user | Read the Buildkite user the token belongs to: id, name, email and avatar |
buildkite_list_organizations | List the organizations the token can reach, with their slug, name and web URL |
buildkite_get_organization | Read one organization: name, slug, web URL and links to its pipelines and agents |
buildkite_list_pipelines | List the pipelines of an organization: slug, name, repository, default branch, cluster and running and scheduled build counts |
buildkite_get_pipeline | Read one pipeline: repository, default branch, branch filters, cluster, provider settings and its YAML steps configuration |
buildkite_list_builds | List the builds of a whole organization, newest first: number, state, branch, commit, message, creator, pipeline and times |
buildkite_list_pipeline_builds | List the builds of one pipeline, newest first, with the same filters as buildkite_list_builds |
buildkite_get_build | Read one build by its number: state, branch, commit, message, creator, times, job_state_counts and its jobs with state, exit status, step… |
buildkite_list_jobs | List the jobs of a build, optionally only some states or one step or group key: id, name, step key, state, exit status, agent and times |
buildkite_get_job | Read one job by id: name, command, state, exit status, signal, agent, retry information, times and web URL |
buildkite_get_job_log | Read the end of a job's log as plain text, by default the last 100,000 bytes, where the error usually is |
buildkite_list_build_artifacts | List the artifacts uploaded by all jobs of a build: id, job id, path, file size, mime type, state and sha1 |
buildkite_list_job_artifacts | List the artifacts of one job, with the same fields and filters as buildkite_list_build_artifacts |
buildkite_get_artifact | Read one artifact's metadata: path, size, mime type, state, sha1 and its download URL (the file itself opens in the Buildkite app) |
buildkite_list_annotations | List the annotations of a build: context, style (success, info, warning, error), priority and the rendered HTML body, often a test or… |
buildkite_list_agents | List the connected agents of an organization: id, name, hostname, version, queue, tags (meta_data), connection state and the job they run |
buildkite_get_agent | Read one agent by id, also a disconnected one: connection state, hostname, version, queue, tags, current job and times |
buildkite_list_clusters | List the clusters of an organization: id, name, description, default queue and maintainers |
buildkite_get_cluster | Read one cluster: name, description, default queue and maintainers |
buildkite_list_cluster_queues | List the queues of a cluster: id, key, description, hosted agent settings and whether dispatch is paused |
buildkite_list_test_suites | List the Test Engine suites of an organization: slug, name, default branch and web URL |
buildkite_list_tests | List the tests of a Test Engine suite with metrics over a time window: reliability, average and total duration, execution counts, labels… |
buildkite_get_test | Read one test of a suite with its duration, reliability and execution metrics and its flakiness scores over a time window |
buildkite_list_test_runs | List the test runs of a suite, newest first: id, branch, commit, result, execution counts by result and the build they belong to |
buildkite_get_test_run | Read one test run: state, result, branch, commit, execution counts and times |
buildkite_list_failed_executions | List the failed test executions of a run: test name and location, failure reason and, with include_failure_expanded, the expanded failure… |
buildkite_create_build | Start a new build of a pipeline for a commit and branch |
buildkite_rebuild_build | Run a finished build again as a new build with the same commit, branch and settings, including any deploy steps |
buildkite_retry_failed_jobs | Retry the failed jobs of a build in place, optionally only some failure kinds |
buildkite_retry_job | Retry one failed, timed out or canceled job; the retry runs as a new job in the same build |
buildkite_unblock_job | Unblock a block step (a manual approval, often before a deploy) so the build continues, optionally with values for the step's fields |
buildkite_create_annotation | Add an annotation (a Markdown or HTML note shown on the build page) to a build, or append to the one with the same context |
buildkite_cancel_build | Cancel a scheduled, running or failing build; its running jobs stop and the rest never run, which can leave a deployment half done |
示例提示
- “main 分支上 api 流水线的最近一次构建为什么失败?给我看失败作业日志里的错误。”
- “现在有哪些构建被阻塞,正在等待审批?”
- “列出我们 Test Engine 套件最近 7 天最不可靠的 10 个测试。”
- “重试 web 流水线中构建 #4821 的失败作业。”
- “default 队列里连接了多少个代理?其中哪些正在忙?”
FAQ
Claude Code 和 Claude Desktop 一样工作吗? 是的,两者都指向 https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。
下一步
这份指南对你有帮助吗?