x402 crypto market structure

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.

Category
Visit Server

README

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.

Tool What it returns REST equivalent Free via MCP / Paid REST
marketSnapshot Live price, funding, OI, buy/sell ratio, fear/greed POST /data Free / $0.20
marketAnalyze Macro regime, DXY, VIX, directional signal + confidence POST /analyze/market Free / $0.25
marketOrderflow Cross-exchange CVD, whale activity, liquidation pressure POST /analyze/orderflow Free / $0.50
marketFull Snapshot + orderflow + LLM-synthesized analysis POST /analyze/full Free / $0.75
addressRisk Wallet risk score (mixers, sanctions, counterparties). EVM + Solana POST /analyze/address Free / $0.25
history1h Hourly OHLCV with buy/sell flow split. Up to 5,000 bars, 7-year history POST /data/history/1h Free / $5.00
history1d Daily OHLCV with buy/sell flow split. Up to 5,000 bars, 7-year history POST /data/history/1d Free / $5.00
history5m 5-minute OHLCV. High-resolution intraday POST /data/history/5m Free / $1.00
apiInfo Pricing, quick-start, migration details GET /api_info Free

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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured