Catalog npm
PACKAGE EXPLORERView in registry

@0xarchive/mcp-server

npm

MCP server that gives coding agents typed 0xArchive market data tools across Hyperliquid (perps, HIP-3, HIP-4, spot) and Lighter.xyz

0xarchiveagentsclaudecodexhyperliquidlighterxyzmarket-datamcpmcp-servermodel-context-protocolorderbook
Versions collected9
Direct dependencies5From release 1.9.3
Last observed20 Oct, 22:40 UTC

README

Current package documentation

0xArchive MCP Server (retired)

This package is retired. Use the hosted MCP instead: https://docs.0xarchive.io/mcp-server

The hosted MCP at https://mcp.0xarchive.io/mcp is the supported path. It needs no install, authenticates with OAuth, exposes a superset of the tools below, and stays current automatically.

This self-hosted stdio package still installs and still works, and existing setups will keep working. It is no longer developed and will not receive new tools or data sources. If you are setting up 0xArchive for the first time, use the hosted MCP. If you are already running this package, migration is a config change: see the migration section below.

0xArchive is granular market data infrastructure for Hyperliquid and Lighter.xyz. Hyperliquid includes core perps, HIP-3 builder perps, HIP-4 outcome markets, and Hyperliquid Spot; Lighter.xyz is the second top-level venue API.

Migrate to the hosted MCP

Replace the stdio server entry in your MCP client config with the remote endpoint. No package install, no API key in your environment: the hosted server uses OAuth.

# Claude Code
claude mcp remove 0xarchive
claude mcp add --transport http 0xarchive https://mcp.0xarchive.io/mcp

For other clients, point them at https://mcp.0xarchive.io/mcp as a streamable-HTTP MCP server. Full setup: https://docs.0xarchive.io/mcp-server


The rest of this document describes the retired self-hosted package, kept for the setups still running it.

First Tool Result

Install the MCP server package in the project or agent workspace where the MCP client will run:

npm install @0xarchive/mcp-server

export OXARCHIVE_API_KEY="0xa_your_api_key"

# Claude Code command mechanics
claude mcp add 0xarchive -s user -t stdio \
  -e OXARCHIVE_API_KEY="$OXARCHIVE_API_KEY" \
  -- npx -y @0xarchive/mcp-server

The claude mcp add line is a Claude Code setup mechanic. ChatGPT Codex users with MCP enabled should register the same stdio command in their Codex MCP config: npx -y @0xarchive/mcp-server. Ask one narrow question first:

What's BTC's current funding rate?

Expected result: the client invokes a concrete 0xArchive MCP tool and returns live venue data or a direct auth/configuration error.

Agent Integration Requirements

Agent surfaceRequirementSetup mechanic
Claude CodeClaude Code MCP support and Node 18+claude mcp add ... -- npx -y @0xarchive/mcp-server
Claude DesktopDesktop MCP JSON configAdd the stdio server to claude_desktop_config.json (command: npx, args: ["-y", "@0xarchive/mcp-server"])
ChatGPT CodexChatGPT Codex with MCP enabledConfigure Codex MCP to run the same npx -y @0xarchive/mcp-server stdio command; if MCP is unavailable, use the CLI, SDKs, skills, llms.txt, OpenAPI, or markdown docs
Other MCP clientsLocal stdio MCP supportRun npx -y @0xarchive/mcp-server with OXARCHIVE_API_KEY in the environment

Choose This Or Another Agent Path

NeedBest first path
Typed tools or shared MCP configThis MCP server
Fast local agent setupAI Clients guide
Claude Code, ChatGPT Codex, or other shell-first coding-agent workCLI
Direct SDK integrationSDK docs
File-based historical pullsData Catalog
Machine-readable contextllms.txt, OpenAPI

Usage Examples

PromptTool that fires
"Give me a BTC market summary"get_summary
"Show ETH 4h candles for the past week"get_candles
"What's the current funding rate for SOL?"get_funding_current
"Compare BTC funding on Hyperliquid vs Lighter"get_funding_current + get_lighter_funding_current
"Show me SOL liquidations in the last 24 hours"get_liquidations
"Get BTC orderbook with 20 levels"get_orderbook
"Any data incidents this month?"get_data_incidents
"What's the km:US500 price on HIP-3?"get_hip3_summary
"List active HIP-4 outcome markets"get_hip4_outcomes
"Show me the SLA report for January 2026"get_data_sla

Setup

1. Install

npm install @0xarchive/mcp-server

2. Get an API Key

Create an account at 0xArchive signup, generate an API key, and set OXARCHIVE_API_KEY. Or use the web3_challenge and web3_signup tools to get a free API key with just an Ethereum wallet, no browser needed.

