---
title: "Connecting to the CircleCI CLI MCP"
description: "Enable the CircleCI CLI's built-in MCP server so AI coding assistants like Claude, Cursor, and VS Code can inspect your CI runs locally."
doc_version: "unversioned"
last_updated: "2026-07-27"
---

> For the complete documentation index, see [llms.txt](https://circleci.com/docs/llms.txt)

# Connecting to the CircleCI CLI MCP

The CircleCI CLI includes a built-in MCP server that runs locally on your machine, using your existing CLI authentication. For a comparison with CircleCI’s hosted MCP server, see the [Hosted and CLI MCP Comparison](https://circleci.com/docs/guides/toolkit/circleci-mcp-overview/#hosted-vs-cli-mcp) section of the CircleCI MCP overview page.

## Prerequisites

*   The CircleCI CLI installed. See the [CircleCI CLI](https://circleci.com/docs/guides/toolkit/circleci-cli/) page for installation instructions.
    
*   An authenticated CLI session. Run `circleci auth login`, or set the `CIRCLE_TOKEN` environment variable.
    

## Enable the CLI MCP

Enable the MCP server for your AI assistant with one command:

```shell
circleci mcp claude enable    # Claude Desktop
circleci mcp cursor enable    # Cursor
circleci mcp vscode enable    # VS Code
```

To disable it, replace `enable` with `disable`.

You can also start the server manually, or stream it over HTTP instead of the default stdio transport:

```shell
circleci mcp start     # start over stdio
circleci mcp stream    # stream over HTTP
```

## Try it out

Once enabled, ask your AI assistant something like:

*   `What failed on my last run?`
    
*   `Validate my CircleCI config.`
    
*   `List the environment variables set on this project.`
    
*   `Create and publish a new orb version.`
    
*   `Show me the resource classes for my self-hosted runners.`
    
*   `Purge the Docker Layer Cache for this project.`
    

## Next steps

*   [CircleCI MCP Overview](https://circleci.com/docs/guides/toolkit/circleci-mcp-overview/), for how the CLI MCP compares to the hosted server, best practices, and troubleshooting.
    
*   [Connecting to the Hosted CircleCI MCP](https://circleci.com/docs/guides/toolkit/connecting-to-the-circleci-mcp-server/), for the hosted alternative.
    
*   [CircleCI CLI reference: MCP](https://cli.circleci.com/reference/#circleci-mcp), for the full command reference.