MCP Hub
Back to servers

x402 crypto market structure

Cross-exchange crypto orderflow for AI agents. 20 exchanges, 26 tokens, 9 tools — CVD, whale activity, funding/OI, 7-year OHLCV, on-chain address risk (EVM + Solana). Pay-per-call USDC via x402, no API key.

glama
Updated
Apr 15, 2026

x402-mcp

Cross-exchange crypto market structure for AI agents. 20 exchanges, 26 tokens, 9 tools — orderflow, CVD, whale activity, funding/OI, 7-year OHLCV, on-chain address risk. Free via MCP.

npm version License: MIT

x402-mcp is a stdio MCP server that exposes x402.tunedfor.ai — a real-time crypto market structure API — as 9 tools any MCP-compatible client (Claude Desktop, Cursor, Cline, Windsurf, Claude Code) can call. Free via MCP for testing and low-frequency queries; paid REST at the same endpoints for production agents that need higher throughput.


Install

Claude Desktop / Cursor / Windsurf

Add to your MCP config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, equivalent on other OS):

{
  "mcpServers": {
    "x402": {
      "command": "npx",
      "args": ["-y", "@tunedforai/x402-mcp"]
    }
  }
}

Claude Code

claude mcp add x402 -- npx -y @tunedforai/x402-mcp

Cline / Continue / other MCP clients

Use the same npx -y @tunedforai/x402-mcp invocation as the stdio command.

Manual

npm install -g @tunedforai/x402-mcp
x402-mcp  # runs the stdio server

Tools

All 9 tools are stateless. No API key, no auth, no setup. Just call them.

ToolWhat it returnsREST equivalentFree via MCP / Paid REST
marketSnapshotLive price, funding, OI, buy/sell ratio, fear/greedPOST /dataFree / $0.20
marketAnalyzeMacro regime, DXY, VIX, directional signal + confidencePOST /analyze/marketFree / $0.25
marketOrderflowCross-exchange CVD, whale activity, liquidation pressurePOST /analyze/orderflowFree / $0.50
marketFullSnapshot + orderflow + LLM-synthesized analysisPOST /analyze/fullFree / $0.75
addressRiskWallet risk score (mixers, sanctions, counterparties). EVM + SolanaPOST /analyze/addressFree / $0.25
history1hHourly OHLCV with buy/sell flow split. Up to 5,000 bars, 7-year historyPOST /data/history/1hFree / $5.00
history1dDaily OHLCV with buy/sell flow split. Up to 5,000 bars, 7-year historyPOST /data/history/1dFree / $5.00
history5m5-minute OHLCV. High-resolution intradayPOST /data/history/5mFree / $1.00
apiInfoPricing, quick-start, migration detailsGET /api_infoFree

Token coverage

Major L1s and L2s on the snapshot tier: BTC, ETH, SOL, XRP, BNB, DOGE, ADA, AVAX, LINK, ATOM, DOT, ARB, SUI, OP, LTC.

Extended orderflow + history tier: the above plus NEAR, AAVE, BCH, HBAR, SHIB, TON, TRX, UNI, XLM.

Call apiInfo from any MCP client for the authoritative current list.


Examples

Pre-trade check

You: marketSnapshot BTC
LLM: BTC at $74,180. Buy ratio 58% — bullish lean. Funding rate +0.012%
     (mild long bias). Open interest $14.2B. Fear & Greed: 32 (Fear).
     Snapshot 12 sec old.

Cross-exchange orderflow

You: marketOrderflow ETH
LLM: ETH cross-exchange CVD: -$1.2M last hour (sell-side dominant).
     Whale activity: 8 large bars across Binance/Coinbase/Bybit.
     Liquidations: $890K longs, $230K shorts. Pressure: bearish.

Backtest data

You: history1d BTC limit=365
LLM: [returns 365 daily bars: open/high/low/close/volume/buy_volume/sell_volume]

Free MCP vs Paid REST

The MCP wrapper is free with rate limits — perfect for testing, prototyping, low-frequency agent workflows, and personal use.

For production agents (24/7 polling, multi-token monitoring, backtesting at scale), use the paid REST endpoints at x402.tunedfor.ai. REST is:

  • Pay-per-call in USDC on Base or Solana via the x402 protocol
  • No API keys — your agent signs payment locally; the private key never leaves your machine
  • No rate limits — pay for what you use
  • No subscriptions — no monthly minimums

Call apiInfo from any MCP client to get the current pricing schedule, migration guide, and SDK examples.


How x402 payment works (REST tier)

When your agent calls a paid REST endpoint:

  1. First request returns HTTP 402 Payment Required with the price
  2. Agent signs a USDC payment locally (private key never leaves the agent)
  3. Agent retries with the payment header attached
  4. Server verifies on-chain settlement and returns the data

No accounts, no API keys, no credit cards. Just USDC and a wallet.


Data sources

  • Price + ticker: OKX, Coinbase public APIs
  • Funding / OI / liquidations: Coinalyze (commercial license)
  • On-chain metrics, exchange flows, whale ratios: Santiment (commercial license)
  • Cross-exchange orderflow (CVD, whale bars, liq aggregations): WebSocket aggregator across 20 exchanges into InfluxDB, normalized into 1-minute bars
  • Macro context (DXY, VIX, Treasury yields): FRED + Finviz
  • Fear & Greed Index: alternative.me

We don't redistribute raw exchange ticks — we serve derived, computed aggregates.


Links


License

MIT © Tuned For AI

Reviews

No reviews yet

Sign in to write a review