> ## Documentation Index
> Fetch the complete documentation index at: https://docs.operata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Claude to the Operata MCP server

> Add the Operata MCP Server to Claude Desktop, Claude Code, or the Claude API so Claude can query your live Operata data over the Model Context Protocol.

Connect a Claude client to the Operata MCP Server so Claude can query your real Operata data. For example, you can ask "how many traces in the last 30 days" and Claude answers directly from your account.

## Before you start

* An [Operata account](https://app.operata.io) with admin permissions to mint API tokens.
* An Operata API token scoped to the account you want Claude to query. See [Authentication](/docs/api-authentication).
* A Claude client — Claude Desktop, Claude Code, or the Claude API — installed and signed in.

## Steps

### 1. Mint an MCP-dedicated API token

Sign in to the Operata console, open **Settings → Config → API**, and create a new token. Name it after the client — for example `MCP — Claude Desktop` — so you can revoke it independently of other tokens. Copy the value; the console does not show it again.

### 2. Add the Operata MCP server to your Claude client

**Claude Desktop**

Open the Claude Desktop configuration file:

* macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
* Windows: `%APPDATA%\Claude\claude_desktop_config.json`

Add the Operata MCP server to the `mcpServers` object:

```json theme={null}
{
  "mcpServers": {
    "operata": {
      "command": "npx",
      "args": [
        "mcp-remote@latest",
        "https://api.operata.io/v1/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "AUTH_HEADER": "Bearer $OPERATA_API_TOKEN"
      }
    }
  }
}
```

Replace `$OPERATA_API_TOKEN` with the token from step 1. Restart Claude Desktop.

**Claude Code**

From the project root, register the server with the Claude Code CLI:

```bash theme={null}
claude mcp add operata \
  --transport http \
  --url https://api.operata.io/v1/mcp \
  --header "Authorization: Bearer $OPERATA_API_TOKEN"
```

**Claude API**

Pass the Operata MCP server in the `mcp_servers` field of the request body. See Anthropic's [MCP connector documentation](https://docs.claude.com/en/docs/agents-and-tools/mcp-connector) for the request shape.

### 3. Ask Claude a question that uses Operata data

Start a new conversation in Claude and ask something that requires Operata data. For example:

> How many traces have been recorded in my Operata account in the last 30 days?

Claude calls the appropriate Operata MCP tool — `traces_query` for an aggregate like this, or `knowledge` for a concept question — and cites the tool invocation in the response.

## Result

The Claude client lists `operata` under available tools. A question that requires Operata data triggers a call to one of the Operata tools — for example `traces_query` or `knowledge` — and the response contains a real number from your account, not a placeholder. A `401` in the tool-call trace means the API token is wrong or revoked.

For the full tool surface — `get_schema`, `traces_list`, `traces_query`, `traces_get`, `traces_span_insights`, `traces_span_logs`, and `knowledge` — see [Operata MCP server tools](/docs/guides-mcp-tools).

## Related

* [Connect Cursor to the Operata MCP server](/docs/guides-mcp-cursor) — the same MCP server, configured for Cursor.
* [Connect ChatGPT to the Operata MCP server](/docs/guides-mcp-chatgpt) — the ChatGPT integration roadmap.
* [Operata MCP server tools](/docs/guides-mcp-tools) — the full tool reference with parameters and examples.
* [Authentication](/docs/api-authentication) — the same Operata API tokens authenticate the MCP server.
* [Rate limits](/docs/api-rate-limits) — the MCP server is subject to the standard 100 requests per minute per token.
