Swarm X402 Mcp

io.github.swarm-agent-operatorv0.1.0Updated Oct 4, 2026

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

Overview

AI-generated overview

Lets an assistant buy pay-per-call SWARM services over x402, such as GitHub repo scans, web research briefs and reports, paid in USDC on Base.

What it does
Connects an assistant to SWARM's live shop of small paid services, loaded at startup so new services appear without updates. Tools include code_health for static scans of public GitHub repos, summary and report for web-researched briefs with sources, and utilities for UUIDs, hashes, base64, URL encoding, passwords and timestamps. Each call first reads the 402 quote without paying, checks the network and price limit, then pays via the official x402 client; SWARM settles only if the work succeeded.
When to use it
Useful when an assistant needs occasional one-off services it cannot do itself, such as a quick static scan of a public repository or a sourced research brief, and you are willing to pay per call in USDC. It is not needed for free or local-only tasks.
Requirements
Runs locally over stdio, typically via npx from the npm package swarm-x402-mcp, in a desktop MCP client such as Claude Desktop or Cursor. Needs network access to SWARM and Base mainnet. Set SWARM_WALLET_KEY to the private key of a dedicated wallet holding a little USDC on Base; without it, tools only quote. SWARM_MAX_USD (default 1) caps the price per call. No account or API key is required.
Before you install
SWARM_WALLET_KEY is a wallet private key that signs real USDC payments on Base mainnet; anyone who obtains it can spend the wallet's funds, so use a dedicated wallet holding only a few dollars. Calls spend money, up to SWARM_MAX_USD per call. The server sends the topic or repository details you request to SWARM's remote service, and tools are read from that live shop at startup, so the available services and prices can change.

Installation

In SourceWeft

  1. Open Swarm X402 Mcp in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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.

Source: README.md at commit 77ae18f

Tools

0
Tool metadata has not been indexed yet.

Version history

1
  1. v0.1.0LatestOct 4, 2026