x402-mcp
@speccy/x402-mcp
MCP 服务器,封装了 Speccy 的付费 x402 端点。为任何兼容 MCP 的 AI 智能体提供两个超强工具——预测市场数据和沙箱化的 Python 执行器——而服务器会以 Base 网络上的 USDC 替你支付每次调用的费用。
智能体无需了解 x402。智能体端无需配置钱包。只需安装服务器,把智能体指向它,搞定。
工具
工具 | 描述 | 每次调用费用 |
| 热门 Polymarket 预测市场(按 volume、liquidity 或 startDate 排序) | $0.01 USDC |
| 在隔离的 Docker 沙箱中运行 Python 3.12 代码(无网络、只读文件系统、30 秒超时、64KB 输出上限) | $0.02 USDC |
Related MCP server: Polymarket MCP Server
安装
npm install -g @speccy/x402-mcp配置
设置操作者钱包密钥(即每次调用支付 x402 的钱包):
export SPECCY_MCP_WALLET_KEY="0x..." # operator wallet private key可选覆盖项:
SPECCY_MCP_API_BASE(默认https://api.speccy.cloud)— Polymarket 端点SPECCY_MCP_EXEC_BASE(默认https://exec.speccy.cloud)— 沙箱执行端点
接入兼容 MCP 的智能体
Claude Desktop(claude_desktop_config.json):
{
"mcpServers": {
"speccy-x402": {
"command": "speccy-x402-mcp",
"env": { "SPECCY_MCP_WALLET_KEY": "0x..." }
}
}
}任意 MCP 客户端(stdio):
SPECCY_MCP_WALLET_KEY=0x... speccy-x402-mcp架构
[Agent] → MCP tool call (stdio) → [this server] → x402 paid fetch → [Speccy endpoint on VPS]
→ [CDP facilitator] → on-chain USDC transfer服务器持有一个操作者钱包。每次调用都会从该钱包发起一笔 x402 支付。结算提醒会通过 Notifier 机器人(与 HTTP 端点使用同一后端)发送到操作者的 Telegram。
备注
钱包密钥绝不会离开操作者的机器(通过环境变量提供,而非配置文件)。
在 Base 主网(
eip155:8453)上为钱包充值 USDC,并充值少量 ETH 作为保证金(仅在钱包进行非 x402 转账时才会用到)。目前仅支持在 Base 主网上结算。测试网 / 其他链需要
X402_NETWORK环境变量以及匹配的 facilitator。每次调用都是独立且无状态的——没有会话,服务器上不保存任何状态。
源码 / 问题
源码:github.com/speccy-ai/x402-mcp(占位符)
问题 / 功能请求:在仓库中提交 issue,或通过 Telegram 联系 @SpeccyNotifierbot
许可证
MIT — 由 Philip (Esla) 为 Speccy 编写。
Available Tools
2 toolsexec_pythonA
Run Python code in an isolated Docker sandbox. Costs $0.02 USDC per execution. No network, read-only filesystem, 30s timeout, 64KB output cap.
Inputs: code (required).
get_prediction_marketsB
Get top Polymarket prediction markets. Costs $0.01 USDC per call (x402 settled in background).
Inputs: sort, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are completely distinct in purpose: one fetches Polymarket prediction markets, the other executes Python code. There is no realistic risk of an agent confusing them.
Both tool names follow the same lowercase snake_case verb_noun pattern: get_prediction_markets and exec_python. The naming is predictable and consistent.
Two tools is on the thin side, and the tools are unrelated, making the server feel like a loose collection rather than a focused toolkit. The count is not unreasonable for a paid utility server, but it is borderline.
The tools have no shared domain and each is a single isolated operation. get_prediction_markets only returns top markets with no drill-down or follow-up actions, and exec_python is a one-off sandbox execution primitive. The broader x402 workflow is unclear, leaving significant gaps.
Maintenance
Related MCP Connectors
Pay-per-call Polymarket intelligence for AI agents: MCP server + x402 (USDC) API
71Market data and web intelligence for AI agents, paid per call in USDC on Base via x402.
Market and on-chain crypto data for AI agents. Pay per call in USDC on Base (x402).
17 pay-per-call web, finance, legal and onchain tools for AI agents. USDC on Base via x402/MPP.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to discover and analyze prediction markets, execute trades, and manage positions on Polymarket via the Model Context Protocol.786 npm22MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query Polymarket data such as top wallets, live trades, market details, and smart money flows using natural language through MCP tools.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to access crypto prices, DeFi yields, Polymarket data, Base chain info, and security scans with pay-per-call via USDC on Base mainnet.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to autonomously trade, analyze, and manage positions on Polymarket prediction markets with 45 tools, real-time WebSocket monitoring, and enterprise-grade safety features.MIT