x402node-mcp
v1.0.1
Published
MCP server exposing the cn402.com + x402node.dev x402 paid-API catalog (Chinese almanac/fortune + developer & data tools) to AI agents, with automatic USDC-on-Base payment.
Downloads
721
Readme
x402node-mcp
An MCP server that drops the entire cn402.com + x402node.dev paid-API catalog into any MCP client (Claude Desktop, Cursor, etc.) as two tools. Your agent discovers and calls 300+ endpoints across 47 categories; payment is handled automatically over x402 (USDC on Base) — no API keys, no accounts, no manual checkout.
x402_list_endpoints— browse the live catalog (path, price, category, description), with optionalcategory/queryfilters.x402_call— call any endpoint by path; auto-pays in USDC on Base, capped atMAX_USDCper call.
The catalog is loaded live from the providers' manifests at startup, so new endpoints appear automatically without updating this package.
What's in the catalog
x402node.dev — developer & data tools for AI agents:
- On-chain data: token info, balances, holders, contract verification, address type (EOA / contract / Safe multisig / proxy), ENS, transaction decoding
- Crypto markets: live prices (multi-source cross-validated), batch prices, momentum, funding rates, gas comparison across chains, swap quotes & price impact (Uniswap V3)
- DeFi: lending markets, yield finder, DEX pools
- Risk & safety: token safety / honeypot checks, wallet profiles, OFAC screening, sanctions checks
- x402 ecosystem intelligence: real-time network health, wash-trading detection, seller revenue verification, pricing benchmarks — proprietary data
- Utilities: hashing, encoding, JWT, regex, cron, UUID, text tools
cn402.com — Chinese culture APIs: almanac (黄历), BaZi (八字), I-Ching, TCM, feng shui, and more.
Install
npm install -g x402node-mcpConfigure (Claude Desktop example)
Add to your MCP client config:
{
"mcpServers": {
"x402node": {
"command": "npx",
"args": ["x402node-mcp"],
"env": {
"PRIVATE_KEY": "0xYOUR_BASE_WALLET_PRIVATE_KEY",
"MAX_USDC": "1.00"
}
}
}
}PRIVATE_KEY(required): a Base wallet private key (0x+ 64 hex) holding USDC. Each call pays the listed price from this wallet.MAX_USDC(optional, default1.00): hard per-call spend cap. A call costing more than this is rejected.MANIFESTS(optional): comma-separated manifest URLs. Defaults to cn402.com + x402node.dev.
Usage
Once connected, just ask your agent naturally:
- "List the available on-chain data endpoints" → calls
x402_list_endpoints - "Get the live gas price across chains" → finds
/chain/gas-compare, pays, returns result - "Check if token 0x… is safe to buy" → finds the safety endpoint, pays, returns the risk score
The agent picks the endpoint, pays in USDC automatically, and returns the data.
How payment works
Endpoints return HTTP 402 with payment terms. This server signs an EIP-3009 USDC authorization on Base, the facilitator settles it, and the endpoint returns data — all in ~1-2 seconds, capped at MAX_USDC.
Links
- Catalog: https://api.x402node.dev · https://api.cn402.com
- Built on the x402 protocol
License
MIT
