Connector guide8-minute read22 MCP tools7 languages

How to Connect CircleCI to Gemini via MCP

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

HCBy HelpCode teamUpdated 8 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

CircleCI

CircleCI

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

tools

22

Region

INTL

Category

Infrastructure

Authentication

API Key

Required env vars

CIRCLECI_TOKEN
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the CircleCI in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

Try asking

Example prompts for CircleCI

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

CircleCI · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → CircleCI, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

CircleCI + Gemini

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

CIRCLECI_TOKEN

Step 1 — Get credentials

  1. Sign in to CircleCI at https://app.circleci.com and open User Settings → Personal API Tokens (https://app.circleci.com/settings/user/tokens).
  2. Click Create New Token, give it a name and copy it. Newer tokens start with CCIPAT_. Project API tokens from the project settings do not work with API v2.
  3. Paste the token into CIRCLECI_TOKEN as it is, without a prefix, and install the connector. It is sent in the Circle-Token header to circleci.com only.
  4. Check the setup with circleci_get_current_user, then circleci_list_collaborations to see the organizations you belong to.

Who sees what: the token has the same rights as your CircleCI user in every organization you belong to. Share the MCP server only with people who may see those builds.

Project slugs: most tools need the project slug shown in Project Settings → Overview. GitHub OAuth and Bitbucket Cloud projects use gh/<org>/<repo> or bb/<workspace>/<repo> (for example gh/acme/web-app); GitHub App and GitLab projects use circleci/<organization id>/<project id>. Pass the slug with its slashes as it is.

Starts builds and stops running work, so the AI asks first: circleci_trigger_pipeline starts a new pipeline on a branch or tag. It needs a definition id from circleci_list_pipeline_definitions, which in turn needs the project id from circleci_get_project, and it is not available for GitLab projects. circleci_rerun_workflow reruns a workflow as a new workflow: all jobs, only from the failed job onward, or the jobs you choose. circleci_cancel_workflow stops a running workflow, and jobs that have not started will not run. Starting and rerunning use credits and run whatever the config does, deploy jobs included; cancelling can leave a deployment half done. Before each of them the AI tells you the project, branch, workflow or jobs and waits for your yes. No tool is switched off at install, and nothing here deletes projects, contexts or variables.

Finding out why a build failed: circleci_list_pipelines (newest first, optionally for one branch), circleci_get_pipeline by id or circleci_get_pipeline_by_number for the #number in the app; then circleci_list_pipeline_workflows and circleci_list_workflow_jobs to find the failed job and its job number. circleci_get_job gives status, duration, executor, contexts used and the web link. circleci_list_job_tests counts passed, skipped and failed tests and shows every failed test with its message (only for jobs that store test results). circleci_list_job_artifacts lists the stored artifacts with download links, which need the same token. Full step logs are only in the CircleCI app, through the job's web_url.

Trends and flaky tests: circleci_get_workflow_metrics summarizes every workflow of a project over a window from the last 24 hours up to the last 90 days (runs, success rate, duration, credits used, time to recovery), for one branch or all branches. circleci_get_workflow_summary shows one workflow over the last 90 days with its trend against the previous period. circleci_list_flaky_tests lists tests that passed and failed on the same commit, with how often they flaked and the time they wasted. Insights data is refreshed daily, not in real time.

Contexts and variables: circleci_list_contexts needs the organization id from circleci_list_collaborations (or an organization slug such as gh/acme for GitHub OAuth and Bitbucket organizations). circleci_list_context_env_var_names and circleci_list_project_env_var_names return only the names of environment variables, never their values.

Pagination: lists return next_page_token; the AI passes it back as page_token until it is empty.

Common errors: 401: the token is wrong or revoked, or it is a project API token; create a personal API token under User Settings. 404: the project slug is wrong or your user cannot see the project; CircleCI answers 404 rather than 403 for projects outside your access. 429: the rate limit is reached; wait a minute and retry.

The connector does not cover approving held jobs, creating or deleting projects, contexts, environment variables, schedules and webhooks, or reading full job step logs.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Gemini

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart gemini.
  3. Run /mcp inside Gemini CLI (or gemini mcp list in your shell): anythingmcp should show as connected.
  4. Start prompting: Gemini CLI can now call the CircleCI tools.

