> ## 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. With your approval it can also [set up your open 0xArchive Terminal](#set-up-your-terminal). There is nothing to install or run locally, and you sign in with OAuth: the server needs no 0xArchive API key.

## Connect

**Bring market data into the conversation**

Connect 0xArchive to your client and ask for the market data your work needs. Sign in with OAuth, without running a local server.

```text MCP server theme={"theme":"github-dark"}
https://mcp.0xarchive.io/mcp
```

[Choose your client](#client-setup)
[First request](#first-request)

The client 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.

When `mcp:feedback.write` is offered, it lets the connected agent call `submit_feedback`. A reconnect alone does not upgrade an existing read-only grant: the client must request the write scope and you must approve it once. An agent may then decide when to send feedback without asking before each report. The tool returns a receipt ID, not a response-time or fix promise. See [Send product feedback](https://docs.0xarchive.io/feedback.md) for the fields and privacy guidance.

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

> [accordion] 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] Claude web, Desktop, and Cowork
>
> 1. Open [0xArchive in Claude's connector directory](https://claude.ai/directory/0xarchive) and add the connector.
> 2. Sign in to 0xArchive and approve the connection.
> 3. 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.
>
> To add it as a custom connector instead, open **Customize → Connectors**, click **+ → Add custom connector**, name it `0xArchive`, enter `https://mcp.0xarchive.io/mcp`, then click **Connect** and complete the OAuth sign-in. [Claude custom connector guide](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp)

> [accordion] ChatGPT
>
> 1. Open the [0xArchive plugin](https://chatgpt.com/plugins/plugin_asdk_app_6ad6915a7c208191aeb3c0d49a954a96) by Archive Labs Inc and choose **Install plugin**.
> 2. Connect it, sign in to 0xArchive, and approve the connection.
> 3. Choose **Try in chat** to start a conversation with 0xArchive.
>
> You can also find it by searching for **0xArchive** in ChatGPT's **Plugins** directory.
>
> To add it as a custom MCP connection instead, enable **Developer mode** in **Settings → Security & Login**, open **Plugins** and use the **+** button to add an MCP connection, name it `0xArchive`, enter `https://mcp.0xarchive.io/mcp`, and complete OAuth authentication. Then select it from **+ → More** in a new conversation. [ChatGPT MCP connection guide](https://developers.openai.com/plugins/deploy/connect-chatgpt)

> [accordion] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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).

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

## First request

Listing tools discovers the available operations without retrieving market data or spending data credits. It does not count as your first data result. To inspect allowance and reset time before a market-data call, use the authenticated [account-usage request](https://docs.0xarchive.io/core-concepts/credits.md#check-your-balance-before-requesting-data).

**Ask your first market question**

Start with a BTC summary and see the timestamp returned by the tool. Your client signs in with OAuth, with no 0xArchive API key.

[Explore market questions](#what-the-tools-do)
[Set up your client](#client-setup)

Ask your client, in a new conversation:

Get a BTC market summary on Hyperliquid.

Get a BTC market summary on Hyperliquid.

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](https://docs.0xarchive.io/rest-api/positions.md) 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` |
| "Send this product suggestion to 0xArchive." | `submit_feedback` (requires `mcp:feedback.write`) |

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

## Set up your Terminal

With Terminal access approved, the client can set up your open [0xArchive Terminal](https://terminal.0xarchive.io) for you. It can build and change views, choose each chart's market, timeframe, studies and indicators, put In play on a view to rank a venue's markets live, draw levels, and set price alerts. Ask for what you trade, such as "a swing-trading view for SOL on the daily, 4-hour and 1-hour", and the Terminal is set up while you watch. It shows which client is working and each step as it runs, and **Undo** takes back anything the client changed. Nothing it does places orders or touches trading keys, and price alerts only notify.

### Connect it

1. Connect the server as above. When your client's consent screen asks, approve Terminal access: **See how your open Terminal is set up** (`mcp:terminal.read`) and **Set up your open Terminal** (`mcp:terminal.write`). A client you connected before Terminal access existed does not have it. Disconnect it and connect again to approve it.
2. Open [terminal.0xarchive.io](https://terminal.0xarchive.io) in a browser and sign in with the same 0xArchive account.
3. Ask the client for what you want. Each call goes to your open Terminal tab (the one you had in front most recently), which runs it and answers.

If no Terminal tab is open, the call fails with `terminal_not_open` and a link: open the Terminal, sign in, and ask again. Terminal access works over OAuth only, and an 0xArchive API key is refused with `oauth_required`. ChatGPT and Codex do not show the Terminal tools yet; use another client above for them.

### The Terminal tools

* **`terminal_read`** needs `mcp:terminal.read` or `mcp:terminal.write`. It reads without changing anything: `get_state` (the views and the screen's size), `read_guide` (how to decide what to build, the view format, every command and panel), `read_view` (a view as a document) and `find_indicators`.
* **`terminal_run`** needs `mcp:terminal.write`. It runs any command: `write_view`, `open_view`, `delete_view`, `undo`, `draw_level`, `add_price_alert`, `remove_marks` and the read commands.

Each call takes `steps`, a list of `{"name": ..., "args": ...}` run in order, and answers each one. A good first call is `terminal_read` with `[{"name": "read_guide"}, {"name": "get_state"}]`. A view is a document: `read_view` gives it, the client changes it, and `write_view` sets it. These are the commands the Terminal gives a browser agent, described in [terminal.0xarchive.io/llms.txt](https://terminal.0xarchive.io/llms.txt).

To stop a client, disconnect it under [Connected MCP clients](https://0xarchive.io/account/connections) in your account. Its Terminal calls stop within a minute.

## 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](https://docs.0xarchive.io/cli.md) |
| You want the same connection shared across agent sessions | You are generating an app client; use [OpenAPI](https://docs.0xarchive.io/openapi.md) or [SDKs](https://docs.0xarchive.io/sdks.md) |
| You want route selection, execution, and inspection in one client | The client only loads `SKILL.md` workflows; use the [Agent skill](https://docs.0xarchive.io/skill.md) |
| The client supports remote HTTP MCP | You need raw HTTP behavior; use the [REST API](https://docs.0xarchive.io/rest-api.md) |

For live streaming, use [WebSocket](https://docs.0xarchive.io/websocket.md). 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:terminal.read` and `mcp:terminal.write`:** offered when the [Terminal tools](#set-up-your-terminal) are enabled on the server. `mcp:terminal.read` lets the client see how your open Terminal is set up. `mcp:terminal.write` lets it change your views, drawings and price alerts; it never places orders or touches trading keys.
* **`mcp:webhooks.read` and `mcp:webhooks.write`:** offered when the [webhook](https://docs.0xarchive.io/webhooks.md) 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

Use the response to distinguish a sign-in problem from a missing tool, insufficient scope or an unfinished retrieval.

### A historical retrieval returns `partial` with no records

`partial` means the workflow has not established a complete result for the requested window. It does not, by itself, mean the archive is empty. Read `reason`, any `error`, the coverage metadata and the number of source calls before deciding what to do next.

* If `continuation` is returned, pass it to `retrieve_historical_data` to resume the same query.
* If `retrievalFinished` is `true` with no continuation, the available source pages are exhausted. Inspect the reported coverage or boundary limitation instead of creating a cursor.
* A successful trades or L4-diff request does not establish order-history coverage: they read different datasets.

For Hyperliquid order lifecycle events, use `family: "hyperliquid"` and `dataset: "order_history"` with the historical workflow. The raw tool is `get_order_history`; it takes `coin` rather than `symbol`:

```json theme={"theme":"github-dark"}
{
  "coin": "BTC",
  "start": "2026-10-20T00:00:00Z",
  "end": "2026-10-20T00:01:00Z",
  "limit": 100
}
```

This is a one-page call template, not a returned dataset. If the raw result supplies `nextCursor`, pass that exact value as `cursor` with the same explicit bounds and filters. A workflow `continuation` and a raw `cursor` are not interchangeable.

If the result is still unexplained, email [support@0xarchive.io](mailto:support@0xarchive.io) with the tool name, arguments, complete response and any `requestId`. Remove credentials before sending.

### 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. `terminal_read` needs `mcp:terminal.read` or `mcp:terminal.write`, and `terminal_run` needs `mcp:terminal.write`. 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, the tools behind `mcp:webhooks.write` change your webhook configuration, and `terminal_run` changes your Terminal's views, drawings and price alerts.

An agent with `mcp:feedback.write` can send reports to 0xArchive without prompting for each one; do not grant that scope to agents you do not trust to make that decision.

## Next step

Ask for a history window next:

Fetch ETH one-hour Hyperliquid candles for the last 24 hours.

Fetch ETH one-hour Hyperliquid candles for the last 24 hours.

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.