mcp-server-circleci
OfficialThis CircleCI MCP Server enables interaction with CircleCI pipelines and projects using natural language through MCP-supported clients. Key capabilities include:
Debug build failures: Retrieve detailed failure logs from CircleCI builds
Identify flaky tests: Analyze test execution history to find problematic tests
Check pipeline status: Get latest pipeline status for specific branches or projects
Retrieve test results: Fetch test metadata including detailed failure analysis
Validate CircleCI config: Provide configuration guidance and validation
List followed projects: Display all projects you're following with projectSlugs
Run pipelines: Trigger pipeline executions for specific branches
Create prompt templates: Generate structured templates for AI-enabled applications
Recommend prompt tests: Generate test cases to ensure expected results
Integrates with CircleCI to retrieve build failure logs and identify flaky tests. Supports accessing logs via CircleCI URLs or local project context, and analyzing test execution history to detect unreliable tests in a project's test suite.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-circlecishow me the status of my latest pipeline"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
This repository is deprecated. The CircleCI MCP server is now built into the CircleCI CLI. Visitcli.circleci.com to get started.
CircleCI MCP Server
Model Context Protocol (MCP) is a new, standardized protocol for managing context between large language models (LLMs) and external systems. In this repository, we provide an MCP Server for CircleCI.
Use Cursor, Windsurf, Copilot, Claude, or any MCP-compatible client to interact with CircleCI using natural language — without leaving your IDE.
Tools
Tool | Description |
Validate and get guidance for your CircleCI configuration | |
Download usage data from the CircleCI Usage API | |
Identify flaky tests by analyzing test execution history | |
Find jobs with underused compute resources | |
Retrieve detailed failure logs from CircleCI builds | |
Retrieve test metadata and results for CircleCI jobs | |
Get the status of the latest pipeline for a branch | |
List artifacts produced by a CircleCI job | |
List all versions for a CircleCI component | |
List all CircleCI projects you're following | |
Rerun a workflow from start or from the failed job | |
Trigger a pipeline to run | |
Trigger a rollback for a project |
Related MCP server: codemagic_mcp
Installation
Team / centralized deployment: To run one shared remote server for your org (Kubernetes, Docker, etc.) with per-developer or shared CircleCI tokens, see Self-Managed Remote MCP Server.
Prerequisites:
NPX: Node.js >= v18 and pnpm
Docker: Docker
Using NPX in a local MCP Server
Add the following 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",
"MAX_MCP_OUTPUT_LENGTH": "50000"
}
}
}
}
CIRCLECI_BASE_URLis optional — required for on-prem customers only.MAX_MCP_OUTPUT_LENGTHis optional — maximum output length for MCP responses (default: 50000).
Using Docker in a local MCP Server
Add the following to your Cursor MCP config:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"CIRCLECI_TOKEN",
"-e",
"CIRCLECI_BASE_URL",
"-e",
"MAX_MCP_OUTPUT_LENGTH",
"circleci/mcp-server-circleci"
],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com",
"MAX_MCP_OUTPUT_LENGTH": "50000"
}
}
}
}Using a Self-Managed Remote MCP Server
See Self-Managed Remote MCP Server. Use the per-user client configuration and add it to your Cursor MCP config (Cursor Settings → MCP).
Prerequisites:
NPX: Node.js >= v18 and pnpm
Docker: Docker
Using NPX in a local MCP Server
Add the following to .vscode/mcp.json in 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 are prompted on first server start, then stored securely by VS Code.
Using Docker in a local MCP Server
Add the following to .vscode/mcp.json in 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": "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}"
}
}
}
}Using a Self-Managed Remote MCP Server
See Self-Managed Remote MCP Server. Use the per-user client configuration in .vscode/mcp.json.
Prerequisites:
NPX: Node.js >= v18 and pnpm
Docker: Docker
Using NPX in a local MCP Server
Add the following to your claude_desktop_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",
"MAX_MCP_OUTPUT_LENGTH": "50000"
}
}
}
}Using Docker in a local MCP Server
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"CIRCLECI_TOKEN",
"-e",
"CIRCLECI_BASE_URL",
"-e",
"MAX_MCP_OUTPUT_LENGTH",
"circleci/mcp-server-circleci"
],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com",
"MAX_MCP_OUTPUT_LENGTH": "50000"
}
}
}
}Using a Self-Managed Remote MCP Server
See Self-Managed Remote MCP Server. Create a wrapper script as shown in Claude Desktop and CLI clients, then point your claude_desktop_config.json at it.
To find or create your config file, open Claude Desktop settings, click Developer in the left sidebar, then click Edit Config. The config file is located at:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
For more information: https://modelcontextprotocol.io/quickstart/user
Prerequisites:
NPX: Node.js >= v18 and pnpm
Docker: Docker
Using NPX in a local MCP Server
claude mcp add circleci-mcp-server -e CIRCLECI_TOKEN=your-circleci-token -- npx -y @circleci/mcp-server-circleci@latestUsing Docker in a local MCP Server
claude 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-circleciUsing a Self-Managed Remote MCP Server
See Self-Managed Remote MCP Server and the Claude Code client setup there.
Prerequisites:
NPX: Node.js >= v18 and pnpm
Docker: Docker
Using NPX in a local MCP Server
Add the following 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",
"MAX_MCP_OUTPUT_LENGTH": "50000"
}
}
}
}Using Docker in a local MCP Server
Add the following to your Windsurf mcp_config.json:
{
"mcpServers": {
"circleci-mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"CIRCLECI_TOKEN",
"-e",
"CIRCLECI_BASE_URL",
"-e",
"MAX_MCP_OUTPUT_LENGTH",
"circleci/mcp-server-circleci"
],
"env": {
"CIRCLECI_TOKEN": "your-circleci-token",
"CIRCLECI_BASE_URL": "https://circleci.com",
"MAX_MCP_OUTPUT_LENGTH": "50000"
}
}
}
}Using a Self-Managed Remote MCP Server
See Self-Managed Remote MCP Server. Use the per-user client configuration in your Windsurf mcp_config.json.
For more information: https://docs.windsurf.com/windsurf/mcp
Prerequisites:
MCP client configuration in Amazon Q Developer is stored in JSON format in a file named mcp.json. Two levels of configuration are supported:
Global:
~/.aws/amazonq/mcp.json— applies to all workspacesWorkspace:
.amazonq/mcp.json— specific to the current workspace
If both files exist, their contents are merged. In case of conflict, the workspace config takes precedence.
Using NPX in a local MCP Server
Edit ~/.aws/amazonq/mcp.json or create .amazonq/mcp.json with the following:
{
"mcpServers": {
"circleci-local": {
"command": "npx",
"args": [
"-y",
"@circleci/mcp-server-circleci@latest"
],
"env": {
"CIRCLECI_TOKEN": "YOUR_CIRCLECI_TOKEN",
"CIRCLECI_BASE_URL": "https://circleci.com",
"MAX_MCP_OUTPUT_LENGTH": "50000"
},
"timeout": 60000
}
}
}Using a Self-Managed Remote MCP Server
See Self-Managed Remote MCP Server. Use a wrapper script as shown in Claude Desktop and CLI clients, then register it with q mcp add.
Prerequisites:
Using NPX in a local MCP Server
Edit ~/.aws/amazonq/mcp.json or create .amazonq/mcp.json with the following:
{
"mcpServers": {
"circleci-local": {
"command": "npx",
"args": [
"-y",
"@circleci/mcp-server-circleci@latest"
],
"env": {
"CIRCLECI_TOKEN": "YOUR_CIRCLECI_TOKEN",
"CIRCLECI_BASE_URL": "https://circleci.com",
"MAX_MCP_OUTPUT_LENGTH": "50000"
},
"timeout": 60000
}
}
}Using a Self-Managed Remote MCP Server
See Self-Managed Remote MCP Server. Use a wrapper script as shown in Claude Desktop and CLI clients, then add it via the MCP configuration UI:
Choose the + symbol
Select scope: global or local
Enter a name (e.g.
circleci-remote-mcp)Select transport protocol: stdio
Enter the command path to your script
Click Save
To install CircleCI MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @CircleCI-Public/mcp-server-circleci --client claudeSelf-Managed Remote MCP Server
Run the MCP server centrally (for example on Kubernetes or Docker) so your team shares one deployment. Choose how developers authenticate:
Choose a deployment mode
Mode | When to use | Server setup | Client setup | CircleCI audit trail |
Per-user tokens (recommended) | Teams with SSO-backed Personal API Tokens |
| Each dev forwards their PAT | Per developer |
Shared token (interim) | Quick rollout, single service identity OK |
| No auth header needed | Single shared identity |
Security: Request authentication is on by default in remote mode. The shared-token mode disables it (
REQUIRE_REQUEST_TOKEN=false), making every caller able to act as the server'sCIRCLECI_TOKENidentity with no credentials. Only enable it on a network you fully trust, and prefer per-user tokens otherwise. Terminating TLS at an ingress provides encryption, not authentication.
1. Deploy the server
Both modes use remote HTTP mode (start=remote). Publish port 8000 (or your chosen port).
Per-user tokens (recommended) — accessed via mcp-remote from localhost:
docker run --rm -p 8000:8000 \
-e start=remote \
-e port=8000 \
-e REQUIRE_REQUEST_TOKEN=true \
circleci/mcp-server-circleciPer-user tokens (recommended) — accessed via mcp-remote from a public hostname:
docker run --rm -p 8000:8000 \
-e start=remote \
-e port=8000 \
-e REQUIRE_REQUEST_TOKEN=true \
-e MCP_ALLOWED_HOSTS=my-mcp.example.com \
circleci/mcp-server-circleciShared token (interim) — accessed via mcp-remote from a public hostname:
docker run --rm -p 8000:8000 \
-e start=remote \
-e port=8000 \
-e CIRCLECI_TOKEN=your-shared-circleci-pat \
-e REQUIRE_REQUEST_TOKEN=false \
-e MCP_ALLOWED_HOSTS=my-mcp.example.com \
circleci/mcp-server-circleciEnvironment variables:
Variable | Description |
| Starts the HTTP+SSE MCP server instead of stdio |
| Listening port inside the container (default: |
| Reject requests without |
| Shared fallback PAT for all requests when per-user headers are not sent |
| Optional — required for on-prem only (default: |
| Opt out of usage metrics export |
| Comma-separated list of additional |
| Comma-separated list of additional |
| Network interface to bind to (default: |
| Comma-separated list of additional directories that file-reading/writing tools may use (e.g. |
File output locations (applies to both stdio and remote transports): Tools that accept a filesystem path —
get_build_failure_logs(outputDir),download_usage_api_data(outputDir) andfind_underused_resource_classes(csvFilePath) — may only read and write inside the server's working directory, the user's home directory, and the system temp directory. Within those roots, hidden configuration directories (~/.ssh,~/.aws,~/.config,.git, …),node_modulesand launch-agent directories are rejected, as are symlinks resolving outside the permitted roots. System directories (/etc,/usr,/bin,/System,/Library,%SystemRoot%, …) are refused unconditionally and cannot be re-enabled. Output files are never written through a symlink.If your checkout lives outside those roots —
/workspacein a container,/srv,/opt, a secondary volume such as/Volumes/work— setMCP_FILE_OUTPUT_ROOTSto that directory, otherwise those paths are rejected. For a stdio server the working directory is usually already the project root, so no configuration is needed. This matters most for the remote transport, where the paths come from network clients rather than the local user.
DNS-rebinding protection: The remote transport validates the
Hostheader on every/mcprequest. By default only loopback addresses (localhost,127.0.0.1,[::1]) are accepted. Public deployments must setMCP_ALLOWED_HOSTSto the hostname clients use, or all/mcprequests will receive403 Forbidden. The/pinghealth-check endpoint is not guarded so load-balancer probes continue to work regardless ofHost.The
Originheader (sent by browsers) is also validated when present. Non-browser clients such asmcp-remotenever sendOrigin, so they are unaffected by this check.Behind a reverse proxy: If your proxy rewrites
Hostto the backend address (nginx's default), addproxy_set_header Host $host;to pass the original hostname through, then setMCP_ALLOWED_HOSTSto that public hostname. Alternatively, setMCP_ALLOWED_HOSTSto whatever hostname the proxy does forward.
The server accepts per-request tokens via:
Authorization: Bearer <circleci-pat>Circle-Token: <circleci-pat>
If a client sends a header token, it takes precedence over CIRCLECI_TOKEN on the server.
Telemetry metrics recorded during a request are exported using the same token as that request.
2. Configure clients
Most MCP clients only support local (stdio) processes. Use mcp-remote, a third-party stdio-to-HTTP bridge, to connect them to your remote server.
URL scheme: Use
http://localhost:8000/mcpwith--allow-httpfor local testing. In production, terminate TLS at your ingress/load balancer and usehttps://your-host/mcpwithout--allow-http.
Windows: Avoid spaces around the colon in
--headervalues. Put the fullBearer <token>value in an environment variable.
Security: Examples use
npxfor convenience. For production or team rollouts, pin a specific version in your MCP config (for examplemcp-remote@0.1.38instead ofmcp-remote). Do not use versions below0.1.16(CVE-2025-6514).
Client configuration: per-user tokens
Each developer forwards their own CircleCI Personal API Token on every request:
{
"inputs": [
{
"type": "promptString",
"id": "circleci-token",
"description": "CircleCI API Token",
"password": true
}
],
"mcpServers": {
"circleci-mcp-server-remote": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:8000/mcp",
"--allow-http",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer ${input:circleci-token}"
}
}
}
}Replace http://localhost:8000/mcp with your team's server URL. Cursor and VS Code support ${input:...} prompts; other clients can set AUTH_HEADER directly.
Client configuration: shared token
When the server has CIRCLECI_TOKEN set and is started with REQUIRE_REQUEST_TOKEN=false (request auth is on by default and must be explicitly disabled), clients do not need to send a token:
{
"mcpServers": {
"circleci-mcp-server-remote": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://localhost:8000/mcp",
"--allow-http"
]
}
}
}Claude Desktop and CLI clients
Create a wrapper script (e.g. circleci-remote-mcp.sh):
#!/bin/bash
export AUTH_HEADER="Bearer your-circleci-token"
npx mcp-remote http://localhost:8000/mcp --allow-http --header "Authorization:${AUTH_HEADER}"Make it executable (chmod +x circleci-remote-mcp.sh), then reference it from your MCP config:
{
"mcpServers": {
"circleci-remote-mcp-server": {
"command": "/full/path/to/circleci-remote-mcp.sh"
}
}
}Claude Code
claude mcp add circleci-mcp-server \
-e AUTH_HEADER="Bearer your-circleci-token" \
-- npx mcp-remote http://localhost:8000/mcp --allow-http --header "Authorization:${AUTH_HEADER}"Omit --header and AUTH_HEADER when using a shared-token server.
3. Verify the deployment
# Health check (no auth required)
curl http://localhost:8000/ping
# Should return 401 when REQUIRE_REQUEST_TOKEN=true and no token is sent
curl -s -o /dev/null -w "%{http_code}\n" -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
# Should return 200 with a valid Bearer token and MCP Accept headers
curl -s -o /dev/null -w "%{http_code}\n" -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer your-circleci-pat" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'Demo
Example: "Find the latest failed pipeline on my branch and get logs" — see the wiki for more examples.
https://github.com/user-attachments/assets/3c765985-8827-442a-a8dc-5069e01edb74
Tool Details
Assists with CircleCI configuration tasks by providing guidance and validation.
Validates your
.circleci/config.ymlfor syntax and semantic errorsProvides detailed validation results and configuration recommendations
Example: "Validate my CircleCI config"
Downloads usage data from the CircleCI Usage API for a given organization. Accepts flexible date input (e.g., "March 2025" or "last month"). Cloud-only feature.
Option 1: Start a new export job by providing:
orgId,startDate,endDate(max 32 days),outputDir
Option 2: Check/download an existing export job by providing:
orgId,jobId,outputDir
Returns a CSV file with CircleCI usage data for the specified time frame.
Usage data can be fed into thefind_underused_resource_classes tool for cost optimization analysis.
Identifies flaky tests in your CircleCI project by analyzing test execution history. Leverages the flaky test detection feature in CircleCI.
This tool can be used in three ways:
Using Project Slug (Recommended):
First use
list_followed_projectsto get your projects, then:Example: "Get flaky tests for my-project"
Using CircleCI Project URL:
Example: "Find flaky tests in https://app.circleci.com/pipelines/github/org/repo"
Using Local Project Context:
Works from your local workspace by providing workspace root and git remote URL
Example: "Find flaky tests in my current project"
Output modes:
Text (default): Returns flaky test details in text format
File (requires
FILE_OUTPUT_DIRECTORYenv var): Creates a directory with flaky test details
Analyzes a CircleCI usage data CSV file to find jobs with average or max CPU/RAM usage below a given threshold (default: 40%).
Provide a CSV file obtained from download_usage_api_data.
Returns a markdown list of underused jobs organized by project and workflow — useful for identifying cost optimization opportunities.
Retrieves detailed failure logs from CircleCI builds. This tool can be used in three ways:
Using Project Slug and Branch (Recommended):
First use
list_followed_projectsto get your projects, then:Example: "Get build failures for my-project on the main branch"
Using CircleCI URLs:
Provide a failed job URL or pipeline URL directly
Example: "Get logs from https://app.circleci.com/pipelines/github/org/repo/123"
Using Local Project Context:
Works from your local workspace by providing workspace root, git remote URL, and branch name
Example: "Find the latest failed pipeline on my current branch"
The tool returns formatted logs including:
Job names
Step-by-step execution details
Failure messages and context
Retrieves test metadata for CircleCI jobs, allowing you to analyze test results without leaving your IDE. This tool can be used in three ways:
Using Project Slug and Branch (Recommended):
Example: "Get test results for my-project on the main branch"
Using CircleCI URL:
Job URL:
https://app.circleci.com/pipelines/github/org/repo/123/workflows/abc-def/jobs/789Workflow URL:
https://app.circleci.com/pipelines/github/org/repo/123/workflows/abc-defPipeline URL:
https://app.circleci.com/pipelines/github/org/repo/123
Using Local Project Context:
Works from your local workspace by providing workspace root, git remote URL, and branch name
The tool returns:
Summary of all tests (total, successful, failed)
Detailed info on failed tests: name, class, file, error message, duration
List of successful tests with timing
Filter by test result
Test metadata must be configured in your CircleCI config. SeeCollect Test Data for setup instructions.
Retrieves the status of the latest pipeline for a given branch. This tool can be used in three ways:
Using Project Slug and Branch (Recommended):
Example: "Get the status of the latest pipeline for my-project on the main branch"
Using CircleCI Project URL:
Example: "Get the status of the latest pipeline for https://app.circleci.com/pipelines/github/org/repo"
Using Local Project Context:
Works from your local workspace by providing workspace root, git remote URL, and branch name
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 progressRetrieves the list of artifacts produced by a CircleCI job. This tool can be used in three ways:
Using Project Slug and Branch (Recommended):
First use
list_followed_projectsto get your projects, then:Example: "List artifacts for my-project on the main branch"
Using CircleCI URL:
Job URL:
https://app.circleci.com/pipelines/gh/organization/project/123/workflows/abc-def/jobs/789Workflow URL:
https://app.circleci.com/pipelines/gh/organization/project/123/workflows/abc-defPipeline URL:
https://app.circleci.com/pipelines/gh/organization/project/123
Using Local Project Context:
Works from your local workspace by providing workspace root, git remote URL, and branch name
Useful for:
Finding download URLs for build artifacts (binaries, reports, logs)
Checking what artifacts were produced by a pipeline run
Lists all versions for a specific CircleCI component in an environment. Includes deployment status, commit information, and timestamps.
The tool will prompt you to select the component and environment if not provided.
Useful for:
Identifying which version is currently live
Selecting target versions for rollback operations
Getting deployment details (pipeline, workflow, job)
Lists all projects that the user is following on CircleCI.
Shows all projects you have access to with their
projectSlugExample: "List my CircleCI projects"
Example output:
Projects followed:
1. my-project (projectSlug: gh/organization/my-project)
2. another-project (projectSlug: gh/organization/another-project)TheprojectSlug (not the project name) is required for many other CircleCI tools.
Reruns a workflow from its start or from the failed job.
Returns the ID of the newly-created workflow and a link to monitor it.
Triggers a pipeline to run. This tool can be used in three ways:
Using Project Slug and Branch (Recommended):
Example: "Run the pipeline for my-project on the main branch"
Using CircleCI URL:
Pipeline URL, Workflow URL, Job URL, or Project URL with branch
Example: "Run the pipeline for https://app.circleci.com/pipelines/github/org/repo/123"
Using Local Project Context:
Works from your local workspace by providing workspace root, git remote URL, and branch name
The tool returns a link to monitor the pipeline execution.
Triggers a rollback for a CircleCI project. The tool interactively guides you through:
Project Selection — lists followed projects for you to choose from
Environment Selection — lists available environments (auto-selects if only one)
Component Selection — lists available components (auto-selects if only one)
Version Selection — displays available versions; you select the target for rollback
Rollback Mode Detection — checks if a rollback pipeline is configured
Execute Rollback — two options:
Pipeline Rollback: triggers the rollback pipeline
Workflow Rerun: reruns a previous workflow using its workflow ID
Confirmation — summarizes and confirms before execution
Troubleshooting
Most common issues:
Clear package caches:
npx clear-npx-cache npm cache clean --forceForce latest version: Add
@latestto your config:"args": ["-y", "@circleci/mcp-server-circleci@latest"]Restart your IDE completely (not just reload window)
Invalid token errors: Verify your
CIRCLECI_TOKENin Personal API TokensPermission errors: Ensure the token has read access to your projects
Environment variables not loading: Test with
echo $CIRCLECI_TOKEN(Mac/Linux) orecho %CIRCLECI_TOKEN%(Windows)
Base URL: Confirm
CIRCLECI_BASE_URLishttps://circleci.comCorporate networks: Configure npm proxy settings if behind a firewall
Firewall blocking: Check if security software blocks package downloads
Node.js version: Ensure >= 18.0.0 with
node --versionUpdate Node.js: Consider latest LTS if experiencing compatibility issues
Package manager: Verify npm/pnpm is working:
npm --version
Config file location: Double-check the path for your OS
Syntax errors: Validate JSON syntax in your config file
Console logs: Check the IDE developer console for specific errors
Try a different IDE: Test in another supported editor to isolate the issue
Hanging processes — kill existing MCP processes:
# Mac/Linux:
pkill -f "mcp-server-circleci"
# Windows:
taskkill /f /im node.exePort conflicts: Restart your IDE if the connection seems blocked.
Test package directly:
npx @circleci/mcp-server-circleci@latest --helpVerbose logging:
DEBUG=* npx @circleci/mcp-server-circleci@latestDocker fallback: Try Docker installation if npx fails consistently
Still need help?
Check GitHub Issues for similar problems
Include your OS, Node version, and IDE when reporting issues
Share relevant error messages from the IDE console
Telemetry
The server supports OpenTelemetry metrics for tracking tool usage. Metrics are exported unless you set DISABLE_TELEMETRY=true. On remote deployments, metrics use the same token as the request (per-user PAT or shared server PAT).
Metric | Description |
| Tool invocation count |
| Execution time in ms |
| Error count |
Development
Getting Started
Clone the repository:
git clone https://github.com/CircleCI-Public/mcp-server-circleci.git cd mcp-server-circleciInstall dependencies:
pnpm installBuild the project:
pnpm build
Building Docker Container
You can build the Docker container locally using:
docker build -t circleci:mcp-server-circleci .This will create a Docker image tagged as circleci:mcp-server-circleci that you can use with any MCP client.
Local stdio mode (single developer, token on the client):
docker run --rm -i \
-e CIRCLECI_TOKEN=your-circleci-token \
-e CIRCLECI_BASE_URL=https://circleci.com \
circleci/mcp-server-circleciRemote mode (centralized server for a team): see Self-Managed Remote MCP Server.
Development with MCP Inspector
The easiest way to iterate on the MCP Server is using the MCP inspector. You can learn more about the MCP inspector at https://modelcontextprotocol.io/docs/tools/inspector
Start the development server:
pnpm watch # Keep this running in one terminalIn a separate terminal, launch the inspector:
pnpm inspectorConfigure the environment:
Add your
CIRCLECI_TOKENto the Environment Variables section in the inspector UIThe token needs read access to your CircleCI projects
Optionally set your CircleCI Base URL (defaults to
https://circleci.com)
Testing
Run the test suite:
pnpm testRun tests in watch mode during development:
pnpm test:watch
For more detailed contribution guidelines, see CONTRIBUTING.md
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server for Zuul CI. Debug build failures by asking questions, not clicking through web UIs. Read-only access to any Zuul instance — builds, logs, pipelines, jobs, and live status. Works with Claude Code, Claude Desktop, Cursor, and any MCP-compatible client.Last updated4112Apache 2.0
- Alicense-qualityDmaintenanceMCP server for the Codemagic CI/CD API, enabling app management, build operations, artifact handling, cache control, and team management through natural language.Last updated243MIT
- AlicenseAqualityCmaintenanceA lightweight MCP server that provides seamless access to Codemagic CI/CD APIs, enabling natural language interaction with applications, builds, artifacts, caches, and teams.Last updated1612MIT
- AlicenseAqualityCmaintenanceThis MCP server enables users to manage Codemagic CI/CD builds directly from Claude Code, including listing apps, triggering builds, checking status, and canceling builds.Last updated6MIT
Related MCP Connectors
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/CircleCI-Public/mcp-server-circleci'
If you have feedback or need assistance with the MCP directory API, please join our Discord server