# CircleCI MCP Server

Connect an MCP-compatible AI agent or IDE to CircleCI to diagnose build failures, inspect pipeline status, find flaky tests, and trigger pipelines using natural language.

## When to use this

- Debugging a failed CircleCI build without leaving your editor or agent session
- Finding flaky tests across recent runs
- Checking pipeline, workflow, or job status
- Triggering a pipeline or re-running a failed workflow

## Requirements

- A CircleCI personal API token: generate one at https://app.circleci.com/settings/user/tokens
- Node.js 18+ or Docker, or the CircleCI CLI (the MCP server is built into the `circleci` CLI; see https://cli.circleci.com)

## Connect

Configure your MCP client with:

- Command: `npx @circleci/mcp-server-circleci@latest` (or the equivalent Docker image)
- Environment: `CIRCLECI_TOKEN` (your personal API token), `CIRCLECI_BASE_URL` (defaults to `https://circleci.com`)

Full setup instructions for Cursor, VS Code, Claude Desktop, Windsurf, and other clients: https://circleci.com/docs/guides/toolkit/using-the-circleci-mcp-server/

## Reference

- Product overview: https://circleci.com/product/mcp/
- Source and issue tracker: https://github.com/CircleCI-Public/mcp-server-circleci