3. Add to an MCP client

Claude Code command mechanics:

claude mcp add 0xarchive -s user -t stdio \
  -e OXARCHIVE_API_KEY=0xa_your_api_key \
  -- npx -y @0xarchive/mcp-server

4. Add to Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "0xarchive": {
      "command": "npx",
      "args": ["-y", "@0xarchive/mcp-server"],
      "env": {
        "OXARCHIVE_API_KEY": "0xa_your_api_key"
      }
    }
  }
}

For ChatGPT Codex and other agent workflows, use this same stdio server command wherever your client supports local MCP servers. If MCP is not available there, route the same API key through the CLI, SDKs, skills, markdown docs, llms.txt, or OpenAPI. The acquisition path is shared: make one authenticated request, then expand into replay, SDKs, Data Catalog exports, or agent tooling.

Available Tools (111)

Hyperliquid

ToolDescription
get_instrumentsList all Hyperliquid perp/spot instruments
get_instrumentGet a single Hyperliquid instrument by coin
get_orderbookCurrent L2 orderbook snapshot
get_orderbook_historyHistorical orderbook snapshots
get_tradesTrade/fill history
get_candlesOHLCV candle data
get_funding_currentCurrent funding rate
get_funding_historyFunding rate history
get_open_interestCurrent open interest
get_open_interest_historyOpen interest history
get_liquidationsLiquidation history
get_liquidations_by_userLiquidations for a specific user address
get_liquidation_volumeAggregated liquidation volume (USD buckets)
get_freshnessPer-coin data freshness and lag
get_summaryCombined market summary (price, funding, OI, volume, liquidations)
get_price_historyMark/oracle/mid price history

Hyperliquid L4 (Order-Level)

ToolDescription
get_order_historyOrder history with user attribution
get_order_flowAggregated order placement, cancellation, and fill metrics
get_tpslTP/SL order history with trigger prices and triggered status
get_l4_orderbookL4 orderbook reconstruction at a specific timestamp
get_l4_diffsRaw order-level changes (new, modified, cancelled, filled) over a time range
get_l4_orderbook_historyPeriodic full order-level orderbook checkpoints

Hyperliquid L2 (Full-Depth)

ToolDescription
get_l2_orderbookL2 full-depth orderbook derived from L4
get_l2_orderbook_historyHistorical L2 full-depth orderbook snapshots
get_l2_diffsL2 tick-level diffs

HIP-3 (Builder Perps)

ToolDescription
get_hip3_instrumentsList HIP-3 instruments
get_hip3_instrumentGet a single HIP-3 instrument by coin
get_hip3_orderbookCurrent HIP-3 orderbook
get_hip3_orderbook_historyHistorical HIP-3 orderbook snapshots
get_hip3_tradesHIP-3 trade history
get_hip3_trades_recentMost recent HIP-3 trades
get_hip3_candlesHIP-3 candle data
get_hip3_funding_currentCurrent HIP-3 funding rate
get_hip3_fundingHIP-3 funding history
get_hip3_open_interestCurrent HIP-3 open interest
get_hip3_open_interest_historyHIP-3 open interest history
get_hip3_liquidationsHIP-3 liquidation events (Feb 2026+)
get_hip3_liquidation_volumeAggregated HIP-3 liquidation volume (USD buckets, Feb 2026+)
get_hip3_freshnessPer-coin HIP-3 data freshness and lag
get_hip3_summaryCombined HIP-3 market summary
get_hip3_price_historyHIP-3 mark/oracle/mid price history

HIP-3 L4 (Order-Level)

ToolDescription
get_hip3_order_historyHIP-3 order history with user attribution
get_hip3_order_flowAggregated HIP-3 order placement, cancellation, and fill metrics
get_hip3_tpslHIP-3 TP/SL order history with trigger prices and triggered status
get_hip3_l4_orderbookHIP-3 L4 orderbook reconstruction at a specific timestamp
get_hip3_l4_diffsHIP-3 raw order-level changes over a time range
get_hip3_l4_orderbook_historyHIP-3 periodic full order-level orderbook checkpoints

HIP-3 L2 (Full-Depth)

ToolDescription
get_hip3_l2_orderbookHIP-3 L2 full-depth orderbook derived from L4
get_hip3_l2_orderbook_historyHIP-3 L2 full-depth orderbook history
get_hip3_l2_diffsHIP-3 L2 tick-level diffs

HIP-4 (Outcome Markets)

HIP-4 coins use the bare numeric format <10*outcome_id + side> (e.g. 0 for outcome 0 Yes, 1 for outcome 0 No). Legacy #0 / %230 forms are still accepted. mark_price for HIP-4 is an implied probability in [0,1], not a USD price. HIP-4 has no funding, no liquidations, and no candles by design. Listen for the WebSocket outcome_settled event to be notified when an outcome resolves.

