Buildkite MCP Server
Retrieve information from Buildkite, including organizations, pipelines, builds, jobs, and job logs, and perform actions like retrying jobs and listing failures.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Buildkite MCP Serverlist pipelines in my-org"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Buildkite MCP Server
A microservice for retrieving information from Buildkite via Model Context Protocol (MCP).
Setup
Clone this repository
Run
npm installSet the
BUILDKITE_ACCESS_TOKENenvironment variableStart the server with
node index.js
Related MCP server: TeamCity MCP Server
Using with Cursor (MCP Integration)
To add this server to Cursor, you need to configure it in your ~/.cursor/config/mcp.json file:
{
"mcpServers": {
"buildkite": {
"command": "npx",
"args": [
"-y",
"@drew-goddyn/buildkite-mcp"
],
"env": {
"BUILDKITE_ACCESS_TOKEN": "your-buildkite-access-token"
}
}
}
}With this configuration:
You don't need to install or run the server manually
Cursor will automatically start and stop the server as needed
Replace
your-buildkite-access-tokenwith your actual Buildkite API token
After updating the configuration, restart Cursor to apply the changes.
MCP Endpoints
List Organizations
POST /mcp_buildkite_list_organizationsRequest Body:
{
"access_token": "optional-if-set-in-env"
}Response:
[
{
"id": "org-id",
"name": "Organization Name",
"slug": "organization-slug"
}
]List Pipelines
POST /mcp_buildkite_list_pipelinesRequest Body:
{
"organization": "my-org",
"access_token": "optional-if-set-in-env"
}Response:
[
{
"id": "pipeline-id",
"name": "Pipeline Name",
"slug": "pipeline-slug"
}
]List Builds
POST /mcp_buildkite_list_buildsRequest Body:
{
"organization": "my-org",
"pipeline": "my-pipeline",
"access_token": "optional-if-set-in-env",
"branch": "main",
"state": "failed",
"per_page": 10,
"page": 1
}Response:
[
{
"id": "build-id",
"number": 123,
"state": "failed"
}
]Get Build Details
POST /mcp_buildkite_get_buildRequest Body:
{
"organization": "my-org",
"pipeline": "my-pipeline",
"build_number": 123,
"access_token": "optional-if-set-in-env"
}Response:
{
"id": "build-id",
"number": 123,
"jobs": [
{
"id": "job-id",
"name": "Job Name",
"state": "failed"
}
]
}List All Jobs
POST /mcp_buildkite_list_jobsRequest Body:
{
"organization": "my-org",
"pipeline": "my-pipeline",
"build_number": 123,
"access_token": "optional-if-set-in-env"
}Response:
[
{
"id": "job-id",
"name": "Job Name",
"state": "failed"
}
]List Failed Jobs
POST /mcp_buildkite_list_failed_jobsRequest Body:
{
"organization": "my-org",
"pipeline": "my-pipeline",
"build_number": 123,
"access_token": "optional-if-set-in-env"
}Response:
[
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "Test Job",
"state": "failed",
"web_url": "https://buildkite.com/my-org/my-pipeline/builds/123#01234567-89ab-cdef-0123-456789abcdef"
}
]List Job Spec Failures
POST /mcp_buildkite_list_job_spec_failuresRequest Body:
{
"organization": "my-org",
"pipeline": "my-pipeline",
"build_number": 123,
"job_id": "01234567-89ab-cdef-0123-456789abcdef",
"access_token": "optional-if-set-in-env"
}Response:
[
{
"type": "RSpec",
"spec": "./spec/path/to/file_spec.rb:123",
"message": "Expected result to be X but got Y"
}
]Get Job Log
POST /mcp_buildkite_get_job_logRequest Body:
{
"organization": "my-org",
"pipeline": "my-pipeline",
"build_number": 123,
"job_id": "01234567-89ab-cdef-0123-456789abcdef",
"access_token": "optional-if-set-in-env",
"limit": 100 // optional, defaults to all content
}Response:
{
"content": "...log content...",
"size": 12345,
"format": "raw"
}List Failed Specs from Build URL
POST /mcp_buildkite_list_failed_specsRequest Body:
{
"build_url": "https://buildkite.com/my-org/my-pipeline/builds/123",
"access_token": "optional-if-set-in-env"
}Response:
{
"build_url": "https://buildkite.com/my-org/my-pipeline/builds/123",
"failed_job_count": 2,
"jobs": [
{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"name": "Test Job 1",
"web_url": "https://buildkite.com/my-org/my-pipeline/builds/123#01234567-89ab-cdef-0123-456789abcdef",
"failures": [
{
"spec": "./spec/path/to/file_spec.rb:123",
"message": "Expected result to be X but got Y"
}
]
},
{
"id": "fedcba98-7654-3210-fedc-ba9876543210",
"name": "Test Job 2",
"web_url": "https://buildkite.com/my-org/my-pipeline/builds/123#fedcba98-7654-3210-fedc-ba9876543210",
"failures": []
}
],
"failures": [
{
"job_id": "01234567-89ab-cdef-0123-456789abcdef",
"job_name": "Test Job 1",
"job_url": "https://buildkite.com/my-org/my-pipeline/builds/123#01234567-89ab-cdef-0123-456789abcdef",
"spec": "./spec/path/to/file_spec.rb:123",
"message": "Expected result to be X but got Y"
}
]
}Retry Job
POST /mcp_buildkite_retry_jobRequest Body:
{
"organization": "my-org",
"pipeline": "my-pipeline",
"build_number": 123,
"job_id": "01234567-89ab-cdef-0123-456789abcdef",
"access_token": "optional-if-set-in-env"
}Response:
{
"id": "job-id",
"state": "scheduled"
}List Pipeline Build Failures
POST /mcp_buildkite_list_pipeline_build_failuresRequest Body:
{
"organization": "my-org",
"pipeline": "my-pipeline",
"state": "finished",
"per_page": 10,
"page": 1,
"access_token": "optional-if-set-in-env"
}Response:
[
{
"build_number": 123,
"build_url": "https://buildkite.com/my-org/my-pipeline/builds/123",
"failed_jobs": [
{
"name": "Test Job",
"url": "https://buildkite.com/my-org/my-pipeline/builds/123#01234567-89ab-cdef-0123-456789abcdef"
}
]
}
]Environment Variables
BUILDKITE_ACCESS_TOKEN: Your Buildkite API token with read accessPORT: (Optional) Port to run the server on (default: 63330)
Error Handling
The server returns appropriate HTTP status codes and error messages when something goes wrong:
400: Bad Request - Missing or invalid parameters401: Unauthorized - Invalid or missing access token404: Not Found - Resource not found500: Internal Server Error - Server-side error
This server cannot be deployed
Maintenance
Related MCP Connectors
The Buildkite MCP server exposes Buildkite product data (pipelines, builds, jobs, and test data) to AI tools, editors, and agents through the Model Context Protocol. It provides capabilities including pipeline creation and management, build monitoring with specialized tools like 'wait_for_build', efficient log querying using Apache Parquet conversion and caching, and OAuth-based authentication for both read-write and read-only access to Buildkite's REST API.
Manage repositories, users, releases, and automate GitHub workflows
Plan Salesforce deploys, open pull requests and trigger pipelines from your AI client.
Run tickets, boards, OKRs and cloud coding agents in your Builderforce workspace
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Jenkins CI jobs, including triggering and stopping builds, retrieving job details, and fetching build logs.-
- AlicenseNot gradedqualityDmaintenanceEnables management of TeamCity CI/CD operations through natural language commands, including builds, projects, tests, artifacts, and more.4 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with Azure DevOps, including listing pipelines and runs, viewing logs and artifacts, collecting and normalizing security reports, and triggering pipelines with safety controls.-
- FlicenseNot gradedqualityBmaintenanceExposes Jenkins CI/CD capabilities as MCP tools, including job management, builds, pipelines, and Terraform/GCP log inspection.-