io.github.agentc22/x402engine-mcp

السجل الرسمي أدوات المطورين

50+ pay-per-call APIs for AI agents — images, LLM, code, crypto, travel & more via x402

التثبيت

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

NPM package x402engine-mcp
Claude Code
claude mcp add x402engine-mcp -e 'X402_BASE_URL=<X402_BASE_URL>' -e 'X402_DEV_BYPASS=<your x402_dev_bypass>' -e 'X402_PAYMENT_HEADER=<your x402_payment_header>' -- npx -y x402engine-mcp@1.0.3
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "x402engine-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "x402engine-mcp@1.0.3"
            ],
            "env": {
                "X402_BASE_URL": "<X402_BASE_URL>",
                "X402_DEV_BYPASS": "<your x402_dev_bypass>",
                "X402_PAYMENT_HEADER": "<your x402_payment_header>"
            }
        }
    }
}

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

  • X402_BASE_URL Gateway URL (default: https://x402engine.app)
  • X402_DEV_BYPASS سري Dev bypass secret to skip payments during testing
  • X402_PAYMENT_HEADER سري Pre-signed x402 payment header for automatic payment

التوثيق

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

المحتويات
  1. x402engine-mcp
  2. Quick Start
  3. Hermes Agent
  4. Payment Controls
  5. MCP Tools
  6. Discovery
  7. Development
  8. Links

x402engine-mcp

Agent-friendly MCP server for x402engine. It lets agents discover and call pay-per-request APIs through HTTP 402, with automatic USDC payment on Base or Solana.

The live gateway covers LLMs, image and video generation, web search and scraping, code execution, crypto and wallet data, transaction simulation, audio, travel, and IPFS. This MCP exposes a curated tool set and live discovery for the full catalog.

Quick Start

Use a dedicated, low-balance payer wallet. The MCP signs x402 payments locally and never sends the private key to x402engine.

Base
{
  "mcpServers": {
    "x402engine": {
      "command": "npx",
      "args": ["-y", "x402engine-mcp@1.1.1"],
      "env": {
        "X402_EVM_PRIVATE_KEY": "0xYOUR_DEDICATED_PAYER_KEY",
        "X402_PAYMENT_NETWORK": "base",
        "X402_MAX_PAYMENT_USD": "1.00"
      }
    }
  }
}

Fund the wallet with USDC on Base. The x402 facilitator pays transaction gas; the wallet signs an EIP-3009 USDC authorization.

Solana
{
  "mcpServers": {
    "x402engine": {
      "command": "npx",
      "args": ["-y", "x402engine-mcp@1.1.1"],
      "env": {
        "X402_SOLANA_PRIVATE_KEY": "YOUR_BASE58_OR_JSON_PRIVATE_KEY",
        "X402_PAYMENT_NETWORK": "solana",
        "X402_MAX_PAYMENT_USD": "1.00"
      }
    }
  }
}

Fund the wallet with USDC on Solana and enough SOL for transaction fees.

Discovery Without a Wallet

The server starts without a wallet, and free tools such as discover_services and service_health still work. Paid tools return their x402 payment requirements until a wallet is configured.

claude mcp add x402engine -- npx -y x402engine-mcp@1.1.1

Hermes Agent

Install the x402engine skill and merge this server into the active Hermes profile's config.yaml:

mcp_servers:
  x402engine:
    command: npx
    args: ["-y", "x402engine-mcp@1.1.1"]
    env:
      X402_BASE_URL: "https://x402engine.app"
      X402_PAYMENT_NETWORK: "auto"
      X402_MAX_PAYMENT_USD: "0.10"

Start a new session and call discover_services or service_health; both are free. Keep the network on auto until a wallet is configured. For Base payments, store X402_EVM_PRIVATE_KEY in the profile's local .env, add X402_EVM_PRIVATE_KEY: "${X402_EVM_PRIVATE_KEY}" to the server's env, and change the network to base. Never put wallet keys in chat. The cap applies per request; authorize a separate total budget for each task.

Full Hermes setup guide · Installable skill

Payment Controls

VariableDefaultDescription
X402_EVM_PRIVATE_KEYunsetDedicated payer key for Base USDC
X402_SOLANA_PRIVATE_KEYunsetBase58 or JSON payer key for Solana USDC
X402_PAYMENT_NETWORKautoauto, base, or solana
X402_MAX_PAYMENT_USD1.00Hard per-request spending limit
X402_BASE_URLproduction gatewayOverride the gateway URL
X402_PAYMENT_HEADERunsetLegacy pre-signed x402 header
X402_DEV_BYPASSunsetDevelopment bypass secret

In auto mode, Base is preferred when both keys are configured. Automatic payment only accepts the canonical USDC contracts on Base and Solana. It rejects unknown assets, unsupported networks, and amounts above the configured cap before signing.

MegaETH remains available to clients that supply their own compatible payment header.

MCP Tools

CategoryTools
Discoverydiscover_services, service_health
Image and codegenerate_image, execute_code
Audiotranscribe_audio
Cryptoget_crypto_price, get_crypto_markets, get_crypto_history, get_trending_crypto, search_crypto, get_crypto_categories
Wallet and tokenget_wallet_balances, get_wallet_transactions, get_wallet_pnl, get_token_prices, get_token_metadata
IPFSpin_to_ipfs, get_from_ipfs
Travelsearch_flights, search_locations, search_hotels, search_cheapest_dates

Prices are included in each tool description and in live discovery. The gateway catalog can change independently of this package.

Discovery

Development

npm install
npm test
npm run build

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

ما هو io.github.agentc22/x402engine-mcp؟

50+ pay-per-call APIs for AI agents — images, LLM, code, crypto, travel & more via x402

كيف أثبّت io.github.agentc22/x402engine-mcp؟

يعمل على جهازك. في Claude Code: claude mcp add x402engine-mcp -e 'X402_BASE_URL=<X402_BASE_URL>' -e 'X402_DEV_BYPASS=<your x402_dev_bypass>' -e 'X402_PAYMENT_HEADER=<your x402_payment_header>' -- npx -y x402engine-mcp@1.0.3. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

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

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

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

شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.

من يصون io.github.agentc22/x402engine-mcp؟

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

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