> ## 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.

# MCP server

> Connect Claude, ChatGPT, Codex, Cursor, and other MCP-capable clients to 0xArchive's hosted MCP server over OAuth, with no 0xArchive API key.

Connect Claude, ChatGPT, Codex, Cursor, or another MCP-capable client to `https://mcp.0xarchive.io/mcp`, and it can pull 0xArchive market data through typed tools instead of guessing endpoints. There is nothing to install or run locally, and you sign in with OAuth: the server needs no 0xArchive API key.

## Connect

Add `https://mcp.0xarchive.io/mcp` to your client as a remote HTTP MCP server; the server speaks Streamable HTTP. The client then opens a sign-in through its built-in OAuth flow, at the authorization server `https://auth.0xarchive.io`. Approve `mcp:market.read`, the scope for market data. The client keeps the access token, so do not add an `Authorization` header or an 0xArchive API key yourself.

## Client setup

Every client uses the same server URL and its own OAuth sign-in. If you already have MCP servers configured, add 0xArchive without replacing the other entries. Do not configure an API key or a static Authorization header in any client.

<AccordionGroup>
  <Accordion title="Claude Code">
    ```bash theme={"theme":"github-dark"}
    claude mcp add --transport http 0xarchive https://mcp.0xarchive.io/mcp
    ```

    In Claude Code, run `/mcp`, select `0xarchive`, and choose **Authenticate**. Complete the browser sign-in and approve `mcp:market.read`; Claude Code keeps the resulting OAuth access token in its own credential handling. Then ask for a BTC market summary. [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp)
  </Accordion>

  <Accordion title="Claude web, Desktop, and Cowork">
    1. Open **Customize → Connectors** in Claude.
    2. Click **+ → Add custom connector**.
    3. Name it `0xArchive` and enter `https://mcp.0xarchive.io/mcp`.
    4. Add the connector, click **Connect**, and complete the OAuth sign-in.
    5. Enable it from **+ → Connectors** in your conversation.

    For Team and Enterprise workspaces, an owner first adds the connector in **Organization settings → Connectors**; each member then connects their own account. [Claude custom connector guide](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp)
  </Accordion>

  <Accordion title="ChatGPT">
    1. Enable **Developer mode** in **Settings → Security & Login**.
    2. Open **Plugins** and use the **+** button to add an MCP connection.
    3. Name it `0xArchive`, enter `https://mcp.0xarchive.io/mcp`, and complete OAuth authentication.
    4. Start a new conversation and select the connection from **+ → More**.

    [ChatGPT MCP connection guide](https://developers.openai.com/plugins/deploy/connect-chatgpt)
  </Accordion>

  <Accordion title="Codex CLI and IDE extension">
    ```bash theme={"theme":"github-dark"}
    codex mcp add 0xarchive --url https://mcp.0xarchive.io/mcp
    ```

    Complete the OAuth sign-in. To start authentication separately, run `codex mcp login 0xarchive`. The CLI and IDE extension share MCP configuration; use `/mcp` in the Codex terminal interface to check the connection. [Codex MCP documentation](https://developers.openai.com/codex/mcp/)
  </Accordion>

  <Accordion title="Cursor">
    Add this entry to `.cursor/mcp.json` in your project. For a user-wide connection, use `~/.cursor/mcp.json`.

    ```json theme={"theme":"github-dark"}
    {
      "mcpServers": {
        "0xarchive": {
          "url": "https://mcp.0xarchive.io/mcp"
        }
      }
    }
    ```

    Open Cursor's MCP settings, connect `0xarchive`, and complete the OAuth sign-in. Enable the server's tools for Agent. [Cursor MCP documentation](https://cursor.com/docs/context/mcp)
  </Accordion>

  <Accordion title="VS Code and GitHub Copilot">
    Run **MCP: Add Server** from the Command Palette, choose an HTTP server, and enter `https://mcp.0xarchive.io/mcp`. Or add it to `.vscode/mcp.json`:

    ```json theme={"theme":"github-dark"}
    {
      "servers": {
        "0xarchive": {
          "type": "http",
          "url": "https://mcp.0xarchive.io/mcp"
        }
      }
    }
    ```

    Start the server and complete the browser OAuth flow. Use **MCP: List Servers** to check its status, then enable the tools you need in chat. [VS Code MCP documentation](https://code.visualstudio.com/docs/agent-customization/mcp-servers)
  </Accordion>

  <Accordion title="Antigravity CLI and Gemini CLI">
    **Antigravity CLI** is the current choice for personal Google accounts. Add this to `.agents/mcp_config.json` in your project:

    ```json theme={"theme":"github-dark"}
    {
      "mcpServers": {
        "0xarchive": {
          "serverUrl": "https://mcp.0xarchive.io/mcp"
        }
      }
    }
    ```

    Open `/mcp` in Antigravity CLI to reload the configuration and check the server, then complete its OAuth prompt. Use `serverUrl`, not Gemini CLI's `httpUrl` field.

    **Gemini CLI** remains available with Gemini Code Assist Standard or Enterprise licenses or paid Google API access. From your project directory:

    ```bash theme={"theme":"github-dark"}
    gemini mcp add --transport http 0xarchive https://mcp.0xarchive.io/mcp
    ```

    Start Gemini, run `/mcp auth 0xarchive`, and complete the browser OAuth flow. `/mcp` shows the server and its available tools. [Antigravity MCP documentation](https://antigravity.google/docs/cli/mcp) · [Gemini CLI MCP documentation](https://geminicli.com/docs/tools/mcp-server/) · [Google client availability](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli)
  </Accordion>

  <Accordion title="Grok web and Grok Build">
    **Grok web:** open Grok's Connectors page, choose **New Connector → Custom**, enter `https://mcp.0xarchive.io/mcp`, and complete the OAuth sign-in. For Business and Enterprise organizations, a team admin first provisions the connector.

    **Grok Build:**

    ```bash theme={"theme":"github-dark"}
    grok mcp add --transport http 0xarchive https://mcp.0xarchive.io/mcp
    ```

    Grok starts the OAuth flow when the server is first used. In the terminal interface, `/mcps` opens the MCP settings and `i` starts authentication for the selected server. [Grok connectors](https://docs.x.ai/grok/connectors) · [Grok Build MCP documentation](https://docs.x.ai/build/features/mcp-servers)
  </Accordion>

  <Accordion title="Hermes Agent">
    ```bash theme={"theme":"github-dark"}
    hermes mcp add --url https://mcp.0xarchive.io/mcp --auth oauth 0xarchive
    hermes mcp login 0xarchive
    ```

    Run `hermes mcp test 0xarchive` to check the connection. The OAuth bearer access token stays in Hermes's credential handling. When Hermes presents tool selection, enter `select`, review the checklist, and enable only the tools you intend to use: all discovered tools begin selected, so deselect any tool you do not want exposed to the agent. [Hermes MCP documentation](https://hermes-agent.nousresearch.com/docs/user-guide/features/mcp)
  </Accordion>

  <Accordion title="OpenClaw">
    ```bash theme={"theme":"github-dark"}
    openclaw mcp set 0xarchive '{
      "url": "https://mcp.0xarchive.io/mcp",
      "transport": "streamable-http",
      "auth": "oauth",
      "oauth": {"scope": "mcp:market.read"}
    }'
    openclaw mcp login 0xarchive
    ```

    Run `openclaw mcp doctor 0xarchive --probe` to check the connection. Use OpenClaw's MCP tool controls to choose which agents or sessions can use it. [OpenClaw MCP guide](https://docs.openclaw.ai/tools/mcp) · [OAuth setup](https://docs.openclaw.ai/cli/mcp/transports)
  </Accordion>

  <Accordion title="OpenCode">
    Add this entry to `opencode.json`:

    ```json theme={"theme":"github-dark"}
    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "0xarchive": {
          "type": "remote",
          "url": "https://mcp.0xarchive.io/mcp",
          "enabled": true
        }
      }
    }
    ```

    Run `opencode mcp auth 0xarchive` and complete the browser sign-in. `opencode mcp list` shows the authentication status. [OpenCode MCP documentation](https://opencode.ai/docs/mcp-servers/)
  </Accordion>

  <Accordion title="Windsurf and Devin">
    **Devin Local and Devin CLI:** Devin Local, the default agent for new editor tabs, uses the Devin MCP configuration. From your project directory:

    ```bash theme={"theme":"github-dark"}
    devin mcp add 0xarchive https://mcp.0xarchive.io/mcp
    devin mcp login 0xarchive
    ```

    **Cascade:** add this to `~/.codeium/windsurf/mcp_config.json`:

    ```json theme={"theme":"github-dark"}
    {
      "mcpServers": {
        "0xarchive": {
          "serverUrl": "https://mcp.0xarchive.io/mcp"
        }
      }
    }
    ```

    Open Cascade's MCP settings, enable the server, and complete its OAuth sign-in. Select the tools you need if you reach the client's tool limit. Sign in separately in each client you use. [Devin MCP configuration](https://docs.devin.ai/cli/extensibility/mcp/configuration) · [Windsurf Cascade MCP settings](https://docs.windsurf.com/windsurf/cascade/mcp)
  </Accordion>

  <Accordion title="Cline">
    1. Open Cline's **MCP Servers** panel and the **Remote Servers** tab.
    2. Enter `0xarchive` as the name and `https://mcp.0xarchive.io/mcp` as the URL.
    3. Choose **Streamable HTTP** and click **Add Server**.
    4. Click **Authenticate** when the server requests OAuth, then finish the browser sign-in.

    If **Authenticate** is missing, update Cline before connecting. [Cline MCP documentation](https://docs.cline.bot/mcp/mcp-overview)
  </Accordion>

  <Accordion title="Other MCP clients">
    Use the same server URL with a client that supports Streamable HTTP and OAuth. Add `https://mcp.0xarchive.io/mcp` as a remote HTTP MCP server, let the client discover the authorization server, and approve the scopes it asks for. Do not substitute an API key or a manually pasted bearer token. For custom integrations, read the [OAuth resource metadata](https://mcp.0xarchive.io/.well-known/oauth-protected-resource) and the [MCP authorization specification](https://modelcontextprotocol.io/specification/latest/basic/authorization).
  </Accordion>
</AccordionGroup>

If a client connects but a call fails, see [Troubleshooting](#troubleshooting).

## First request

Ask your client, in a new conversation:

<Prompt description="Get a BTC market summary on Hyperliquid.">Get a BTC market summary on Hyperliquid.</Prompt>

The client calls `get_summary` with `BTC` and answers with the BTC mark price, oracle price, funding rate, open interest, 24-hour volume, and 24-hour liquidation volume, as of the timestamp the tool returns. The connection works when a tool call returns data with its timestamp. If the client asks which venue you mean, answer it; if it calls a different tool, name `get_summary` in your prompt.

Keep later prompts as narrow as this one: one venue family, one symbol, one data type, and one small window. Ask the client to name the tool it will call and that tool's inputs before it calls; a tool name guessed from a REST route will fail.

## What the tools do

Read-only market-data tools are organized by venue family: Hyperliquid core, Hyperliquid Spot, HIP-3, HIP-4, Lighter, and data quality. They never submit orders or change account state. Lighter tools cover both Lighter deployments: `get_lighter_*` tools read Lighter mainnet and `get_rh_lighter_*` tools read Lighter on Robinhood Chain. The account positions tools (`get_account_positions`, `get_account_positions_history`, `get_account_position_changes`, `get_market_positions`, `get_market_positions_summary`, and `get_lighter_accounts`) read the [Account positions](/rest-api/positions) routes and take a `venue` of `hyperliquid`, `hip3`, `lighter`, or `rh-lighter`. Your plan sets credits and the history window, as it does for REST, and each tool returns only the data its venue family has.

| Prompt shape | Exact tool |
| - | - |
| "Get a BTC market summary on Hyperliquid." | `get_summary` |
| "Fetch ETH one-hour Hyperliquid candles for the last 24 hours." | `get_candles` |
| "Fetch current BTC funding separately for Hyperliquid and Lighter; report each source's units and timestamp." | `get_funding_current` and `get_lighter_funding_current` |
| "Summarize `xyz:XYZ100` on HIP-3." | `get_hip3_summary` |
| "List active HIP-4 outcome markets." | `get_hip4_outcomes` |
| "Show recent data incidents or coverage gaps." | `get_data_incidents` or `get_symbol_coverage` |

For current funding requests, call the Hyperliquid and Lighter tools separately. Preserve the source units and timestamp from each response.

## When to use the MCP server

| Use the MCP server when | Use another interface when |
| - | - |
| An MCP-capable client should call typed tools directly | You only need one shell command; use [CLI](/cli) |
| You want the same connection shared across agent sessions | You are generating an app client; use [OpenAPI](/openapi) or [SDKs](/sdks) |
| You want route selection, execution, and inspection in one client | The client only loads `SKILL.md` workflows; use the [Agent skill](/skill) |
| The client supports remote HTTP MCP | You need raw HTTP behavior; use the [REST API](/rest-api) |

For live streaming, use [WebSocket](/websocket). The MCP server covers REST-shaped and historical workflows.

## Permissions

The protected-resource metadata for `https://mcp.0xarchive.io/mcp` names the authorization server and lists the scopes the server offers. It advertises exactly the scopes its enabled tools need and nothing beyond them, so that metadata, and the consent screen your client shows you, are the live answer to what this server can do. If a scope is not listed there, the tools behind it are not enabled on the server you are connected to.

```bash Read the live scope list theme={"theme":"github-dark"}
curl -s https://mcp.0xarchive.io/.well-known/oauth-protected-resource
```

* **`mcp:market.read`:** always offered. It reads market data: summaries, order books, trades, candles, funding, open interest, liquidations, instruments, and data quality.
* **`mcp:webhooks.read` and `mcp:webhooks.write`:** offered when the [webhook](/webhooks) configuration tools are enabled on the server, and absent from the metadata when they are not. `mcp:webhooks.write` lets the client create and change your webhook configuration, so approve it only when you want that, and have the client ask before each change.

Whatever the metadata lists, the server does not advertise account creation, API key management, or billing and plan changes. Use your [dashboard](https://0xarchive.io/dashboard) on the 0xArchive website for those.

## Troubleshooting

Three failures look alike in a client. Tell them apart before changing anything.

### No 0xArchive tools are listed, and the client reports a sign-in or authorization error

Authentication failed: the server answers HTTP `401` with a `WWW-Authenticate` header when the bearer token is missing, invalid, or expired. Repeat the client's OAuth sign-in. Do not add an API key or a static `Authorization` header. A `503` saying authentication verification is temporarily unavailable clears on retry without changing credentials.

### The tool you asked for is not in the client's tool list

The server you connected to does not offer it, or the client's tool selection turned it off. Check `scopes_supported` in the [OAuth resource metadata](https://mcp.0xarchive.io/.well-known/oauth-protected-resource). If `mcp:webhooks.read` and `mcp:webhooks.write` are absent, the webhook tools are not enabled on this server. Otherwise, enable the tool in the client's tool settings.

### The tool is listed, but the call returns `insufficient_scope`

The connection was granted without the scope the error names. The webhook tools need `mcp:webhooks.read` to read and `mcp:webhooks.write` to change anything. Reconnect through the client's OAuth flow and approve that scope.

## Security

OAuth bearer access tokens are client-managed. Never paste an OAuth token, API key, or other credential into prompts, logs, shared chat, checked-in config, or command arguments. The hosted MCP endpoint requires no 0xArchive API key. Review the discovered tools and the permissions you grant before enabling them in your client: the market-data tools are read-only, while the tools behind `mcp:webhooks.write` change your webhook configuration.

## Next step

Ask for a history window next:

<Prompt description="Fetch ETH one-hour Hyperliquid candles for the last 24 hours.">Fetch ETH one-hour Hyperliquid candles for the last 24 hours.</Prompt>

The client calls `get_candles` for `ETH` with a `1h` interval and answers with 24 hourly bars, each with open, high, low, close, and volume.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.