Connect Buildkite to Claude Code

Read failed builds, job logs and artifacts, and trigger, rebuild, retry or unblock Buildkite builds. Add Toolspoke to Claude Code once and it can use 17 Buildkite actions. Your Buildkite credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Buildkite and connect it

    Add Buildkite to a project in your Toolspoke workspace.

    API access token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    API access token
    Buildkite → your avatar → Personal Settings → API Access Tokens → New API Access Token. Pick the organization, then tick read_organizations, read_pipelines, read_builds, read_build_logs and read_artifacts. Add write_builds only if this install should trigger, rebuild, retry, cancel or unblock builds.
  3. Choose what Claude Code may do

    All 17 actions start on. Switch off any of the 6 actions that change something in Buildkite, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Buildkite actions that only read, so they are safe to try first.

  • List the organizations this token can reach, with the slug every other call takes as org
  • List the most recent builds across every organization and pipeline this token reaches, newest first
  • List the pipelines in one organization, with each pipeline's slug, repository and default branch
  • Retrieve one pipeline, including its steps configuration and branch filters

What Claude Code can do in Buildkite

11 actions read, 4 write and 2 delete or permanently change something.

Reads

  • List organizations

    List the organizations this token can reach, with the slug every other call takes as org.

  • List recent builds

    List the most recent builds across every organization and pipeline this token reaches, newest first. Needs no slug, which makes it the quickest answer to "what failed just now" and the install's connection test, it fails when the token lacks read_builds.

  • List pipelines

    List the pipelines in one organization, with each pipeline's slug, repository and default branch.

  • Get pipeline

    Retrieve one pipeline, including its steps configuration and branch filters.

  • List builds

    List builds across every pipeline in one organization, newest first, without their jobs. Filter by state=failed to find what broke, then call get_build on one.

  • List pipeline builds

    List builds of one pipeline, newest first, without their jobs.

  • Get build

    Retrieve one build by its number, with every job in it. Each job carries its id, state and exit_status, the id is what get_job_log, tail_job_log, retry_job and unblock_job take.

  • Tail job log

    Return the last 60 KB of one job's log as plain text. Start here when a job failed, the error is almost always at the end. Use get_job_log when the cause is earlier in the output.

  • Get job log

    Return one job's whole log as JSON, with the content and its size in bytes. The content is cut at 60,000 characters from the start; use tail_job_log for the end of a long log.

  • List build annotations

    List the annotations on one build, the summaries test reporters and pipeline steps write, which often name the failing tests directly.

  • List build artifacts

    List the artifacts every job in one build uploaded, with path, size and the job that made each one.

Writes

  • Create build

    Start a new build of a pipeline for one commit and branch. A write, not destructive, it adds a build and cancel_build stops it, but it runs whatever the pipeline runs, so a pipeline that deploys on this branch will deploy. Use HEAD as the commit for the latest commit on the branch.

  • Rebuild build

    Run a finished build again as a new build with the same commit, branch and environment. Returns the new build.

  • Retry failed jobs

    Retry every failed job in one build, in place, leaving the jobs that passed alone. Cheaper than rebuild_build when one flaky job broke the build.

  • Retry job

    Retry one failed or timed-out job. Only command jobs that have finished can be retried.

Deletes or permanently changes

  • Cancel build

    Cancel a running or scheduled build. Destructive because it cannot be undone, running jobs are stopped part-way, and the build can only be rebuilt from the start, not resumed.

  • Unblock job

    Unblock a block step so the build continues past it. Destructive because block steps are usually a human approval gate, often the one in front of a production deploy, and unblocking cannot be taken back once the next steps start.

Buildkite in Claude Code: questions

Does Claude Code see my Buildkite credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Buildkite?

Yes. Each of the 17 actions can be switched off for a project. Turn off the 6 that change something and Claude Code can only read.

Will 17 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Buildkite action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Buildkite call does not run in a sandbox, so it bills nothing.

Try Buildkite in Claude Code

Free to start, and tool calls cost nothing on any plan.