Skip to main content
Glama
x402 crypto market structure

x402 crypto market structure

by tunedforai

x402-mcp

面向 AI 代理的跨交易所加密货币市场结构。涵盖 20 个交易所、26 种代币、6 种工具——包括快照、订单流、宏观环境、全面分析、地址风险和 API 信息。通过 MCP 免费使用。

npm version License: MIT

x402-mcp 是一个 stdio MCP 服务器,它将 x402.tunedfor.ai(一个实时加密市场结构 API)作为 6 种工具公开,任何兼容 MCP 的客户端(Claude Desktop、Cursor、Cline、Windsurf、Claude Code)均可调用。通过 MCP 免费用于测试和低频查询;对于需要更高吞吐量的生产环境代理,可在相同端点使用付费 REST 服务。


安装

Claude Desktop / Cursor / Windsurf

添加到您的 MCP 配置中(macOS 上为 ~/Library/Application Support/Claude/claude_desktop_config.json,其他操作系统路径类似):

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

Claude Code

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

Cline / Continue / 其他 MCP 客户端

使用与 stdio 命令相同的 npx -y @tunedforai/x402-mcp 调用方式。

手动安装

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

Related MCP server: hyperd-mcp

工具

所有 6 种工具均为无状态。无需 API 密钥,无需身份验证,无需设置。直接调用即可。

工具

返回内容

REST 等效项

MCP 免费 / REST 付费

marketSnapshot

实时价格、资金费率、持仓量 (OI)、买卖比率、恐慌贪婪指数

POST /data

免费 / $0.20

marketAnalyze

宏观环境、DXY、VIX、方向性信号 + 置信度

POST /analyze/market

免费 / $0.25

marketOrderflow

跨交易所 CVD、鲸鱼活动、清算压力

POST /analyze/orderflow

免费 / $0.50

marketFull

快照 + 订单流 + LLM 合成分析

POST /analyze/full

免费 / $0.75

addressRisk

钱包风险评分(混币器、制裁、交易对手)。EVM + Solana

POST /analyze/address

免费 / $0.25

apiInfo

定价、快速入门、迁移详情

GET /api_info

免费

代币覆盖范围

快照层级涵盖主流 L1 和 L2:BTC、ETH、SOL、XRP、BNB、DOGE、ADA、AVAX、LINK、ATOM、DOT、ARB、SUI、OP、LTC。

扩展订单流层级:除上述代币外,还包括 NEAR、AAVE、BCH、HBAR、SHIB、TON、TRX、UNI、XLM。

从任何 MCP 客户端调用 apiInfo 以获取权威的当前列表。


示例

交易前检查

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.

跨交易所订单流

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.

免费 MCP 与付费 REST 的区别

MCP 封装版免费且有速率限制——非常适合测试、原型设计、低频代理工作流和个人使用。

对于生产环境代理(24/7 轮询、多代币监控、大规模回测),请使用 x402.tunedfor.ai 上的付费 REST 端点。REST 服务的特点:

  • 通过 x402 协议 在 Base 或 Solana 上以 USDC 按次付费

  • 无 API 密钥——您的代理在本地签署支付;私钥永远不会离开您的机器

  • 速率限制为每个钱包每分钟 60 次调用,每小时 200 次调用——防止滥用;超出限制返回 429

  • 无订阅——无月度最低消费

从任何 MCP 客户端调用 apiInfo 以获取当前的定价表、迁移指南和 SDK 示例。


x402 支付的工作原理(REST 层级)

当您的代理调用付费 REST 端点时:

  1. 首次请求返回 HTTP 402 Payment Required 以及价格信息

  2. 代理在本地签署 USDC 支付(私钥永远不会离开代理)

  3. 代理携带支付头信息重试请求

  4. 服务器验证链上结算并返回数据

无需账户,无需 API 密钥,无需信用卡。只需 USDC 和一个钱包。


数据来源

  • 价格 + 报价: OKX、Coinbase 公共 API

  • 资金费率 / 持仓量 / 清算: Coinalyze(商业许可)

  • 链上指标、交易所流量、鲸鱼比率: 授权的第三方机构数据

  • 跨交易所订单流(CVD、鲸鱼柱、清算聚合): 跨 20 个交易所的 WebSocket 聚合器,存入 InfluxDB,归一化为 1 分钟 K 线

  • 宏观背景(DXY、VIX、国债收益率): FRED + Finviz

  • 恐慌贪婪指数: alternative.me

我们不分发原始交易所数据——我们提供衍生、计算后的聚合数据。所有原始源字段在返回响应前都会转换为我们自己的复合信号。


链接


许可证

MIT © Tuned For AI

Available Tools

9 tools
addressRiskB

Risk score for an Ethereum wallet address. Flags mixers, sanctions, high-risk counterparties.

Inputs: address (required).

apiInfoB

x402 API pricing, quick start guide, and migration details for the pay-per-call REST endpoint.

Inputs: no named parameters.

history1dA

Daily OHLCV price history with buy/sell flow data. Up to 7 years of daily bars, up to 5,000 bars per call. Good for backtesting and trend analysis.

Inputs: token, limit.

history1hA

Hourly OHLCV price history with buy/sell flow data. Up to 7 years of 1-hour bars, up to 5,000 bars per call.

Inputs: token, limit.

history5mB

5-minute OHLCV price bars. High-resolution intraday data.

Inputs: token, limit.

marketAnalyzeC

Full pre-trade macro analysis: regime detection, DXY, VIX, fear/greed, directional signal and confidence score.

Inputs: token.

marketFullB

Full market data bundle: snapshot + orderflow combined. Most comprehensive view.

Inputs: token.

marketOrderflowC

Real-time orderflow data: buy/sell pressure, delta, imbalance across exchanges.

Inputs: token.

marketSnapshotB

Live crypto market snapshot: price, funding rate, open interest, buy/sell ratio, fear/greed index. Supports BTC ETH SOL XRP BNB DOGE ADA AVAX LINK ATOM DOT ARB SUI OP LTC.

Inputs: token.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools have distinct purposes, such as addressRisk for wallet analysis and apiInfo for API details, but the market-related tools (marketAnalyze, marketFull, marketOrderflow, marketSnapshot) have some overlap in providing market data, which could cause confusion. However, their descriptions help clarify specific focuses like orderflow vs. snapshot.

    Naming Consistency3/5

    The naming is mixed: history tools use a consistent pattern (history1d, history1h, history5m), but market tools vary (marketAnalyze, marketFull, marketOrderflow, marketSnapshot), and others like addressRisk and apiInfo use different styles. This lacks a unified verb_noun convention, though names remain readable.

    Tool Count5/5

    With 9 tools, the count is well-scoped for a crypto market structure server, covering risk assessment, API info, historical data at multiple resolutions, and various market analyses. Each tool earns its place without feeling excessive or insufficient.

    Completeness4/5

    The tool set covers key aspects of crypto market analysis, including risk, API access, historical data, and real-time market insights. Minor gaps might exist, such as lack of tools for portfolio management or advanced trading actions, but core workflows for data retrieval and analysis are well-covered.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Real-time crypto intelligence for AI agents. Technical analysis, liquidation heatmaps, sentiment, and funding rates for 50+ Hyperliquid perpetuals via x402 micropayments.
      15
      39 PyPI
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Read-only crypto perps microstructure for AI agents: normalized cross-exchange market state (funding + multi-year percentile, OI, volume, CVD, order-book imbalance, liquidations, basis), OHLCV, 15-min state history, and measured conditional outcomes (historical base rates, not predictions) — 6 assets across Binance, Bybit, OKX and Hyperliquid, every metric with self-declared coverage and freshness
      MIT