> For the complete documentation index, see [llms.txt](https://resolvedmarkets.com/llms.txt). Every docs page is also served as Markdown: append `.md` to its URL or send `Accept: text/markdown`.

## MCP Server

Connect Claude, GPT, or any MCP-compatible agent to live Resolved Markets data. The server exposes orderbooks, snapshots, market metadata, settlement results, trades and Hyperliquid perps as MCP tools. Tier limits are enforced server-side against your account.

### 1. Claude.ai (one-click OAuth)

In claude.ai, open Customize → Connectors, add a custom connector, and paste the remote MCP server URL `https://mcp.resolvedmarkets.com/mcp`. Leave the OAuth client ID and secret empty; dynamic registration handles them. Sign in to Resolved Markets and allow access. The key minted for Claude shows in /api-keys as "Claude · MCP" and can be revoked there.

### 2. Hosted endpoint with an API key

Connect any MCP client to `https://mcp.resolvedmarkets.com/mcp` and send your key in the `X-API-Key` header. For Claude Desktop or Claude Code, bridge with mcp-remote:

```json
{
  "mcpServers": {
    "resolvedmarkets": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://mcp.resolvedmarkets.com/mcp",
        "--header", "X-API-Key: rm_your_api_key_here"
      ]
    }
  }
}
```

### 3. Self-hosted (stdio)

```bash
claude mcp add resolvedmarkets -- npx -y @elcara-hq/resolvedmarkets-mcp
export HF_API_KEY=rm_your_api_key_here
```

Set `HF_API_URL=https://api.resolvedmarkets.com` and `HF_API_KEY`. Transports: stdio (default) or HTTP (`MCP_TRANSPORT=http MCP_PORT=3002`).

### Recommended call patterns

- Discover what is available: `list_categories` → `list_markets`.
- Live state of a known market: `get_market` (slug → conditionId) → `get_orderbook`.
- Historical analysis of one market: `get_market_summary` → `query_snapshots` (paginated time series).
- How a market settled: `get_market_metadata` (`resolved_outcome` / `outcome_prices`).
- Executed volume: `get_trades`.
- Point-in-time state: `get_snapshot` (searches up to 1h before the timestamp).
- Polymarket vs. Hyperliquid perps: `get_orderbook` + `get_exchange_orderbook` (Scale+).

Slugs rotate as new windows open and resolve only to active markets. The conditionId is stable for a market's whole lifetime, so pass a slug through `get_market` first.

### Tools (14)

`list_categories`, `list_markets`, `list_historical_markets`, `get_market`, `get_market_metadata`, `get_orderbook`, `get_market_summary`, `get_snapshot`, `get_latest_snapshots`, `query_snapshots`, `get_trades`, `get_exchange_orderbook`, `get_exchange_snapshots`, `get_system_stats`.

### Resources (3)

`markets://live`, `prices://latest`, `reference://catalog`.
