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

# Claude MCP setup

> Connect Claude Code to the hosted 0xArchive MCP server over HTTP with your API key, so Claude can call typed market-data tools directly.

This is the Claude-specific path for the 0xArchive MCP server: where to connect, what tools appear, and how to keep your API key out of chat. For the full reference, see [MCP server](/mcp-server).

The server is hosted at `https://mcp.0xarchive.io/mcp`. Claude Code connects over HTTP with your API key as a bearer token. Nothing runs locally.

## Claude Code recipe

<Steps>
  <Step title="Store the API key">
    Keep the key in the shell or secret store Claude Code reads.

    ```bash theme={"theme":"github-dark"}
    export OXARCHIVE_API_KEY="0xa_your_api_key"
    ```
  </Step>

  <Step title="Add the MCP server">
    Register the hosted endpoint with the HTTP transport.

    ```bash theme={"theme":"github-dark"}
    claude mcp add --transport http 0xarchive \
      https://mcp.0xarchive.io/mcp \
      --header "Authorization: Bearer $OXARCHIVE_API_KEY"
    ```
  </Step>

  <Step title="Ask for one bounded call">
    Start with one venue family, one symbol, one data family, and one small window. Ask Claude to name the route before it calls a tool.
  </Step>
</Steps>

## What Claude should know

| Rule                                     | Why                                                            |
| ---------------------------------------- | -------------------------------------------------------------- |
| MCP is a tool surface, not the agent     | Keeps setup language from treating the server as the host      |
| OpenAPI stays the route map              | Prevents invented endpoint names                               |
| Venue family comes first                 | Prevents core, Spot, HIP-3, HIP-4, and Lighter mixups          |
| Data-quality checks gate downstream jobs | Keeps stale data out of backtests, alerts, exports, and models |
| Request IDs should be preserved          | Makes failures supportable and auditable                       |

## Task checklist

After the server is connected, give Claude a narrow tool-calling checklist.

| Field             | Example                                                                                |
| ----------------- | -------------------------------------------------------------------------------------- |
| Venue family      | Hyperliquid core, Spot, HIP-3, HIP-4, or Lighter                                       |
| Symbol and window | `BTC` for the last hour, `km:US500` for one bounded HIP-3 request, or `HYPE-USDC` Spot |
| Tool goal         | Summary, candles, funding, freshness, coverage, incidents, or route validation         |
| Quality rule      | Include request ID, freshness state, coverage, or incident context when available      |
| Stop rule         | Ask before account, key, or billing tools, exports, broad loops, or unsupported venues |

If Claude cannot call a named 0xArchive tool, fix the connection before asking it to analyze data. If it can call tools but cannot name the venue family, keep the task in clarification mode.

## Use another surface when

Use [CLI](/cli) if the job is a shell command or CI task. Use [Skill](/skill) if the Claude environment uses local `SKILL.md` workflows instead of MCP tools. Use [OpenAPI](/openapi) and [SDKs](/sdks) for generated application code. Use [REST API](/rest-api) when you need raw HTTP behavior.

## Security

Do not paste real API keys into prompts or checked-in MCP config. Pass the bearer token through Claude Code's environment or secret store. Account, key, and billing tools change account state, so keep them behind explicit approval.

<div className="oxa-growth-cta oxa-growth-cta--upgrade" style={{margin: "1.5rem 0", padding: "1.1rem 1.4rem", border: "1px solid color-mix(in srgb, var(--oxa-green) 32%, var(--oxa-border))", borderRadius: "var(--oxa-radius)", background: "linear-gradient(135deg, color-mix(in srgb, var(--oxa-green) 7%, transparent), transparent 52%), var(--oxa-panel)", display: "flex", alignItems: "center", gap: "1.25rem", flexWrap: "wrap"}}>
  <div style={{flex: "1 1 220px"}}>
    <p className="oxa-kicker" style={{marginBottom: "0.35rem"}}>Plans and limits</p>
    <p style={{margin: 0, fontWeight: 600, fontSize: "1rem", lineHeight: 1.3}}>Free gets the full catalog — paid plans raise your limits</p>
    <p style={{margin: "0.3rem 0 0", color: "var(--oxa-text-muted)", fontSize: "0.88rem"}}>Every tier, including Free, gets the full catalog: L2, L3, and L4 order books, order flow, TP/SL, trades, candles, funding, open interest, and liquidations, plus WebSocket access. Tiers differ only on credits, rate limits, concurrency, WebSocket scale, and replay speed.</p>
  </div>

  <a href="https://0xarchive.io/pricing?utm_source=ai_assistant&utm_medium=ai-assistant&utm_campaign=agent_docs_funnel&utm_content=mcp_claude_upgrade_cta" style={{display: "inline-flex", alignItems: "center", gap: "0.45rem", padding: "0.55rem 1rem", borderRadius: "8px", border: "1.5px solid var(--oxa-green)", background: "transparent", color: "var(--oxa-green)", fontWeight: 700, fontSize: "0.88rem", textDecoration: "none", whiteSpace: "nowrap"}} data-oxa-cta="upgrade-pro">
    Upgrade to Pro →
  </a>
</div>

## Next step

Use [MCP server](/mcp-server) for the full MCP reference and [Coding agents](/coding-agents) for Claude Code recovery rules.
