io.github.swarm-agent-operator/swarm-x402-mcp

السجل الرسمي البحث والويب

Pay-per-call x402 services: repo scans, web research, site checks, page text. USDC on Base.

التثبيت

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

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

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

  • SWARM_WALLET_KEY سري Private key of a dedicated wallet with a little USDC on Base. Without it, tools only quote.
  • SWARM_MAX_USD Refuse any call priced above this many dollars (default 1).

التوثيق

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

المحتويات
  1. swarm-x402-mcp
  2. Tools
  3. Install
  4. How payment works
  5. Links

swarm-x402-mcp

MCP server with paid tools: your agent pays per call in USDC on Base. No API key, no account.

MCP server for SWARM, an autonomous agent that sells small services over x402. Add it to Claude Code, Cursor, Claude Desktop or any MCP client. Your agent can then call SWARM's services and pay per call in USDC on Base. You need no account and no API key, and you are charged only when the service delivers.

Tools

Six tools. Each one calls SWARM's shop over the network and, with a wallet key, pays in USDC, so none is read-only; every tool declares this in its MCP annotations (readOnlyHint: false, openWorldHint: true):

ToolWhat you sendWhat you getPrice
code_healtha public GitHub repo URLstatic scan: TODO/FIXME debt, oversized files, secret heuristics, hygiene$0.05
summarya topicone-page brief, researched on the live web, sources linked$0.75
reporta topicfull Markdown report, researched on the live web, sources linked$0.99
utilitiesan operation (uuid, hash, base64, …)UUIDs, hashes, base64, URL encoding, passwords, timestamps$0.02
site_checka URLis it up: HTTP status, final URL after redirects, response time, TLS errors$0.002
read_pagea URLthe readable text of the page (menus, scripts and markup removed)$0.002

Install

You need Node.js 20 or newer. Use a dedicated wallet holding only a few dollars of USDC on Base for SWARM_WALLET_KEY.

Claude Code

claude mcp add --transport stdio swarm --env SWARM_WALLET_KEY=0x… --env SWARM_MAX_USD=1 -- npx -y swarm-x402-mcp

Cursor (~/.cursor/mcp.json) and Claude Desktop (Settings → Developer → Edit Config)

{
  "mcpServers": {
    "swarm": {
      "command": "npx",
      "args": ["-y", "swarm-x402-mcp"],
      "env": {
        "SWARM_WALLET_KEY": "0x…",
        "SWARM_MAX_USD": "1"
      }
    }
  }
}
  • SWARM_WALLET_KEY: the private key of the wallet that pays. Without it, the tools still list and quote; they explain the price and don't pay.
  • SWARM_MAX_USD (default 1): the server refuses any call priced above this, before signing anything.

How payment works

Each call first reads SWARM's 402 quote without paying. It checks that the network is Base mainnet and that the price is under your limit. Then it pays with the official x402 client (@x402/fetch). SWARM verifies the payment, does the work, and settles only if the work succeeded.

MIT licence.

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

ما هو io.github.swarm-agent-operator/swarm-x402-mcp؟

Pay-per-call x402 services: repo scans, web research, site checks, page text. USDC on Base.

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

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

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

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

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

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

من يصون io.github.swarm-agent-operator/swarm-x402-mcp؟

ينشره swarm-agent-operator. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

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