MCP & API

Connect an AI agent

Connect Claude.ai, Claude Desktop, ChatGPT, Claude Code, Cursor or Codex CLI to CiteCue's MCP server, check the connection, revoke it and fix common errors.

6 min read

This page walks through connecting an AI agent to CiteCue's MCP server. Claude.ai, Claude Desktop and ChatGPT sign in with your CiteCue account; Claude Code, Cursor and Codex CLI use an organization API key. Every client uses the same MCP URL, shown on your organization's API & MCP access page:

https://app.citecue.com/api/mcp

Before you start

  • Tool calls need MCP access, included in Optimize, Agency and the active Optimize trial; the page labels it Optimize plan. On Measure or after trial expiry without a subscription, an agent can connect, but every project tool returns a plan_locked error. See MCP server.
  • Claude Code, Cursor and Codex CLI need an organization API key, which only an organization Owner can create. Other members see "ask an owner to create one below". See API keys and limits.

Claude.ai and Claude Desktop

  1. In Claude, go to Settings → Connectors → Add custom connector.
  2. Paste the MCP URL.
  3. Click Connect, then sign in to CiteCue if you're asked to.
  4. On the consent screen, click Allow.

ChatGPT

  1. In ChatGPT, go to Settings → Apps & Connectors → Advanced → Developer mode.
  2. Create a connector and paste the MCP URL.
  3. Approve the CiteCue sign-in when prompted: sign in if asked, then click Allow on the consent screen.

When a client connects by signing in, CiteCue shows a consent screen before it grants any access:

  • The heading reads "Connect" and the client's name, or "Connect an AI client" if the name can't be loaded.
  • The line under it gives the email of the CiteCue account you're signed in as. The connection will act as that account.
  • It will be able to lists what the client asked for. The first item is reading your visibility data (scores, prompts, citations, competitors and fixes) and, on projects you can already edit, running scans and editing prompts, competitors and fix status. If the client also asks to "Stay connected without signing in again", that appears as a second item: it lets the client renew its access without sending you back through sign-in.
  • A note says it cannot delete anything, change billing or manage your team, and that you can revoke it from API & MCP access. The last line names the address you'll return to after you allow.

Click Allow to connect, or Deny to cancel. If allowing fails with "Could not authorize", start the connection again from your AI client.

A signed-in connection acts as you, across every organization you belong to, with your role on each project: any role can read, and changes need project Admin or organization Owner.

Claude Code

Run this, replacing the placeholder after Bearer with your API key:

claude mcp add --transport http citecue https://app.citecue.com/api/mcp --header "Authorization: Bearer <your key>"

Cursor

Add this to .cursor/mcp.json, replacing the placeholder with your API key:

{
  "mcpServers": {
    "citecue": {
      "url": "https://app.citecue.com/api/mcp",
      "headers": { "Authorization": "Bearer <your key>" }
    }
  }
}

Codex CLI

Codex reads the key from an environment variable, so it never sits in the config file. Add this to ~/.codex/config.toml:

[mcp_servers.citecue]
url = "https://app.citecue.com/api/mcp"
bearer_token_env_var = "CITECUE_API_KEY"

Then set that variable to your API key in the environment Codex runs in, for example in your shell profile:

export CITECUE_API_KEY="<your key>"

Custom or other MCP clients

The API & MCP access page gives steps only for the clients above. Any other client has to work with these facts:

Item Requirement
Transport Streamable HTTP, stateless: no session id, and the server never pushes messages to the client.
Method POST only. Any other method gets HTTP 405.
Accept header Must list both application/json and text/event-stream. On protocol versions before 2026-07-28, application/json alone gets HTTP 406.
Body One JSON-RPC message per request, at most 128 KiB. Batches are refused.
Response Plain JSON, or a single-event text/event-stream body that closes at once, depending on the protocol version the client speaks.
Credential An Authorization header using the Bearer scheme, carrying an organization API key or an OAuth access token.
OAuth discovery A request without a credential gets HTTP 401 with a WWW-Authenticate header naming the protected-resource metadata at https://app.citecue.com/.well-known/oauth-protected-resource/api/mcp (also served without the /api/mcp suffix). Authorization-server metadata is at /.well-known/oauth-authorization-server.
Registration Dynamic client registration is open, and public clients without a client secret are accepted.
Scopes mcp, required for tool calls, and offline_access, for refresh tokens.

The server offers tools only: no MCP resources or prompts.

Check it works

Ask your agent:

List my CiteCue projects.

It should call list_projects and name each project with its organization and domain. A project with mcpAccess set to locked belongs to an organization whose plan doesn't include MCP access.

Connected agents and revoking

Connected agents, on API & MCP access, lists the clients you have connected by signing in. Each row shows the client's name ("Unnamed AI client" if it has none), the date it connected and its scopes, such as mcp, offline_access.

You see only your own connections. Other members' connectors aren't listed, so an owner can't revoke them from here.

To disconnect a client:

  1. Click Revoke on its row.
  2. The dialog "Revoke this connection?" explains that the client will immediately lose access to your CiteCue data, and that it can reconnect any time, which asks you to Allow again.
  3. Click Revoke to confirm.

The client's next request fails. API keys aren't listed here: to cut off Claude Code, Cursor or Codex CLI, revoke its key in the API keys list.

Troubleshooting

What you see Likely cause What to do
HTTP 401 "Unauthorized" No credential; a mistyped or revoked API key; a site-plugin key; a revoked or expired connection; or a token issued for a different CiteCue address than the MCP URL you're calling. The response doesn't say which. Check the Authorization header and the URL. Paste the key again or create a new one; reconnect a signed-in client.
plan_locked error The organization's plan doesn't include MCP access. Upgrade from the error's upgradeUrl, or compare plans on the pricing page.
forbidden "Insufficient role" Your role on the project is Member. Ask a project Admin or the organization Owner to make the change, or to change your role.
not_found "Project not found" The projectId is wrong, or you can't see that project. Call list_projects again and use an id from it.
HTTP 429 "Too many requests" More than the per-minute request limit. Wait a minute; the response says retry-after: 60. See API keys and limits.
HTTP 406 A custom client didn't send text/event-stream in its Accept header. Send both application/json and text/event-stream.

Next steps