io.github.x402node/x402-mcp

السجل الرسمي أخرى

Hundreds of x402-paid APIs as MCP tools, auto-discovered from Coinbase Bazaar. USDC on Base+Solana.

ماذا يمكنك أن تفعل مع io.github.x402node/x402-mcp؟

  • Auto-discovers x402 endpoints from CDP Bazaar (no hard-coded list)
  • Reads metadata directly from Bazaar (description, schema, pricing)
  • Refreshes every 5 min — new endpoints appear without restart
  • Handles HTTP 402 + USDC payment automatically
  • Multi-chain: Base + Solana mainnet live (USDC on both); Polygon/BNB/EVM expandable

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

NPM package x402node-mcp
Claude Code
claude mcp add x402-mcp -e 'X402_PRIVATE_KEY=<your x402_private_key>' -- npx -y x402node-mcp@1.0.4
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "x402-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "x402node-mcp@1.0.4"
            ],
            "env": {
                "X402_PRIVATE_KEY": "<your x402_private_key>"
            }
        }
    }
}

متغيرات البيئة

  • X402_PRIVATE_KEY إلزامي سري Base EOA private key (hex, 0x-prefixed) with USDC for signing x402 payments

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. x402-mcp
  2. Features
  3. Install (Claude Desktop)
  4. Cost Safety
  5. How it works
  6. Development
  7. Links
  8. License

x402-mcp

MCP server bringing hundreds of x402-paid APIs to AI agents (Claude, Cursor, MCP-aware clients). Auto-discovers tools from CDP Bazaar; handles USDC micropayments on Base + Solana.

Features

  • Auto-discovers x402 endpoints from CDP Bazaar (no hard-coded list)
  • Reads metadata directly from Bazaar (description, schema, pricing)
  • Refreshes every 5 min — new endpoints appear without restart
  • Handles HTTP 402 + USDC payment automatically
  • Multi-chain: Base + Solana mainnet live (USDC on both); Polygon/BNB/EVM expandable

Install (Claude Desktop)

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "x402-mcp": {
      "command": "npx",
      "args": ["-y", "x402node-mcp"],
      "env": { "X402_PRIVATE_KEY": "0xYOUR_BASE_PRIVATE_KEY" }
    }
  }
}

Set X402_PRIVATE_KEY to a Base EOA private key (hex, 0x-prefixed) with USDC on Base mainnet (Solana payment via SPL USDC also supported). Restart Claude Desktop. The server auto-discovers ~117 tools on first run.

Cost Safety

  • Each tool call costs $0.0001-$0.10 USDC depending on endpoint
  • Hard cap: MAX_PRICE_USD env var (default $0.10/call); calls above are blocked
  • Use a fresh burner wallet, not your main wallet

How it works

Agent calls tool -> HTTP 402 -> x402-fetch signs EIP-3009 -> CDP Facilitator settles on Base or Solana -> response returned. Buyer pays no gas.

Development

git clone https://github.com/x402node/x402-mcp
cd x402-mcp
npm install
cp .env.example .env  # edit X402_PRIVATE_KEY
node mcp-server.js

License

MIT

الأسئلة الشائعة

ما هو io.github.x402node/x402-mcp؟

Hundreds of x402-paid APIs as MCP tools, auto-discovered from Coinbase Bazaar. USDC on Base+Solana.

كيف أثبّت io.github.x402node/x402-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add x402-mcp -e 'X402_PRIVATE_KEY=<your x402_private_key>' -- npx -y x402node-mcp@1.0.4. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج io.github.x402node/x402-mcp إلى مفتاح API؟

نعم. يتطلب X402_PRIVATE_KEY، وتضبطها في إعداداته.

هل io.github.x402node/x402-mcp مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون io.github.x402node/x402-mcp؟

ينشره x402node. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.