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

# Connect a client

> Wire up Claude Desktop, Cursor, Windsurf, or any MCP client to your Ontora workspace.

The MCP server lives at `https://api.ontora.com/mcp/`. Authentication is a workspace API key with the `mcp` scope, sent as a Bearer token.

<Steps>
  <Step title="Create an API key with the mcp scope">
    From the dashboard or via the API:

    ```bash theme={null}
    curl -X POST https://api.ontora.com/v1/api-keys \
      -H "Authorization: Bearer $CLERK_JWT" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "Claude Desktop",
        "workspace_id": "ws_...",
        "scopes": ["mcp", "interviews", "exports", "webhooks"]
      }'
    ```

    Copy the returned `key` — you'll only see it once.
  </Step>

  <Step title="Configure your client">
    Use the snippet for your client below.
  </Step>

  <Step title="Verify the connection">
    Ask the agent to "list my Ontora campaigns". If it returns your workspace's campaigns, you're done.
  </Step>
</Steps>

## Claude Desktop

Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or the equivalent on your platform:

```json theme={null}
{
  "mcpServers": {
    "ontora": {
      "url": "https://api.ontora.com/mcp/",
      "headers": {
        "Authorization": "Bearer ont_live_..."
      }
    }
  }
}
```

Restart Claude Desktop. The Ontora tools appear under the tools menu.

## Cursor

Add to `~/.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "ontora": {
      "url": "https://api.ontora.com/mcp/",
      "headers": {
        "Authorization": "Bearer ont_live_..."
      }
    }
  }
}
```

## Claude Code (CLI)

```bash theme={null}
claude mcp add ontora https://api.ontora.com/mcp/ \
  --header "Authorization: Bearer ont_live_..."
```

## Windsurf

Add an MCP server in **Settings → Cascade → MCP servers** with:

* URL: `https://api.ontora.com/mcp/`
* Auth header: `Authorization: Bearer ont_live_...`

## Other clients

Any client that speaks the [Model Context Protocol](https://modelcontextprotocol.io) spec over HTTP/SSE can connect — just point it at `https://api.ontora.com/mcp/` with the Bearer header.

## Troubleshooting

| Symptom                   | Cause                                                                          |
| ------------------------- | ------------------------------------------------------------------------------ |
| `401 Unauthorized`        | Key missing, malformed, or revoked                                             |
| `403 Forbidden` on a tool | Key lacks the scope that tool requires (e.g., `interviews`)                    |
| Tools list but calls fail | Often a workspace mismatch — verify the key was created in the right workspace |
