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.
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.
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:
- First request returns
HTTP 402 Payment Requiredwith the price - Agent signs a USDC payment locally (private key never leaves the agent)
- Agent retries with the payment header attached
- 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
- Service: x402.tunedfor.ai
- REST docs: x402.tunedfor.ai/catalog
- Quick-start: x402.tunedfor.ai/llms.txt
- npm: @tunedforai/x402-mcp
- Smithery: smithery.ai/server/@tunedforai/x402-mcp
- Issues / requests: github.com/tunedforai/x402-mcp/issues
- x402 protocol: x402.org
License
MIT © Tuned For AI
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。