
CircleCI MCP Server
OfficialOfficial CircleCI MCP server: inspect and fix failed builds, query pipelines in natural language.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @circleci/mcp-server-circleciPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": [
"-y",
"@circleci/mcp-server-circleci"
],
"env": {
"CIRCLECI_TOKEN": "<your-circleci-token>"
}
}
}
}Before you start
- Node.js 18+ (run via npx) or Docker
- A CircleCI account with at least one project building on CircleCI
- A CircleCI Personal API Token from app.circleci.com/settings/user/tokens (passed via the CIRCLECI_TOKEN env var)
- An MCP-compatible client: Cursor, VS Code, Claude Desktop, Claude Code, Windsurf, or Amazon Q Developer
About CircleCI MCP Server
The CircleCI MCP Server is the official Model Context Protocol server from CircleCI. It lets an MCP-capable client (Claude, Cursor, VS Code, Windsurf, Amazon Q, and others) talk to your CircleCI account in natural language to debug CI/CD failures and drive pipelines without leaving the editor.
Its headline use is failure triage: ask "why did my build fail?" and it pulls the failing job's logs (get_build_failure_logs), surfaces the root cause, and can validate proposed .circleci/config.yml fixes with config_helper. It also covers test analytics (find_flaky_tests, get_job_test_results), cost/optimization insight (find_underused_resource_classes, download_usage_api_data), and pipeline actions like run_pipeline, rerun_workflow, and run_rollback_pipeline.
A second feature set targets AI/prompt engineering on CircleCI: create_prompt_template, recommend_prompt_template_tests, and run_evaluation_tests help build and evaluate prompt templates as part of a pipeline. The server runs locally over stdio via npx or Docker, and CircleCI also offers a remote HTTP+SSE deployment for teams.
Tools & capabilities (12)
get_build_failure_logsRetrieve detailed logs from a failed build or job to diagnose the cause.
config_helperValidate a .circleci/config.yml and get guidance on fixing configuration errors.
find_flaky_testsIdentify flaky tests across a project using execution history.
get_job_test_resultsPull test metadata and pass/fail outcomes for a CircleCI job.
get_latest_pipeline_statusShow the current pipeline state for a given branch.
run_pipelineTrigger a pipeline run for a project/branch.
rerun_workflowRe-run a workflow from the start or from failed jobs only.
run_rollback_pipelineTrigger a rollback pipeline for a project.
list_artifactsList artifacts produced by a job.
list_followed_projectsEnumerate the CircleCI projects you follow.
find_underused_resource_classesSpot jobs using oversized compute resource classes.
download_usage_api_dataExport usage metrics from the CircleCI Usage API.
When to use it
- Use it when a build fails and you want the failure logs pulled and explained right in your editor.
- Use it when you need to validate or fix a .circleci/config.yml before pushing.
- Use it when chasing flaky tests that intermittently break CI.
- Use it when you want to trigger, re-run, or roll back a pipeline by asking in natural language.
- Use it when auditing CircleCI spend and right-sizing resource classes.
- Use it when building and evaluating prompt templates as part of a CircleCI pipeline.
Quick setup
- 1Generate a CircleCI Personal API Token at app.circleci.com/settings/user/tokens.
- 2Add the server to your MCP client config with command npx -y @circleci/mcp-server-circleci (or the Docker image).
- 3Set the CIRCLECI_TOKEN environment variable (and CIRCLECI_BASE_URL if self-hosted/server).
- 4Restart your MCP client so it loads the server.
- 5Verify by asking the assistant to list your followed projects or the latest pipeline status.
Security notes
The CircleCI API token can read project configuration, environment variable names and build logs that may contain secrets; scope it to the minimum projects needed and treat it as sensitive.
CircleCI MCP Server FAQ
Is this the official CircleCI MCP server?
Yes. It is maintained by CircleCI under the CircleCI-Public GitHub org and published as @circleci/mcp-server-circleci.
How do I authenticate?
Create a Personal API Token in your CircleCI user settings and provide it via the CIRCLECI_TOKEN environment variable in your MCP client config.
Which clients are supported?
Cursor, VS Code, Claude Desktop, Claude Code, Windsurf, Amazon Q Developer, and other MCP-compatible clients. It also installs via Smithery.
Can I run it remotely for a team instead of locally?
Yes. Besides local stdio (npx/Docker), CircleCI supports a remote HTTP+SSE deployment so a team can share a centrally hosted server.
Does it work with CircleCI Server (self-hosted)?
Yes. Set CIRCLECI_BASE_URL to your CircleCI Server instance along with your token.
Alternatives to CircleCI MCP Server
Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).
Up-to-date, version-specific library documentation injected into your coding agent.
LSP-powered coding agent toolkit: semantic symbol search, references and structural edits.
Compare CircleCI MCP Server with: