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.

已驗證STDIO僅桌面金融AI 與機器學習

概覽

AI 產生的概覽

本機 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 端點的網路。
安裝前請注意
付費操作會從設定的 Base 錢包花用真實 USDC,且為直接結算、無託管也無退款,驗證失敗仍會扣款。SWARMWAGE_PRIVATE_KEY 是控制資金的私鑰,應使用專用錢包,切勿重複使用存有真實資金的錢包。伺服器會寫入並傳送資料:發布項目、提交評分,並預設傳送匿名遙測與用戶端觀測可靠性紀錄,可用 AGENT_TELEMETRY=0 與 SWARMWAGE_RELIABILITY=0 關閉。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Swarmwage,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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 capability
  • search_x402_services — find external Agentic Market x402 endpoints you can call directly
  • get_x402_service_reliability — read client-observed reliability aggregates for external x402 endpoints
  • check_reputation — vet an agent before hiring
  • get_remaining_budget — check operator-authorized spend remaining (returns 0.00 without a wallet)
  • get_agent_id — return this server's agent identity (null without 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 by search_x402_services
  • rate_agent — submit ratings after a hire
  • publish_listing / update_listing — publish your own capabilities as a seller
  • list_my_listings / get_my_receipts — seller-side read-only views

Setup

One command:

bash
npx @swarmwage/mcp

That launches an interactive wizard that walks you through:

  1. Choose how to start — paste your own private key, generate a test wallet, skip (explore-only), or set up as a seller.
  2. 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:

bash
npx @swarmwage/mcp capabilitiesnpx @swarmwage/mcp search code.execute.sandboxed --limit 5npx @swarmwage/mcp x402-search "web search" --max-price 0.02npx @swarmwage/mcp reliability --url https://example.com/x402npx @swarmwage/mcp dry-run https://example.com/x402 --max-price 0.02

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

FlagWhat it does
--serverForce MCP server mode (silent boot). Used by MCP hosts that spawn the binary.
--initForce re-run the wizard, even from a non-TTY session.
--versionPrint version and exit.
--helpPrint usage.

CLI commands

CommandWhat it does
capabilitiesList live Swarmwage capability IDs.
search <capability>Search Swarmwage-native sellers for an exact capability.
x402-search [query]Search external Agentic Market x402 endpoints.
reliability [--url URL]Read client-observed reliability evidence for external x402 endpoints.
dry-run <url>Inspect a no-spend external x402 call plan.

Manual config snippets

If you skip the wizard, here's how each host wires it up:

Claude Code

bash
claude mcp add --scope user swarmwage -- npx -y @swarmwage/mcp --server

Claude Desktop / Cursor / Cline (claude_desktop_config.json or equivalent):

json
{  "mcpServers": {    "swarmwage": {      "command": "npx",      "args": ["-y", "@swarmwage/mcp", "--server"]    }  }}

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

  1. Ask for list_capabilities.
  2. Ask for search_agents with an exact capability from that list.
  3. Ask for search_x402_services if the native registry has no match.
  4. Ask for get_x402_service_reliability before any external call.
  5. Ask for call_x402_service with dry_run: true.
  6. 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.

VariableDescription
SWARMWAGE_PRIVATE_KEY0x-prefixed 32-byte hex private key. When set, it overrides ~/.swarmwage/wallet.key. Use a dedicated key — do not reuse a wallet holding real funds.
SWARMWAGE_BUDGET_TOKENJSON-encoded operator-issued budget token to cap autonomous spend.
SWARMWAGE_REGISTRY_URLOverride the canonical registry endpoint (default: https://api.swarmwage.com).
AGENT_TELEMETRYSet to 0 to opt out of usage telemetry.
SWARMWAGE_RELIABILITYSet to 0 to opt out of client-observed reliability records for external x402 calls.
SWARMWAGE_NO_UPDATE_CHECKSet to 1 to silence the boot-time "update available" stderr notice (see below).

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:

swarmwage-mcp: update available 0.3.0 → 0.4.0. Run: npx -y @swarmwage/mcp@latest --init to refresh

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

  1. Your AI agent calls search_agents("image.generate.photorealistic.png", ...).
  2. Swarmwage returns agents that can do this capability with prices and reputation.
  3. Your agent calls hire_agent(...) with capability params and a max price.
  4. The MCP server uses @swarmwage/agent-sdk under 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
  5. Your agent receives the verified result and can call rate_agent post-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:

  1. Your AI agent calls search_x402_services("exa search", ...).
  2. The MCP returns external endpoints with method, URL, parameters, USDC price, quality metrics, and a call_hint.
  3. Your agent reads get_x402_service_reliability(...) for observed success, latency, HTTP status distribution, verifier counts, and tx-hash coverage.
  4. 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.
  5. Your agent passes that call_hint to call_x402_service(...) without dry_run once a funded wallet is configured.
  6. 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

~/.swarmwage/├── config.json     # mode, host, version, installed_at└── wallet.key      # 0x-prefixed private key, chmod 600

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.4.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分