Buildkite Mcp Server

io.github.buildkite由 GitHub 帳號 buildkite 發布v0.7.0更新於 Oct 24, 2026

MCP server exposing Buildkite API data (pipelines, builds, jobs, tests) to AI tooling and editors.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

Buildkite MCP 伺服器,讓助理讀取流水線、建置、作業、日誌與測試,比較建置並重試失敗的作業。

可以做什麼
  • 檢視流水線、建置與作業,包括列出建置、等待建置完成和讀取作業詳情
  • 搜尋、跟蹤並讀取建置日誌,彙整建置失敗資訊
  • 將某次建置與較早的通過基準或指定建置比對,找出新失敗、已恢復和仍失敗的作業
  • 重試指定作業或僅重試基礎設施故障,並可用 dry-run 預覽預計執行的重試
  • 檢視 Test Engine 的測試套件、測試以及工作流的監控、篩選和告警動作
  • 建立和更新流水線(含 GitHub provider 設定與流水線範本),並檢視或切換 GitHub webhook 處理
適用情境
適合讓助理排查 CI 失敗、說明兩次建置之間的變化,或在編輯器內重試偶發的基礎設施作業。也適合透過對話管理流水線和 Test Engine 設定的團隊。
執行需求
以本機 stdio 程序執行,通常使用已發佈的容器映像。需要在 BUILDKITE_API_TOKEN 環境變數中提供 Buildkite API 權杖,其權限範圍需與啟用的工具集相符(例如重試工具集需要 read_builds、read_build_logs 和 retry_builds)。需要能存取 Buildkite API 的網路。
安裝前請注意
此權杖可存取組織的 Buildkite 資料,應盡量縮小權限,優先使用受限的 retries 工具集而非 write_builds。重試工具會改變建置狀態,唯讀模式會將其排除,建議先用 dry_run 預覽。流水線建立/更新與 webhook 啟停工具會寫入設定。日誌存取逐次請求驗證,Test Engine 工作流中的 webhook 端點會被遮蔽。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Buildkite Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

buildkite-mcp-server

[Build status]

Model Context Protocol (MCP) server exposing Buildkite data (pipelines, builds, jobs, tests) to AI tooling and editors.

Full documentation is available at buildkite.com/docs/apis/mcp-server.


Retrying builds with limited permissions

The retries toolset supports investigating failures and retrying jobs without broader build-write access. It includes list_builds, get_build, wait_for_build, list_jobs, get_job, search_logs, tail_logs, read_logs, retry_job, and retry_failed_jobs. It requires read_builds, read_build_logs, and retry_builds scopes, not write_builds.

bash
buildkite-mcp-server stdio --enabled-toolsets retries

retry_failed_jobs retries only infrastructure failures; use its dry_run option to inspect the proposed retries without executing them. retry_job retries a specific job. Both are mutating tools and are excluded by --read-only. The toolset does not expose create, rebuild, cancel, or unblock operations. Existing retry tools remain available in builds; selecting builds or all still requires write_builds for the other mutations.

The Buildkite API must have the RetryBuildsScope feature enabled for the token owner to accept retry_builds; existing write_builds tokens remain accepted. Hosted MCP OAuth can select this toolset using /mcp/x/retries once the hosted server adopts a release containing it. Selecting toolsets through request headers does not change an existing token's OAuth scopes.

For library consumers, WithDisabledToolsets and the HTTP factory's disabled toolsets exclude all members of those toolsets, even through overlapping groups. For example, disabling logs also removes log tools from retries; disabling retries removes its inspection and retry tools from other groups.


Configuring GitHub Actions pipelines

create_pipeline and update_pipeline accept GitHub provider_settings and branch_configuration. Omit provider keys to use API defaults on create or leave them unchanged on update. Explicit false is preserved. Set filter_condition or pull_request_branch_filter_configuration to null to clear them; an empty string is sent as an empty string. Set branch_configuration: null on update to clear an existing branch filter. On create, an omitted, null or empty branch filter uses the API's null default. Full get_pipeline and list_pipelines responses preserve the supported GitHub settings. go-buildkite response strings do not distinguish null from empty, so do not reconstruct partial updates from readback.

