mcpField
S
swarm-x402-mcp

swarm-x402-mcp

Local
github.com/swarm-agent-operatorDeveloper Tools0Updated 1w ago

About swarm-x402-mcp

swarm-x402-mcp is an MCP server for agents that want to use SWARM’s paid repository, web research, utility, and URL services. Calls are priced in USDC on Base, with a configurable spending cap and payment only after successful work.

Key features

  1. 01GitHub repository health scans
  2. 02Web-researched summaries and reports
  3. 03Encoding, hashing, and UUID utilities
  4. 04URL status and readable-page tools
  5. 05Per-call USDC payments on Base
  6. 06Maximum call-price limit

Use cases

  1. 01Inspect a public GitHub repository for maintenance issues
  2. 02Generate a sourced brief or report on a topic
  3. 03Check a URL or extract readable page text

MCP support

Exposes six paid tools to MCP clients. Without a wallet key, clients can list and quote tools; a configured wallet pays per call in USDC on Base.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"swarm-agent-operator-swarm-x402": {
"command": "npx",
"args": [
"-y",
"swarm-x402-mcp"
],
"env": {
"SWARM_WALLET_KEY": "<SWARM_WALLET_KEY>",
"SWARM_MAX_USD": "<SWARM_MAX_USD>"
}
}
}
}
Run commandnpx -y swarm-x402-mcp
Environment variables to set
SWARM_WALLET_KEYSecretPrivate key of a dedicated wallet with a little USDC on Base. Without it, tools only quote.
SWARM_MAX_USDRefuse any call priced above this many dollars (default 1).

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmswarm-x402-mcp0.1.3

Tools

4

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
nintegerNoHow many to generate
tstring|numberNoTimestamp to convert
opstringYesOperation, e.g. uuid, hash, base64, password, timestamp (see https://swarm-agent.net/openapi.json)
algostringNoHash algorithm
textstringNoInput text, for operations that take one
lengthintegerNoPassword length

Details

From the project README

swarm-x402-mcp

MCP server with paid tools: your agent pays per call in USDC on Base. No API key, no account.

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

Six tools. Each one calls SWARM's shop over the network and, with a wallet key, pays in USDC, so none is read-only; every tool declares this in its MCP annotations (readOnlyHint: false, openWorldHint: true):

ToolWhat you sendWhat you getPrice
code_healtha public GitHub repo URLstatic scan: TODO/FIXME debt, oversized files, secret heuristics, hygiene$0.05
summarya topicone-page brief, researched on the live web, sources linked$0.75
reporta topicfull Markdown report, researched on the live web, sources linked$0.99
utilitiesan operation (uuid, hash, base64, …)UUIDs, hashes, base64, URL encoding, passwords, timestamps$0.02
site_checka URLis it up: HTTP status, final URL after redirects, response time, TLS errors$0.002
read_pagea URLthe readable text of the page (menus, scripts and markup removed)$0.002

Install

You need Node.js 20 or newer. Use a dedicated wallet holding only a few dollars of USDC on Base for SWARM_WALLET_KEY.

Claude Code

claude mcp add --transport stdio swarm --env SWARM_WALLET_KEY=0x… --env SWARM_MAX_USD=1 -- npx -y swarm-x402-mcp

Cursor (~/.cursor/mcp.json) and Claude Desktop (Settings → Developer → Edit Config)

{
  "mcpServers": {
    "swarm": {
      "command": "npx",
      "args": ["-y", "swarm-x402-mcp"],
      "env": {
        "SWARM_WALLET_KEY": "0x…",
        "SWARM_MAX_USD": "1"
      }
    }
  }
}
  • SWARM_WALLET_KEY: the private key of the wallet that pays. 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.

Links

MIT licence.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.