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

# Client setup

> Configure Sagepilot MCP in MCP-compatible clients.

## Hosted OAuth

For ChatGPT, Claude, and other hosted MCP clients, paste the MCP URL from **Settings -> API Details -> MCP connector** and complete the Sagepilot sign-in flow.

See [Hosted connectors](/mcp/hosted-connectors) for the full OAuth flow.

### Codex CLI

```bash theme={null}
SAGEPILOT_MCP_URL="https://app.sagepilot.ai/mcp"

codex mcp add sagepilot \
  --url "$SAGEPILOT_MCP_URL" \
  --oauth-resource "$SAGEPILOT_MCP_URL"

codex mcp login sagepilot
```

## API-token MCP configuration

Use this in any MCP client that supports remote Streamable HTTP servers and custom headers but cannot complete browser-based OAuth:

```json theme={null}
{
  "mcpServers": {
    "sagepilot": {
      "url": "https://app.sagepilot.ai/mcp",
      "headers": {
        "Authorization": "Bearer sp_your_token"
      }
    }
  }
}
```

For EU-hosted workspaces, replace the URL with `https://eu.sagepilot.ai/mcp`.

## Claude Code

If you are using an API client token in Claude Code:

```bash theme={null}
claude mcp add --transport http sagepilot https://app.sagepilot.ai/mcp \
  --header "Authorization: Bearer sp_your_token"
```

Then run `/mcp` in Claude Code and confirm Sagepilot is connected.

## Cursor

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

```json theme={null}
{
  "mcpServers": {
    "sagepilot": {
      "url": "https://app.sagepilot.ai/mcp",
      "headers": {
        "Authorization": "Bearer sp_your_token"
      }
    }
  }
}
```

Then open **Cursor Settings -> Tools & MCP** and enable or refresh Sagepilot.