ToolDescription
get_hip4_instrumentsList HIP-4 outcome-market instruments (one row per side)
get_hip4_instrumentGet a single HIP-4 instrument by coin (e.g. 0)
get_hip4_outcomesList HIP-4 outcomes (filter is_settled optional)
get_hip4_outcomeSingle outcome detail including aggregated_oi
get_hip4_orderbookCurrent HIP-4 L2 orderbook
get_hip4_orderbook_historyHistorical HIP-4 L2 orderbook snapshots
get_hip4_tradesHIP-4 trade history
get_hip4_trades_recentMost recent HIP-4 trades
get_hip4_open_interestHIP-4 per-side open interest history
get_hip4_open_interest_currentCurrent HIP-4 per-side open interest
get_hip4_freshnessPer-coin HIP-4 data freshness and lag
get_hip4_summaryCombined HIP-4 24h summary (probability, volume, OI)
get_hip4_pricesHIP-4 mid-price (implied probability) history
get_hip4_order_historyHIP-4 order lifecycle events
get_hip4_order_flowHIP-4 aggregated order placement/cancel/fill metrics
get_hip4_tpslHIP-4 TP/SL order history
get_hip4_l4_orderbookHIP-4 L4 orderbook reconstruction
get_hip4_l4_diffsHIP-4 raw order-level changes over a time range
get_hip4_l4_orderbook_historyHIP-4 periodic L4 orderbook checkpoints

Hyperliquid Spot

Spot pairs use dashed canonical symbols (e.g. HYPE-USDC, PURR-USDC); the server resolves to Hyperliquid's wire format (PURR/USDC, @107) internally. 294 pairs covered. Spot has no funding, no open interest, no liquidations, and no candles by design (those are perp-only constructs). Coverage: trades from 2025-03-22 (HL S3 backfill); orderbook, L4, and TWAP statuses live from 2026-05-05.

ToolDescription
get_spot_pairsList all 294 spot pairs with metadata (base/quote, wire symbol, decimals, latest price)
get_spot_pairGet a single spot pair by dashed symbol (e.g. HYPE-USDC)
get_spot_orderbookCurrent spot L2 orderbook (live from 2026-05-05; full depth on every tier)
get_spot_orderbook_historyHistorical spot L2 orderbook snapshots (live-only from 2026-05-05)
get_spot_tradesSpot trade history with optional user filter (S3 backfill from 2025-03-22)
get_spot_trades_recentMost recent spot trades (live from 2026-05-05)
get_spot_order_historySpot order lifecycle events with user attribution
get_spot_l4_orderbookSpot L4 orderbook reconstruction at a specific timestamp
get_spot_l4_diffsSpot raw order-level changes over a time range
get_spot_l4_orderbook_historySpot periodic L4 orderbook checkpoints
get_spot_twap_by_symbolSpot TWAP statuses for a single pair (live from 2026-05-05)
get_spot_twap_by_userSpot TWAP statuses for a single user wallet across all pairs
get_spot_freshnessPer-pair spot data freshness and lag

Lighter.xyz

ToolDescription
get_lighter_instrumentsList Lighter instruments
get_lighter_instrumentGet a single Lighter instrument by coin
get_lighter_orderbookCurrent Lighter orderbook
get_lighter_orderbook_historyHistorical Lighter orderbook snapshots
get_lighter_tradesLighter trade history
get_lighter_trades_recentMost recent Lighter trades
get_lighter_candlesLighter candle data
get_lighter_funding_currentCurrent Lighter funding rate
get_lighter_fundingLighter funding history
get_lighter_open_interestCurrent Lighter open interest
get_lighter_open_interest_historyLighter open interest history
get_lighter_freshnessPer-coin Lighter data freshness and lag
get_lighter_summaryCombined Lighter market summary
get_lighter_price_historyLighter mark/oracle/mid price history

Lighter L3 (Order-Level)

ToolDescription
get_lighter_l3_orderbookCurrent L3 order-level orderbook with order IDs and user addresses
get_lighter_l3_orderbook_historyHistorical L3 orderbook snapshots with individual orders

Data Quality

ToolDescription
get_data_quality_statusSystem health across venue APIs
get_data_coverageData coverage (earliest/latest, records, completeness)
get_exchange_coverageCoverage for a specific exchange
get_symbol_coveragePer-symbol coverage with gap detection
get_data_incidentsOutage and degradation history
get_incidentSingle incident details by ID
get_data_latencyWebSocket/REST latency and data freshness
get_data_slaMonthly SLA compliance report

