home / mcp / circleci mcp server
Provides an MCP server to manage CircleCI tasks via MCP clients using tokens and standard endpoints.
Configuration
View docs{
"mcpServers": {
"circleci-public-mcp-server-circleci": {
"url": "http://your-circleci-remote-mcp-server-endpoint:8000/mcp",
"headers": {
"CIRCLECI_TOKEN": "YOUR_CIRCLECI_TOKEN",
"CIRCLECI_BASE_URL": "https://circleci.com"
}
}
}
}CircleCI MCP Server enables natural language control of CircleCI through the Model Context Protocol (MCP). You can use MCP-enabled clients to ask for build logs, run pipelines, check statuses, and perform a wide range of CircleCI actions by talking in plain language to the server. This guide walks you through practical usage, installation steps, and important configurations so you can set up and operate MCP with CircleCI quickly and securely.
Connect an MCP-enabled client such as Cursor IDE, Windsurf, Copilot, or any MCP-supported client to the CircleCI MCP Server. You can perform actions like finding the latest failed pipeline and retrieving logs, checking the status of the latest pipeline for a branch, or examining test results directly from your IDE or editor.
Prerequisites you need before installing the CircleCI MCP Server:
- Node.js version 18 or newer
- A CircleCI Personal API Token with read access to your projects
{
"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" // Optional - required for on-prem customers only
}
}
}
}{
"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" // Optional - required for on-prem customers only
}
}
}
}{
"inputs": [
{
"type": "promptString",
"id": "circleci-token",
"description": "CircleCI API Token",
"password": true
}
],
"servers": {
"circleci-mcp-server-remote": {
"url": "http://your-circleci-remote-mcp-server-endpoint:8000/mcp"
}
}
}Install CircleCI MCP Server for VS Code in the MCP configuration file for your project.
{
"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}"
}
}
}
}{
"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": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"CIRCLECI_TOKEN",
"-e",
"CIRCLECI_BASE_URL",
"circleci:mcp-server-circleci"
],
"env": {
"CIRCLECI_TOKEN": "${input:circleci-token}",
"CIRCLECI_BASE_URL": "${input:circleci-base-url}"
}
}
}
}{
"servers": {
"circleci-mcp-server-remote": {
"type": "sse",
"url": "http://your-circleci-remote-mcp-server-endpoint:8000/mcp"
}
}
}{
"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" // Optional - required for on-prem customers only
}
}
}
}macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\CLAUDE\claude_desktop_config.json
{
"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" // Optional - required for on-prem customers only
}
}
}
}#!/bin/bash
export CIRCLECI_TOKEN="your-circleci-token"
npx mcp-remote http://your-circleci-remote-mcp-server-endpoint:8000/mcp --allow-http{
"mcpServers": {
"circleci-remote-mcp-server": {
"command": "/full/path/to/circleci-remote-mcp.sh"
}
}
}Install CircleCI MCP Server for Claude Code using NPX or Docker.
claude mcp add circleci-mcp-server -e CIRCLECI_TOKEN=your-circleci-token -- npx -y @circleci/mcp-server-circleci@latestclaude mcp add circleci-mcp-server -e CIRCLECI_TOKEN=your-circleci-token -e CIRCLECI_BASE_URL=https://circleci.com -- docker run --rm -i -e CIRCLECI_TOKEN -e CIRCLECI_BASE_URL circleci:mcp-server-circleciclaude mcp add circleci-mcp-server -e CIRCLECI_TOKEN=your-circleci-token -- npx mcp-remote http://your-circleci-remote-mcp-server-endpoint:8000/mcp --allow-http{
"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" // Optional - required for on-prem customers only
}
}
}
}{
"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" // Optional - required for on-prem customers only
}
}
}
}{
"mcpServers": {
"circleci": {
"command": "npx",
"args": [
"mcp-remote",
"http://your-circleci-remote-mcp-server-endpoint:8000/mcp",
"--allow-http"
],
"disabled": false,
"alwaysAllow": []
}
}
}MCP client configuration files for Amazon Q Developer can be global or workspace specific.
{
"mcpServers": {
"circleci-local": {
"command": "npx",
"args": [
"-y",
"@circleci/mcp-server-circleci@latest"
],
"env": {
"CIRCLECI_TOKEN": "YOUR_CIRCLECI_TOKEN",
"CIRCLECI_BASE_URL": "https://circleci.com" // Optional - required for on-prem customers only
},
"timeout": 60000
}
}
}{
"mcpServers": {
"circleci-local": {
"command": "npx",
"args": [
"-y",
"@circleci/mcp-server-circleci@latest"
],
"env": {
"CIRCLECI_TOKEN": "YOUR_CIRCLECI_TOKEN",
"CIRCLECI_BASE_URL": "https://circleci.com" // Optional - required for on-prem customers only
},
"timeout": 60000
}
}
}{
"mcpServers": {
"circleci-remote": {
"command": "npx",
"args": [
"mcp-remote",
"http://your-circleci-remote-mcp-server-endpoint:8000/mcp",
"--allow-http"
],
"timeout": 60000
}
}
}All client integrations listed above provide multiple ways to connect. Use the option that matches your workflow and editor.
Retrieves detailed failure logs from CircleCI builds; supports multiple usage modes including by project slug/branch, by direct URL, or from local project context.
Identifies flaky tests by analyzing test history; supports multiple input methods and optional file output mode.
Fetches the status of the latest CircleCI pipeline for a given branch with detailed workflow information.
Retrieves test metadata for CircleCI jobs to analyze test outcomes from various contexts.
Validates and guides CircleCI configuration files for syntax, semantics, and best practices.
Generates structured prompt templates for AI-enabled applications from feature requirements.
Produces test case scenarios to validate prompt templates across inputs.
Lists all CircleCI projects you follow, including projectSlug details for subsequent operations.
Triggers a CircleCI pipeline with multiple input methods, returning a monitorable URL.
Triggers a rollback using a defined pipeline or reruns a workflow to revert to a previous version.
Reruns a CircleCI workflow from its start or from a failed job, returning a monitor URL.
Analyzes git diffs against cursor rules to identify violations with explanations.
Lists all component versions in an environment with deployment details for rollback decisions.
Downloads usage data from the CircleCI Usage API for an organization, supporting date parsing.
Analyzes usage data to find resources with low CPU/RAM usage for optimization.