Swarm X402 Mcp

io.github.swarm-agent-operatorv0.1.0更新于 Oct 4, 2026

Pay-per-call x402 services from SWARM: repo scans, web research. USDC on Base.

概览

AI 生成的概览

让助手通过 x402 购买 SWARM 的按次付费服务,例如 GitHub 仓库扫描、网络研究简报和报告,使用 Base 上的 USDC 支付。

功能
将助手连接到 SWARM 的小型付费服务实时商店,工具在启动时加载,因此新服务无需更新即可出现。工具包括:code_health 对公开 GitHub 仓库做静态扫描;summary 和 report 提供带来源的网络研究简报与报告;utilities 提供 UUID、哈希、base64、URL 编码、密码和时间戳。每次调用先读取 402 报价而不付款,检查网络和价格上限,然后通过官方 x402 客户端付款;只有工作成功时 SWARM 才会结算。
适用场景
适合助手偶尔需要自身无法完成的一次性服务时使用,例如快速静态扫描公开仓库或获取带来源的研究简报,并且你愿意按次用 USDC 付费。免费或纯本地任务不需要它。
运行要求
通过 stdio 在本地运行,通常用 npx 从 npm 包 swarm-x402-mcp 启动,运行于 Claude Desktop 或 Cursor 等桌面 MCP 客户端。需要访问 SWARM 和 Base 主网的网络连接。将 SWARM_WALLET_KEY 设为专用钱包的私钥,该钱包在 Base 上只持有少量 USDC;不设置时工具只报价。SWARM_MAX_USD(默认 1)限制每次调用的价格。无需账户或 API 密钥。
安装前请注意
SWARM_WALLET_KEY 是钱包私钥,用于在 Base 主网上签署真实的 USDC 付款;任何获得它的人都能花掉该钱包的资金,因此请使用只持有少量资金的专用钱包。调用会花钱,每次最高为 SWARM_MAX_USD。服务器会把你请求的主题或仓库信息发送给 SWARM 的远程服务,且工具在启动时从该实时商店读取,因此可用服务和价格可能变化。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Swarm X402 Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

swarm-x402-mcp

MCP server for SWARM, an autonomous agent that sells small services over x402. Add it to Claude Desktop, Cursor 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

The tools are read from the live shop when the server starts, so new services show up without an update:

ToolWhat it doesPrice
code_healthStatic scan of a public GitHub repo: TODOs, secret heuristics, hygiene$0.05
summaryOne-page brief on a topic, researched on the live web, with sources$0.75
reportFull researched report, with sources$0.99
utilitiesUUIDs, hashes, base64, URL encoding, passwords, timestamps$0.02

Install

json
{  "mcpServers": {    "swarm": {      "command": "npx",      "args": ["-y", "swarm-x402-mcp"],      "env": {        "SWARM_WALLET_KEY": "0x…",        "SWARM_MAX_USD": "1"      }    }  }}
  • SWARM_WALLET_KEY is the private key of the wallet that pays. Use a dedicated wallet holding only a few dollars of USDC on Base. 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.

Shop, offers and docs: https://swarm-agent.net · machine-readable: /offers, /openapi.json, /.well-known/x402

MIT licence.

来源:README.md,提交 77ae18f

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.1.0最新Oct 4, 2026