
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.
概覽
讓助理透過 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 金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Swarm X402 Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
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:
Install
SWARM_WALLET_KEYis 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(default1): 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- v0.1.0最新Oct 4, 2026

