The CircleCI MCP Server is a professional server implementation designed specifically for the Model Context Protocol (MCP), aimed at integrating with CircleCI's development workflows. This project serves as a bridge between CircleCI infrastructure and the Model Context Protocol, providing an enhanced AI-driven development experience.
This server enables AI tools like Cursor, Claude Code, Windsurf, etc., to understand your build system. It is built on the Model Context Protocol (MCP), a lightweight standard that allows LLM-driven agents to fetch structured data from external systems.
Retrieves detailed failure logs for CircleCI builds. This tool supports two usage methods:
Using CircleCI URL:
Using Local Project Context:
The returned formatted logs include:
Identifies flaky tests in a CircleCI project by analyzing test execution history. Supports two usage methods:
Using CircleCI Project URL:
Using Local Project Context:
Returns detailed information about flaky tests, including:
Retrieves the status of the latest pipeline for a given branch. The tool returns a formatted status of the latest pipeline:
Example output:
---
Workflow: build
Status: success
Duration: 5 minutes
Created: 4/20/2025, 10:15:30 AM
Stopped: 4/20/2025, 10:20:45 AM
---
Workflow: test
Status: running
Duration: unknown
Created: 4/20/2025, 10:21:00 AM
Stopped: in progress
Retrieves test metadata for a CircleCI job, allowing you to analyze test results without leaving your IDE.
Returns detailed test result information:
Assists with CircleCI configuration tasks, providing guidance and validation. This tool helps you:
.circleci/config.yml
for syntax and semantic errors.Provides:
Generates structured prompt templates for AI-enabled applications based on functional requirements. This tool:
Generates test cases for prompt templates, ensuring they produce expected results.
Add the following to your Cursor MCP configuration:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": ["-y", "@circleci/mcp-server-circleci"],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com" // Optional - only needed for on-premise customers
}
}
}
}
Install the CircleCI MCP server in .vscode/mcp.json
:
{
// 💡 Input is prompted on first server start, then securely stored by VS Code
"inputs": [
{
"type": "promptString",
"id": "circleci-token",
"description": "CircleCI API Token",
"password": true
}
],
"servers": {
"circleci-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@circleci/mcp-server-circleci"],
"env": {
"CIRCLECI_TOKEN": "${input:circleci-token}"
}
}
}
}
Add the following to your claude_desktop_config.json
:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": ["-y", "@circleci/mcp-server-circleci"],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com" // Optional - only needed for on-premise customers
}
}
}
}
Configuration file location:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
After installing Claude Code, run the following command:
claude mcp add circleci-mcp-server -e CIRCLECI_TOKEN=your-circleci-token -- npx -y @circleci/mcp-server-circleci
Add the following to your windsurf mcp_config.json
:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": ["-y", "@circleci/mcp-server-circleci"],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com" // Optional - only needed for on-premise customers
}
}
}
}
Automatically install the CircleCI MCP server for Claude Desktop via Smithery:
npx -y @smithery/cli install @CircleCI-Public/mcp-server-circleci --client claude
git clone https://github.com/CircleCI-Public/mcp-server-circleci.git
cd mcp-server-circleci
pnpm install
pnpm build
The easiest way to iterate on the MCP server is with the MCP Inspector.
pnpm watch # Keep running in one terminal
pnpm inspector
CIRCLECI_TOKEN
in the environment variables section of the inspector UI.https://circleci.com
.Run the test suite:
pnpm test
Run tests in watch mode during development:
pnpm test:watch
This tool is particularly useful for:
The CircleCI MCP Server is designed to support the real moments in the development lifecycle. Whether you're reviewing a failed build, debugging a failed deployment, or keeping an eye on a critical branch, it helps your assistant understand the failure and suggest fixes in seconds—without context switching.
By integrating this MCP server, developers can:
For more detailed contribution guidelines, please refer to the CONTRIBUTING.md
file in the project.