The CircleCI MCP Server integrates CircleCI with AI tools through the Model Context Protocol, allowing you to interact with CircleCI using natural language in supported IDEs and applications.
Add this to your Cursor MCP config:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": ["-y", "@circleci/mcp-server-circleci@latest"],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com"
}
}
}
}
{
"mcpServers": {
"circleci-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"CIRCLECI_TOKEN",
"-e",
"CIRCLECI_BASE_URL",
"circleci:mcp-server-circleci"
],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com"
}
}
}
}
Create .vscode/mcp.json
with the following:
{
"inputs": [
{
"type": "promptString",
"id": "circleci-token",
"description": "CircleCI API Token",
"password": true
},
{
"type": "promptString",
"id": "circleci-base-url",
"description": "CircleCI Base URL",
"default": "https://circleci.com"
}
],
"servers": {
"circleci-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@circleci/mcp-server-circleci@latest"],
"env": {
"CIRCLECI_TOKEN": "${input:circleci-token}",
"CIRCLECI_BASE_URL": "${input:circleci-base-url}"
}
}
}
}
Add to your Claude Desktop config file (location varies by OS):
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": ["-y", "@circleci/mcp-server-circleci@latest"],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com"
}
}
}
}
Config file locations:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
Run this command after installing Claude Code:
claude mcp add circleci-mcp-server -e CIRCLECI_TOKEN=your-circleci-token -- npx -y @circleci/mcp-server-circleci@latest
Add to your Windsurf mcp_config.json:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": ["-y", "@circleci/mcp-server-circleci@latest"],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com"
}
}
}
}
Edit ~/.aws/amazonq/mcp.json
or .amazonq/mcp.json
with:
{
"mcpServers": {
"circleci-local": {
"command": "npx",
"args": [
"-y",
"@circleci/mcp-server-circleci@latest"
],
"env": {
"CIRCLECI_TOKEN": "YOUR_CIRCLECI_TOKEN",
"CIRCLECI_BASE_URL": "https://circleci.com"
},
"timeout": 60000
}
}
}
Retrieves detailed failure logs from CircleCI builds using project slug and branch, CircleCI URLs, or local project context.
Identifies flaky tests in your CircleCI project by analyzing test execution history.
Retrieves the status of the latest pipeline for a given branch.
Retrieves test metadata for CircleCI jobs, including test failures and performance metrics.
Assists with CircleCI configuration tasks by providing guidance and validation.
Lists all projects that the user is following on CircleCI.
Triggers a pipeline to run for a specific project and branch.
Triggers a rollback for a project, either using a dedicated rollback pipeline or by rerunning a previous workflow.
Reruns a workflow from its start or from the failed job.
Lists all versions for a specific CircleCI component in an environment.
Downloads usage data from the CircleCI Usage API for a given organization.
Analyzes CircleCI usage data to find jobs with low resource utilization.
npx clear-npx-cache
and npm cache clean --force
@latest
to your configFor more complex issues, try running with verbose logging:
DEBUG=* npx @circleci/mcp-server-circleci@latest
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "circleci-mcp-server" '{"command":"npx","args":["-y","@circleci/mcp-server-circleci"],"env":{"CIRCLECI_TOKEN":"your-circleci-token","CIRCLECI_BASE_URL":"https://circleci.com"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": [
"-y",
"@circleci/mcp-server-circleci"
],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "npx",
"args": [
"-y",
"@circleci/mcp-server-circleci"
],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect