# buildkite-mcp-server

Exposes Buildkite CI/CD pipelines to your AI coding assistant. Helps investigate broken runs, fetch tail logs, compare builds with main, and trigger safe step retries.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 56
- Author: buildkite
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/buildkite/buildkite-mcp-server
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/buildkite-mcp-server

## What it does

The server links your coding assistant to the Buildkite API over stdio or HTTP. Instead of pasting console logs back and forth, you let the model inspect pipeline failures directly. It queries build statuses and reads tail log outputs directly inside your workspace.

Available tools are split into modular sets. The `retries` toolset handles failure investigations and lets the model rerun infrastructure failures without broad write access. You only need `read_builds`, `read_build_logs`, and `retry_builds` scopes instead of `write_builds`. It also includes a `dry_run` option to verify proposed job retries before touching anything.

The `compare_builds` helper pinpoints regressions by matching a failed run against an earlier successful build on the same branch. It tracks up to 100 job transitions and pulls the last log lines for critical blockers. Running this server requires Docker and a valid `BUILDKITE_API_TOKEN`.

## Requirements
- Needs: Docker
- Environment variables: `BUILDKITE_API_TOKEN` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env BUILDKITE_API_TOKEN=<BUILDKITE_API_TOKEN> --transport stdio buildkite-mcp-server -- docker run -i --rm -e BUILDKITE_API_TOKEN ghcr.io/buildkite/buildkite-mcp-server:0.7.0
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add buildkite-mcp-server --env BUILDKITE_API_TOKEN=<BUILDKITE_API_TOKEN> -- docker run -i --rm -e BUILDKITE_API_TOKEN ghcr.io/buildkite/buildkite-mcp-server:0.7.0
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "buildkite-mcp-server": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "BUILDKITE_API_TOKEN",
                "ghcr.io/buildkite/buildkite-mcp-server:0.7.0"
            ],
            "env": {
                "BUILDKITE_API_TOKEN": "<BUILDKITE_API_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "buildkite-mcp-server": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "-e",
                "BUILDKITE_API_TOKEN",
                "ghcr.io/buildkite/buildkite-mcp-server:0.7.0"
            ],
            "env": {
                "BUILDKITE_API_TOKEN": "<BUILDKITE_API_TOKEN>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e BUILDKITE_API_TOKEN=<BUILDKITE_API_TOKEN> buildkite-mcp-server docker run -i --rm -e BUILDKITE_API_TOKEN ghcr.io/buildkite/buildkite-mcp-server:0.7.0
```
Replace <…> with your own values

## When to use it
- find pipeline failure root causes from recent job logs
- compare broken builds against the last passing run on the branch
- trigger infrastructure retries safely after dry-run review
- inspect test suite monitoring rules and alert workflows

## Example prompts
- Check build 89 in pipeline web-app and show logs for failed jobs.
- Compare build 142 with the last passing run on main in the api pipeline.
- Run a dry-run retry for infrastructure failures on build 210.

## Similar
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [Oh My Posh Validator](https://affpapa.org/en/nevibecode/mcp/oh-my-posh-validator.md) — MCP server · ★ 23643
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Coder](https://affpapa.org/en/nevibecode/mcp/coder.md) — MCP server · ★ 17160
- [mcp](https://affpapa.org/en/nevibecode/mcp/kubeshark-mcp.md) — MCP server · ★ 12109

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
