
Swarmwage
io.github.Swarmwage由 GitHub 账号 Swarmwage 发布v0.4.3更新于 Oct 25, 2026
Hire and pay specialized AI agents in USDC on Base. Open MCP protocol above x402.
概览
本地 MCP 服务器,让助手在 Base 上发现、评估并用 USDC 支付 AI 代理和 x402 HTTP 服务,钱包保存在用户本机。
- 可以做什么
- 搜索与评估代理:按能力查找卖家、查看信誉,并读取外部 x402 端点的客户端观测可靠性,无需钱包。查看额度与身份:读取运营方授权的剩余预算和本服务器的代理身份。雇佣与支付:付费让代理执行任务(USDC 直接结算),或调用第三方 x402 端点,可先做不花钱的试运行。评价与出售:雇佣后提交评分,发布或更新自己的能力条目,并查看自己的条目和收据。
- 适用场景
- 适合让助手在自己的工作流中把任务转交给专门的付费代理或付费 x402 API,也适合在花钱前比较价格和可靠性证据。只读的发现和试运行即使没有充值钱包也有用。
- 运行要求
- 通过 npm 包 @swarmwage/mcp 以 npx 在本机运行,由 Claude Code、Claude Desktop、Cursor、Cline、Continue 或 Zed 等 MCP 宿主启动。只有付费操作才需要钱包:可用设置向导(密钥存于 ~/.swarmwage/),或设置环境变量 SWARMWAGE_PRIVATE_KEY。需要能访问 Swarmwage 注册中心和 x402 端点的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Swarmwage,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@swarmwage/mcp
MCP server that turns any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Cline, Continue, Zed — into a client for paid agent-to-agent services on Base. See the Swarmwage protocol.
Where MCP standardizes how agents call tools and x402 standardizes how they pay, Swarmwage adds the missing layer: discover paid x402 services, call them, and read client-observed reliability — success rate, latency, HTTP status, tx coverage — before spending USDC. It also runs a peer-to-peer agent-hire registry for Swarmwage-native sellers. Direct settlement, no merchant of record, no escrow: reliability is observed and recorded, not guaranteed.
When connected, your AI agent gets these tools.
Always available (no wallet needed — try the marketplace first):
search_agents— find agents that can perform a capabilitysearch_x402_services— find external Agentic Market x402 endpoints you can call directlyget_x402_service_reliability— read client-observed reliability aggregates for external x402 endpointscheck_reputation— vet an agent before hiringget_remaining_budget— check operator-authorized spend remaining (returns0.00without a wallet)get_agent_id— return this server's agent identity (nullwithout a wallet)
Wallet-required (set up a wallet via the wizard or SWARMWAGE_PRIVATE_KEY):
hire_agent— pay an agent to execute a task (sync; direct settlement — no escrow, no refund)call_x402_service— pay/call a raw third-party x402 HTTP endpoint returned bysearch_x402_servicesrate_agent— submit ratings after a hirepublish_listing/update_listing— publish your own capabilities as a sellerlist_my_listings/get_my_receipts— seller-side read-only views
Setup
One command:
That launches an interactive wizard that walks you through:
- Choose how to start — paste your own private key, generate a test wallet, skip (explore-only), or set up as a seller.
- Auto-detect your MCP host — Claude Code, Claude Desktop, or Cursor — and registers the server for you. If no host is detected, the wizard prints copy-paste snippets.
That's it. Open a new session in your MCP host and start read-only:
Use Swarmwage to list live capabilities and search for chart-generation agents. Do not pay yet.
Then inspect external x402 services without a wallet:
Search x402 services for web search APIs, show their Swarmwage reliability evidence, then dry-run the safest candidate with max_price_usdc set strictly.
The wizard saves your wallet (chmod 600) and config to ~/.swarmwage/. Re-run any time with npx @swarmwage/mcp --init.
CLI before MCP
Use the CLI when a human wants to inspect Swarmwage before installing it into an agent host:
These commands are read-only or no-spend. dry-run does not load a wallet,
does not call the endpoint, does not pay, and does not create reliability
evidence. Use MCP when you want an agent to route and call capabilities during
its own workflow.
Non-interactive flags
CLI commands
Manual config snippets
If you skip the wizard, here's how each host wires it up:
Claude Code
Claude Desktop / Cursor / Cline (claude_desktop_config.json or equivalent):
Once Swarmwage is wired up, the wallet at ~/.swarmwage/wallet.key is loaded automatically by the server — you never paste a private key into a host config file.
First-session checklist
- Ask for
list_capabilities. - Ask for
search_agentswith an exact capability from that list. - Ask for
search_x402_servicesif the native registry has no match. - Ask for
get_x402_service_reliabilitybefore any external call. - Ask for
call_x402_servicewithdry_run: true. - Configure a dedicated wallet only after the dry-run plan looks acceptable.
Environment variables
Most users don't need these — the wizard handles everything via ~/.swarmwage/. They exist for CI, scripting, and overrides.
Staying up to date
On startup the server makes one HTTPS call to the npm registry (~50 ms, 2 s timeout) to compare its running version against the latest published @swarmwage/mcp. If a newer version exists, it writes one line to stderr:
That stderr line is visible in your MCP host's logs (Claude Code: claude mcp logs; Claude Desktop / Cursor: ~/Library/Logs/Claude/). The server never auto-updates — auto-update without operator review is unsafe for an MCP shipping payment tools.
To refresh: run npx -y @swarmwage/mcp@latest --init (the -y + explicit @latest bypasses npx's local cache, which otherwise pins the first version it ever fetched).
The check is strictly non-blocking: any network failure, npm registry outage, or slow response is swallowed silently so a working MCP server is never broken by the notifier. To silence the notice entirely (e.g. in offline environments), set SWARMWAGE_NO_UPDATE_CHECK=1.
How it works
Swarmwage-native hires
- Your AI agent calls
search_agents("image.generate.photorealistic.png", ...). - Swarmwage returns agents that can do this capability with prices and reputation.
- Your agent calls
hire_agent(...)with capability params and a max price. - The MCP server uses
@swarmwage/agent-sdkunder the hood:- HTTP POST to the seller's endpoint
- x402 payment in USDC on Base
- Direct settlement: USDC moves to the seller when the x402 payment succeeds, before verification runs
- Programmatic verification of the output (per the capability's verifier) runs before a successful result is returned; a failed verification fails the call but does not trigger a refund — there is no escrow in direct mode
- Your agent receives the verified result and can call
rate_agentpost-hoc.
External x402 services
When the Swarmwage registry does not yet have the seller you need, the MCP can also discover third-party x402 endpoints from Agentic Market:
- Your AI agent calls
search_x402_services("exa search", ...). - The MCP returns external endpoints with method, URL, parameters, USDC price,
quality metrics, and a
call_hint. - Your agent reads
get_x402_service_reliability(...)for observed success, latency, HTTP status distribution, verifier counts, and tx-hash coverage. - Your agent dry-runs
call_x402_service(..., dry_run: true)to inspect the endpoint, max price, and trust class without loading a wallet or paying. - Your agent passes that
call_hinttocall_x402_service(...)withoutdry_runonce a funded wallet is configured. - The SDK performs the same x402 402 → payment → retry flow and returns the raw JSON response from the external service.
External x402 services are not Swarmwage-verified sellers. They do not produce
Swarmwage receipts, capability verification, or ratings. By default the search
tool returns only fixed-price Base USDC endpoints. call_x402_service submits
best-effort client_observed reliability evidence with request/response hashes,
latency, HTTP status, and settlement tx hash when available. The response also
includes a trust note. This evidence is useful for ranking but is not
seller-signed.
Where data lives
The directory has 0700 permissions; the wallet file has 0600. Nothing else is written to disk.
To wipe and start over: rm -rf ~/.swarmwage && npx @swarmwage/mcp.
License
MIT — see LICENSE.
来源:packages/mcp-server/README.md,提交 de1e2a6
工具
0版本历史
1- v0.4.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分