Skip to main content

Connect your AI tool to Cortega

How to let Claude, Cursor or Claude Code read your Cortega documentation, traffic logs and configuration.

Overview​

Cortega has one MCP server for your tenant, called assist. Once your AI tool is connected, you can ask it questions such as "why am I getting 429s?", "which models cost the most this week?" or "list my guardrails".

The server is read-only. It cannot create, change or delete anything.

Configuration and log reads use your permissions and your tenant. Sensitive fields are hidden the same way they are for you, and if you cannot open a page in the console, your tool cannot read it. The traffic summaries are scoped to your tenant and are not filtered by your individual permissions, so give the connection only to people who may see tenant-wide traffic totals.

What it can do​

AreaExamples
Documentation and troubleshootingExplain a Cortega concept, look up an error code, walk through a symptom, check a gateway config
Traffic summariesRequest volume, error rate, latency, spend, recent failures, guardrail activity, MCP tool calls
Configuration and logsProviders, models, teams, budgets, guardrails, MCP servers, gateways, users, request logs, audit log

Ask your tool to "list the Cortega config resources" to see the full set.

Connect​

You need a Cortega user who is allowed to create API keys (the System → API Access permission). The connection creates one key in your name.

Open the page Connect AI tool in the console to see the address and these steps. Tools that run in a vendor's cloud, such as Claude on the web, need the console on a public https hostname that the internet can reach. Open the console by that hostname before you copy the address.

Claude Code​

claude mcp add --scope user --transport http cortega https://<your-console-host>/api/v1/mcp/assist

The --scope user option makes the server available in every folder. Without it, Claude Code saves it only for the folder where you ran the command, and claude started anywhere else will not list it. Start Claude Code and run /mcp. Choose cortega, then Authenticate. Your browser opens the Cortega console.

Claude, Cursor and other tools​

Add a remote MCP server with this URL:

https://<your-console-host>/api/v1/mcp/assist

Use the same host you use to open the console. When the tool asks to sign in, your browser opens the console.

Approve the connection​

  1. If you are not signed in to the console, sign in.
  2. The page shows the name of the tool and what it will be able to read.
  3. Select Approve.
  4. The browser returns to your tool. It is connected.

Select Deny to cancel. Nothing is created.

How long it lasts​

The connection lasts 90 days. After that your tool asks you to approve again.

See and revoke connections​

Go to System → API Access. Each connection appears as a key named after the tool, for example "Claude Code (MCP connection)", with its scope assist:read and expiry date. Revoke the key to disconnect the tool at once. Suspending your user also stops configuration reads.

Connect with a key instead​

If your tool cannot open a browser, create the key yourself.

  1. Go to System → API Access and create a key with the scope assist:read.
  2. Copy it. It is shown once.
  3. Give it to your tool as a bearer token:
claude mcp add --scope user --transport http cortega https://<your-console-host>/api/v1/mcp/assist \
--header "Authorization: Bearer <your key>"

A key you create reads configuration with your own permissions, the same as an approved connection.

Troubleshooting​

SymptomCause and fix
The tool says 401 or asks to sign in againThe key expired or was revoked. Connect again.
Approval page says the request is not validThe tool's request was incomplete or old. Start the connection again from the tool.
You see no Approve button, or an access errorYour user lacks the API Access permission. Ask an administrator.
A configuration read returns "403"You lack the console permission for that area. The tool has no more access than you.
Documentation tools say the knowledge service is not configuredYour administrator has not set the Cortega Assist service address for this install. Traffic and configuration tools still work.
A log read says the result was truncatedAsk for a narrower window or a smaller limit.