Available tools

ToolWhat it does
circleci_get_current_userGet the CircleCI user the personal API token belongs to: id, login and name
circleci_list_collaborationsList the organizations the user belongs to: id, name, VCS type and slug (e.g. gh/acme, or circleci/<org-id> for GitHub App and GitLab…
circleci_get_projectGet a project by slug: name, project id, organization name, slug and id, and the connected repository URL and default branch
circleci_list_pipeline_definitionsList the pipeline definitions of a project: id, name, description and where the config and code come from
circleci_list_pipelinesList the pipelines of a project, newest first: id, number, state, branch or tag, commit, trigger, actor, time and setup errors
circleci_get_pipelineGet one pipeline by id: number, state, branch or tag, commit, trigger, actor, time and setup errors
circleci_get_pipeline_by_numberGet one pipeline of a project by its number (the #123 shown in the CircleCI app)
circleci_list_pipeline_workflowsList the workflows of a pipeline: id, name, status (success, running, failed, on_hold, canceled ...), start and stop time and who started…
circleci_get_workflowGet one workflow by id: name, status, pipeline id and number, project, start and stop time, and who started, canceled or errored it
circleci_list_workflow_jobsList the jobs of a workflow: id, job number, name, type (build or approval), status, dependencies, start and stop time
circleci_get_jobGet the details of a job by project and job number: name, status, duration, executor and resource class, parallelism and per-run status…
circleci_list_job_testsSummarize the test results a job uploaded with store_test_results: how many passed, were skipped and failed, and for every failed test its…
circleci_list_job_artifactsList the artifacts a job stored with store_artifacts: path, node index and download URL
circleci_get_workflow_metricsInsights summary for every workflow of a project over a reporting window (default last 90 days): runs, success rate, failed runs, duration…
circleci_get_workflow_summaryInsights for one workflow: metrics for the last 90 days (runs, success rate, duration, credits, time to recovery) and their trend against…
circleci_list_flaky_testsList the project's flaky tests (tests that passed and failed on the same commit): test name, class, file, job and workflow, how often it…
circleci_trigger_pipelineStart a new pipeline for a project from a pipeline definition, on a branch or tag
circleci_rerun_workflowRerun a workflow as a new workflow: all jobs, only from the failed job (from_failed), or chosen jobs
circleci_cancel_workflowCancel a running workflow; its running jobs stop and jobs not yet started will not run, which can leave a deployment half done
circleci_list_contextsList the contexts (shared sets of environment variables) of an organization: id, name and creation time
circleci_list_context_env_var_namesList the names of the environment variables in a context, with created and updated time
circleci_list_project_env_var_namesList the names of a project's environment variables (Project Settings > Environment Variables) with their creation time

Example prompts

  • "Why did the last pipeline on main in gh/acme/web-app fail? Show me the failed job, the failing tests with their messages and the link to the job."
  • "Which tests in gh/acme/web-app are flaky, how often did they flake and how much time did they waste?"
  • "Compare all workflows of gh/acme/web-app over the last 30 days on all branches: success rate, average duration and credits used."
  • "Rerun the deploy workflow of pipeline #1482 from the failed job. Tell me which jobs will run again and ask me before you start it."
  • "Start a pipeline on the release/2.4 branch with the parameter deploy set to true. Show me the project, branch and parameters first."

FAQ

Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.

Next steps

Was this guide helpful?

Your CircleCI agent is one click away.

Install the connector, paste the key, prompt Gemini. Free for 7 days, no credit card.

Related guides

Connectors

CircleCI to MCP: Pipelines, Failed Tests and Reruns in any AI Agent

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

Connectors

How to Connect CircleCI to ChatGPT via MCP

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

Connectors

How to Connect CircleCI to Claude via MCP

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

Connectors

How to Connect CircleCI to Cursor via MCP

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

Connectors

How to Connect CircleCI to Meta Muse via MCP

Let your AI check CircleCI: pipelines, workflows and jobs, failed tests and artifacts, Insights metrics and flaky tests, contexts and variable names, and start pipelines or rerun and cancel workflows after you confirm.

Connectors

How to Connect Avito to Gemini via MCP

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.