Skip to main content
Developer ToolsPublisher: CircleCI
Route CircleCI MCP traffic through Formal to control and log what AI agents do in CircleCI:
  • Block risky tools, such as cancel_workflow.
  • Mask sensitive data in tool results, such as secrets and API keys in get_build_failure_logs responses.
  • Keep credentials at the Connector, so users and agents never see CircleCI tokens.
  • Log every tool call with the user, the MCP client and its parameters.

0. Prepare your Connector

The Connector needs an MCP listener and a hostname with wildcard DNS and TLS. Set them up once by following Deploy the Connector. Every MCP server reuses them.

1. Add CircleCI MCP server to your Resources

  1. Open the Admin Catalog and click Add MCP.
  2. Select the CircleCI template.
  3. Enter a DNS-label Name, such as circleci.
  4. Choose the Space containing your Connector, such as default.
  5. Configure upstream authentication as described below, then save.
If no Connector is in the selected Space, the Configuration tab shows MCP clients can’t connect directly yet. The reason reads: No Connector is in this server's Space.

2. Setup Authentication

Each user links their own CircleCI account once in the Employee Catalog, and the Connector sends that user’s token to CircleCI.

Linked Accounts selected under How does Formal authenticate to this resource?CircleCI only registers OAuth clients with loopback redirect URIs, so it can’t use Formal’s Redirect URI.Linked Accounts isn’t available for CircleCI. Use Shared Credentials instead.

3. Route Endpoint traffic

Auth is managed at the Connector level when you use Linked Accounts or Shared Credentials, so the Endpoint needs to forward the MCP traffic to it. Laptops and VMs with the Formal Endpoint keep using https://mcp.circleci.com/v1/mcp, and a network rule sends that traffic to the Connector.
  1. Go to Network Rules and create a rule named circleci-mcp.
  2. Paste this expression, set the rule to Active, then save:
The rule matches known agents only. See Identity headers.Cloud agents such as Claude, ChatGPT and Cursor Cloud Agents don’t run the Endpoint. Point them at this server’s Connector address, https://circleci.<connector-hostname>/mcp. Find it in the Admin Catalog: open CircleCI, then copy Connector address on the Configuration tab.

4. Create policies

Tools

The Admin Catalog lists these tools for CircleCI:

Policies examples

This policy blocks the tools that change data, so agents can only read CircleCI.
See MCP resources for the input.mcp fields and Rewrite Action for body rewrites.

5. Check the logs

Open Logs and search for resource.name:circleci. Each CircleCI tool call is one request log with the user, the MCP client and the tool. Open a log to see its tool parameters and the policies it triggered. A blocked write shows the block policy and its message. A masked search shows the rewrite policy.See Logs for search syntax and filters.

Troubleshooting

The agent relays: Formal has no current circleci sign-in for you. Link or re-link your circleci account in Formal…Cause: The user never linked CircleCI, or the token expired and couldn’t be refreshed.Fix: Open the server in the Employee Catalog and link CircleCI again.
The agent relays: circleci rejected your credentials. Link or re-link your circleci account in Formal…Cause: CircleCI no longer accepts the linked token, for example after the user revoked access in CircleCI.Fix: Link CircleCI again from the Employee Catalog.With Shared Credentials, the message asks the user to contact an administrator. Replace the token in the server’s Shared Credentials.
Cause: The Endpoint isn’t running, or the network rule doesn’t match the client.Fix: Check the Endpoint is connected. The rule above only matches known agents. Other clients, such as a browser, reach CircleCI directly unless the rule also matches them. See Network rules.
Cause: The Configuration tab lists the reason, most often No Connector is in this server's Space.Fix: Edit the server and choose the Space containing its Connector.

Next Steps

MCP Gateway

Configure Connector routing and downstream access

All MCP servers

Browse every MCP server template