Realtime WebSocket Channels

The MCP server exposes the historical REST endpoints. For realtime, point any WebSocket client at wss://api.0xarchive.io/ws?apiKey=... and subscribe to:

ChannelNotes
trades, hip3_trades, hip4_trades, lighter_tradesRealtime + replay fills (one row per side per trade)
liquidations, hip3_liquidationsRealtime + replay liquidations. Each event is a fill row with is_liquidation: true (same shape as trades).
orderbook, hip3_orderbook, hip4_orderbook, lighter_orderbookRealtime + replay L2 orderbook updates (~1.2 sec resolution)
hip4_open_interestRealtime + replay HIP-4 per-side open interest snapshots
hip4_l4_diffs, hip4_l4_orders, l4_diffs, l4_orders, hip3_l4_diffs, hip3_l4_ordersOrder-level events (realtime only, no replay)
outcome_settledHIP-4 outcome resolution event. Fired once per outcome when is_settled flips to true.

WebSocket access (including all L4 channels) is available on every tier, starting with Free (10 subscriptions / 2 connections / 10x replay).

Web3 Authentication

ToolDescription
web3_challengeGet a SIWE challenge message for a wallet address
web3_signupCreate a free-tier account and API key with a signed SIWE message
web3_list_keysList all API keys for a wallet
web3_revoke_keyRevoke a specific API key
web3_subscribeSubscribe to a paid tier (build/pro) via x402 USDC payment on Base

Free-tier flow: web3_challenge (get SIWE message) → sign with personal_sign (EIP-191) → web3_signup (submit signature) → receive API key.

Paid-tier flow (x402): web3_subscribe with tier → returns 402 with pricing → sign USDC transfer (EIP-3009 on Base) → web3_subscribe again with payment_signature → receive API key + subscription.

Pricing Tiers

Every tier gets the full open catalog: all markets (HL perps, HIP-3, HIP-4, Spot, Lighter), all schemas (L2 full depth, L4 diffs/reconstruction/checkpoints, L3, trades, candles, funding, OI, liquidations, order history/flow/TP-SL), and all Lighter granularities (including tick). Hyperliquid history goes back to April 2023; Lighter history is per-datatype, with trades from January 2025. Nothing is symbol-, depth-, datatype-, or history-gated. Tiers differ only on monthly credits, RPS, concurrent queries, WebSocket scale, replay speed, export credits, and support/SLA.

TierPriceCredits/moRPSConcurrencyWebSocketReplayExportNotes
Free$0/mo50,00015310 subs (2 conn)10x$0All markets, full history
Build$49/mo ($39 annual)80M5010500 subs (3 conn)50x$50All markets, full history
Pro$199/mo ($159 annual)400M150203,000 subs (5 conn)100x$300All markets, full history
Scale$799/mo ($639 annual)2B5002020,000 subs (16 conn)300x$1,500200 keys, dedicated support
EnterpriseCustomUnlimitedfrom 1,000from 500Customfrom 500xCustomSLA from 99.5%, dedicated infra

Upgrade at 0xarchive.io/pricing.

Tool Annotations

All 111 tools carry MCP annotations so clients can reason about safety and retry behavior.

Market data tools (106):

AnnotationValueMeaning
readOnlyHinttrueTools never modify data
destructiveHintfalseNo destructive side effects
idempotentHinttrueSafe to retry on failure
openWorldHinttrueQueries an external API

Web3 tools (5): readOnlyHint: false, idempotentHint: false. These create accounts, keys, and subscriptions.

All tools also declare an outputSchema so clients can validate structured responses.

Smart Defaults

  • Time range: Defaults to last 24 hours if not specified
  • Limit: Defaults to 100 records
  • Interval: Defaults to 1h for candles
  • Pagination: Returns cursor for next page when more data available
  • Timestamps: Accepts both Unix milliseconds and ISO 8601 strings

Data Catalog

For large-scale data exports (full order books, complete trade history, etc.), use the Data Catalog. It lets you choose markets, datasets, and date ranges, see a live quote, and export zstd-compressed Parquet. MCP tools are best for typed point queries and moderate data pulls; the Data Catalog is the file-export path.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 9

Collected releases
VersionPublishedDirect dependenciesOpen version
1.9.3Registry latest6 Aug 20265
1.9.26 Aug 20265
1.9.16 Aug 20265
1.9.08 May 20265
1.8.05 May 20265
1.6.017 Apr 20265
1.5.04 Apr 20265
1.4.018 Mar 20265
1.0.020 Feb 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
0xarchiveio/0xarchive-mcp

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:a3b66e9b45ece198053e2be3880dab67e0c666883cd796bb6ee9861cadb0dbc8