Follow the manual GitHub Actions setup. Keep branch-wide skip_queued_branch_builds and cancel_running_branch_builds false to avoid skipping or cancelling sibling workflow builds. Use create_webhook: false: provider settings do not provision a dedicated GitHub Actions trigger or its webhook, and the existing webhook tools create traditional repository webhooks. Server-side feature availability and token permissions still apply; accepting settings does not prove workflow execution.

On create, supply nonblank configuration or an approved pipeline_template_uuid, not both. On update, omit pipeline_template_uuid to retain the assignment, supply a UUID to assign a template without configuration, or send null to remove it. Removal can include replacement configuration; the API enforces configuration requirements and organization template policy. Full pipeline responses retain assigned UUIDs; go-buildkite omits the field when the response assignment is null or absent.

Use get_pipeline_github_webhook_processing, enable_pipeline_github_webhook_processing, and disable_pipeline_github_webhook_processing to inspect or change traditional GitHub webhook processing. These use GET/PUT/DELETE github-webhooks, not the POST webhook creation endpoint. They do not delete repository webhooks or change dedicated GitHub Actions triggers. Responses preserve enabled and nullable disabled_at and disabled_by metadata; disabled_by is a user name. All three require Full Access, a GitHub or GitHub Enterprise pipeline, and organization enrollment in expanded webhook triggers. GET requires read_pipelines; enable/disable require write_pipelines and are excluded in read-only mode. A 404 can mean the controls are unavailable, not that the pipeline is missing. API errors are returned without treating failure as a disabled state.

These contracts are covered with local synthetic HTTP fixtures. Hosted availability, permissions, persistence, and workflow execution require separate verification; local success is not proof of deployed support. Dedicated GitHub Actions trigger management is not included.


Comparing builds

The read-only compare_builds tool in the investigations toolset answers questions such as “What changed since this build last worked on main?” Supply org_slug, pipeline_slug, and the target build_number. It selects the most recently created earlier build that is currently passed on the same pipeline and exact branch. It does not require that the baseline had already passed when the target started. Supply baseline_build_number to compare against a specific build in that pipeline instead, including a failed build or one on another branch.

The response identifies the baseline and selection rule, counts outcomes across all jobs, and returns up to 100 job comparisons, prioritizing newly failing, recovered, and still-failing steps. Matching uses step keys, job type, matrix values, and parallel index/total. When both jobs lack keys, it falls back to the exact nonblank name plus type, group key, matrix values, and parallel index/total, only when that combination is unique in each build. Matched pairs expose match_method: "step_key" or "name_fallback"; fallback matches carry a warning that they are heuristic. Unnamed unkeyed jobs and duplicate identities remain unmatched. Explicit keys never fall back to names, even when a key was added, removed, or changed between builds. Added/removed means a job identity is present in only one build, so renaming unkeyed jobs or changing matrix values or parallelism can also produce added/removed entries. Retried attempts are excluded; final-attempt states and retry counts remain visible.

Execution times and deltas cover final attempts only. Scheduling time is scheduled_at to started_at, not dependency or manual waiting. These are not build wall-clock comparisons or total retry costs. Missing or inconsistent timestamps omit the corresponding timing. Unfinished builds are explicitly identified as changing snapshots.

Any change in soft_failed is reported as state_changed: transitions between soft and hard failures, even when both jobs have state failed, and between passed and soft-failed jobs, which are never reported as newly_failing or recovered because a soft failure does not block the build. A passed baseline build can contain soft-failed jobs.

By default, up to three newly blocking failures include their last 20 log entries: newly_failing jobs first, then state_changed jobs that are now hard failures, such as a job that soft-failed in the baseline. Logs are bounded to 8 KiB of log content each. Set include_logs: false to omit logs. Log errors do not discard the comparison, except HTTP 401 authentication errors, which propagate through the server's reauthentication path. The tool requires read_builds and read_build_logs scopes. Use get_build_failure_summary or tail_logs to investigate further; a shared failing step does not establish a shared root cause or make a retry safe.

