Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.
VariableRequiredDescription
BUILDKITE_API_TOKENYesBuildkite API access token with read_pipelines and read_builds scopes (write_builds to trigger builds) Docs.

Setup

  1. Sign in to Buildkite: Use an existing organization or create one at https://buildkite.com - free plans include API access. You need at least one pipeline to query builds.
  2. Create an API access token: Go to https://buildkite.com/user/api-access-tokens, create a token scoped to your organization, and enable the read_pipelines, read_builds, and read_organizations REST scopes. Add write_builds if you want to trigger builds.
  3. Set the environment variable: Add the token to your .env as BUILDKITE_API_TOKEN=…
  4. Verify access: Run List Organizations, then List Pipelines with your organization slug.
  • Requests authenticate with ‘Authorization: Bearer <token>’ against https://api.buildkite.com/v2
  • API tokens are scoped per organization and per REST scope - missing scopes return 403
  • Pagination uses page and per_page query parameters (max 100 per page)
Provider API reference: https://buildkite.com/docs/apis/rest-api

Tools

ToolAccessDescription
List OrganizationsReadList Buildkite organizations the token can access
List PipelinesReadList pipelines in an organization
Get PipelineReadGet a pipeline’s configuration and build stats
List BuildsReadList builds for a pipeline, optionally filtered by branch or state
Get BuildReadGet a build including its jobs and their states
Create BuildWriteTrigger a new build on a pipeline

Example prompts

  • List the failed Buildkite builds on my main pipeline from today and summarize the commit messages.
  • Trigger a new Buildkite build of HEAD on the main branch of my pipeline.