Swarm X402 MCP logo

Swarm X402 MCP

Pay-per-call MCP tools for repo scans, web research, page reading, site checks, and utilities using USDC on Base.

Install Swarm X402 MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "swarm-x402-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "swarm-x402-mcp"
      ],
      "env": {
        "SWARM_WALLET_KEY": "YOUR_VALUE_HERE",
        "SWARM_MAX_USD": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Claude Code command
claude mcp add --env SWARM_WALLET_KEY=YOUR_VALUE_HERE --env SWARM_MAX_USD=YOUR_VALUE_HERE --transport stdio swarm-x402-mcp -- npx -y swarm-x402-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

npx -y swarm-x402-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

swarm-x402-mcp MCP server connects agents to SWARM services that charge per call in USDC on Base. It provides tools for GitHub code-health scans, live-web summaries and reports, URL checks, page extraction, and common utilities. Calls use x402 payment after checking the quote and a configured spending limit, with no account or API key required. Reach for it when an agent needs on-demand research or analysis and can pay from a dedicated Base wallet.

Use cases

  • Scan a public GitHub repository for code-health issues
  • Research a topic and return a sourced brief or report
  • Check whether a website is reachable and follow redirects
  • Extract readable text from a web page
  • Generate hashes, UUIDs, encodings, passwords, or timestamps

Key features

  • Per-call USDC payments over x402 on Base
  • Configurable maximum payment limit
  • GitHub repository static analysis
  • Live-web summaries and Markdown reports with sources
  • URL status checks and readable page extraction
  • Utility operations for encoding and identifiers

Tools6

What Swarm X402 MCP lets your agent do. Expand a tool for its parameters.

Self-reported~21 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 48d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned just now via OSV.dev · swarm-x402-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads373Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed6Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Swarm X402 MCP works

What swarm-x402-mcp does

swarm-x402-mcp exposes six paid SWARM services through MCP. The tools cover several small, focused tasks:

  • code_health scans a public GitHub repository for TODO/FIXME debt, oversized files, possible secrets, and general repository hygiene. It costs $0.05 per call.
  • summary researches a topic on the live web and returns a one-page brief with linked sources for $0.75.
  • report produces a longer Markdown research report with linked sources for $0.99.
  • utilities handles operations such as UUID generation, hashing, Base64 conversion, URL encoding, password generation, and timestamps for $0.02.
  • site_check checks a URL's HTTP status, redirect destination, response time, and TLS errors for $0.002.
  • read_page retrieves readable page text after removing menus, scripts, and markup for $0.002.

Each tool performs a network request to SWARM's shop. These are paid operations rather than local, read-only MCP resources.

How it works

For every call, the server first obtains SWARM's x402 quote and verifies that the payment network is Base mainnet and that the amount stays within the configured maximum. When a wallet key is available, the official @x402/fetch client signs and sends the USDC payment. SWARM verifies the payment, performs the requested work, and settles it only after the work succeeds.

The server returns failed calls as normal tool results with isError: true. The result identifies whether the payment was not charged, was charged, or has an unknown status. The server does not retry automatically. A settled payment includes a transaction hash; an uncertain payment status should be checked against the wallet before another call. Signed x402 payments use an EIP-3009 nonce and cannot be settled twice.

Without SWARM_WALLET_KEY, the tools can still list and quote services, but they do not pay for or complete paid calls.

Setup and configuration

Node.js 20 or newer is required. Install the package through npx and configure it as a stdio MCP server. Claude Code can use a command such as:

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

Cursor and Claude Desktop use an MCP configuration with npx -y swarm-x402-mcp as the command and the wallet settings in env.

SWARM_WALLET_KEY holds the private key for the wallet paying on Base. Use a dedicated wallet containing only a small USDC balance. SWARM_MAX_USD sets the highest price the server will accept before signing; its default is 1. Calls priced above that threshold are rejected before payment authorization.

AgentCash can also add the service with npx agentcash add https://swarm-agent.net.

Tools and capabilities

The research tools use the live web and include source links in their results. URL-oriented tools separate availability checks from content extraction: site_check reports connection details, while read_page returns cleaned text. Repository analysis accepts a public GitHub URL rather than local files. The utility endpoint groups several encoding, identifier, hashing, credential, and time-related operations behind an operation parameter.

Prices are attached to individual calls: $0.05 for code_health, $0.75 for summary, $0.99 for report, $0.02 for utilities, and $0.002 each for site_check and read_page.

Limitations and notes

The wallet key is payment authority, so it should not be placed in a broadly funded wallet. A retry after charged: no signs a new payment. If the result says charged: yes, do not pay again; use the receipt transaction hash when contacting SWARM. If it says charged: unknown, inspect the wallet before retrying.

The server targets Base mainnet for x402 payments. Its services depend on the SWARM shop and network access, and the research and page-reading tools operate against live web content.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Swarm X402 MCP

swarm-x402-mcp is an MCP server that connects AI agents to SWARM's paid services over x402 on Base, using USDC per call. Its main tools scan public GitHub repositories, research topics, generate reports, check websites, extract page text, and perform utilities such as hashing, encoding, UUIDs, passwords, and timestamps.

Install it with Node.js 20 or newer using `npx -y swarm-x402-mcp` in your MCP client's stdio configuration. Claude Code, Cursor, and Claude Desktop examples use that command; set the wallet and spending-limit environment variables alongside it.

No, it requires neither an account nor an API key. Paid calls use the private key of a wallet holding USDC on Base through `SWARM_WALLET_KEY`; without that key, the server can still list and quote services.

Set `SWARM_MAX_USD` to cap the price of an individual call. The default is $1, and the server rejects a quote above the limit before signing a payment.

The tool returns an error result stating whether payment was charged, safe to retry, or unknown. The server does not retry automatically; inspect the wallet when the status is unknown, and use the transaction hash rather than paying again when a call was charged.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSwarm X402 MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/swarm-x402-mcp?style=directory)](https://allmcps.com/mcp/swarm-x402-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/swarm-x402-mcp"><img src="https://allmcps.com/api/badge/swarm-x402-mcp?style=directory" alt="Swarm X402 MCP on AllMCPs" /></a>