Baseline discovery searches at most 500 candidates. If none is found, the response says no comparison was performed and asks for an explicit baseline. Job inventories are limited to 1,000 jobs per build; larger inventories return an error instead of misleading partial added/removed results. Output omissions are reported separately from the complete outcome counts.


Inspecting Test Engine workflows

The read-only list_test_workflows and get_test_workflow tools in the tests toolset expose a suite's configured monitors, filters, alarm/recovery actions, and links. Both require read_suites and suite access. Supply org_slug and test_suite_slug (a slug or UUID) to list workflows:

json
{"org_slug": "acme", "test_suite_slug": "backend"}

To inspect one, call get_test_workflow with the same organization and suite and an item's id as workflow_id.

Use the configured labels with list_tests to find marked tests; labels alone do not rank flakiness. Workflows describe configuration, not proof an action ran or event history. Both tools always replace webhook endpoints with [REDACTED], regardless of the caller's API permissions.


Inspecting Test Engine span aggregates

The read-only tests toolset includes four span aggregate tools requiring read_suites:

  • list_span_aggregate_scopes: supply org_slug, test_suite_slug, and an optional period to list instrumentation scopes by total duration. OTel trace ingestion must be enabled. Aggregates have hourly precision and one-month retention; the requested period must fit the organization's API history allowance.
  • list_span_aggregate_scopes_for_build: supply org_slug and build_uuid to list instrumentation scopes across the build's visible suites. Requires OTel trace ingestion and access to the build's pipeline.
  • list_span_aggregate_names: supply org_slug, test_suite_slug, and scope_name to get span-name statistics for a suite. Supports the same period values and retention as list_span_aggregate_scopes, plus the sort and limit options described below. Requires OTel trace ingestion.
  • list_span_aggregate_names_for_build: supply org_slug, build_uuid (not the pipeline build number), and scope_name to get span-name statistics across the build's visible suites. Use an empty string for the unnamed scope. Requires access to the build's pipeline. Optional sort defaults to -total, and limit defaults to 20 (maximum 100). Check span_names_truncated before treating the result as complete.

Durations are in nanoseconds. Totals sum span durations rather than measuring wall-clock time; p50 and p95 values are approximate. No span aggregate tool is paginated. Both span-name tools accept an empty scope_name for the unnamed scope and return span_names_truncated when more names exist.


Library Usage

The exported Go API of this module should be considered unstable, and subject to breaking changes as we evolve this project.


Security

To ensure the MCP server is run in a secure environment, we recommend running it in a container.

This image is built from cgr.dev/chainguard/static and runs as an unprivileged user.

Passing identity headers through HTTP mode

Self-hosted HTTP deployments can forward selected headers from each inbound MCP request to the Buildkite API:

bash
BUILDKITE_API_TOKEN=bkua_xxx \  buildkite-mcp-server http \  --passthrough-http-header X-User-Identity

Repeat --passthrough-http-header to allow more than one header, or set a comma-separated BUILDKITE_PASSTHROUGH_HTTP_HEADERS value. Only explicitly allowed headers are forwarded, and only to the origin configured by BUILDKITE_BASE_URL. They are removed from requests redirected elsewhere.

To authenticate each MCP request with its own Buildkite API token, allow Authorization and omit the process-wide token:

bash
BUILDKITE_PASSTHROUGH_HTTP_HEADERS=Authorization \  buildkite-mcp-server http

In this mode every /mcp request must contain exactly one non-empty Authorization header. Missing credentials return HTTP 401; the server never falls back to a shared API token. The reverse proxy in front of the MCP server is responsible for authenticating callers and setting or validating any forwarded identity headers.

Header passthrough is not available in stdio mode. Before serving job logs, the server verifies that the current caller can access the job log. This check is performed for every log-tool request, including when the log data is already cached.


Contributing

Development guidelines are in DEVELOPMENT.md.


License

MIT © Buildkite

SPDX-License-Identifier: MIT

來源:README.md,提交 95ad72f

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.7.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分