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

# MCP

> Connect your AI tool to the Radion MCP server.

The MCP server lets your AI agent talk to Radion through tools. Connect it to Claude Code, Codex, Cursor, VS Code, or any MCP-compatible tool. Each tool maps to one Radion REST endpoint, so your agent can read on-chain Polymarket data — markets, traders, events, search, and the orderbook — without writing any HTTP code.

## Endpoint

```text theme={null}
https://mcp.radion.app/mcp
```

## Authentication

Every request needs an API key. Send it in the `X-API-Key` header (or as an `Authorization: Bearer` token).

If your client can't set custom headers (for example, Claude Cowork), pass the key as an `api_key` query string instead:

```text theme={null}
https://mcp.radion.app/mcp?api_key=YOUR_API_KEY
```

Use the header when your client supports it. Keys in URLs can leak through proxies and client history, so rotate any key you put in a query string if it may have been seen.

[Get an API key from the dashboard](https://radion.app/dashboard).

## Setup

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http "Radion" "https://mcp.radion.app/mcp" \
      --header "X-API-Key: YOUR_API_KEY"
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    export RADION_API_KEY=your_api_key
    codex mcp add "Radion" --url "https://mcp.radion.app/mcp" --bearer-token-env-var RADION_API_KEY
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):

    ```json theme={null}
    {
      "mcpServers": {
        "Radion": {
          "url": "https://mcp.radion.app/mcp",
          "headers": {
            "X-API-Key": "${env:RADION_API_KEY}"
          }
        }
      }
    }
    ```

    Set the env var in your shell profile: `export RADION_API_KEY=your_api_key`
  </Tab>

  <Tab title="VS Code">
    Add to `.vscode/mcp.json`:

    ```json theme={null}
    {
      "servers": {
        "Radion": {
          "type": "http",
          "url": "https://mcp.radion.app/mcp",
          "headers": {
            "X-API-Key": "${input:radionApiKey}"
          }
        }
      }
    }
    ```

    VS Code will ask for the key the first time you use it.
  </Tab>

  <Tab title="Claude Cowork">
    Claude Cowork can't set custom headers, so put the key in the URL:

    ```text theme={null}
    https://mcp.radion.app/mcp?api_key=YOUR_API_KEY
    ```
  </Tab>
</Tabs>

## Available tools

Each tool returns the same JSON as the matching REST endpoint.

### Events and search

| Tool           | What it does                                                  |
| -------------- | ------------------------------------------------------------- |
| `list_events`  | List events (groups of related markets). Pages with a cursor. |
| `get_event`    | Get one event by its numeric id or slug.                      |
| `list_markets` | List markets. Pages with a cursor.                            |
| `get_market`   | Get one market by its condition id or slug.                   |
| `search`       | Search Polymarket markets, topics, and profiles by text.      |

### Orderbook

| Tool                   | What it does                                                   |
| ---------------------- | -------------------------------------------------------------- |
| `get_orderbook`        | Get the full orderbook depth (bids and asks) for a `token_id`. |
| `get_midpoint`         | Get the midpoint price (between best bid and ask) for a token. |
| `get_spread`           | Get the bid-ask spread for a token.                            |
| `get_price`            | Get the best bid or ask price for a token (`side` = buy/sell). |
| `get_last_trade_price` | Get the last executed trade price for a token.                 |

### Health

| Tool     | What it does                        |
| -------- | ----------------------------------- |
| `health` | Check whether the MCP server is up. |

## Example prompts

Once connected, try these in your AI tool:

* *"List the top 10 Polymarket markets by volume."*
* *"What is the PnL for trader 0x1234…?"*
* *"Search Polymarket for markets about the election."*
* *"Show the most recent trades for this market slug."*
* *"Who is on the Polymarket profit leaderboard right now?"*

## Rate limits and plans

Rate limits match the [REST API rate limits](/api/rate-limits). Your API key plan applies.
