X402 Scan MCP logo

X402 Scan MCP

Scans x402 endpoints for valid payment challenges, agent discoverability, MPP support, and free-content leaks.

Install X402 Scan 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": {
    "x402-scan-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@forgemeshlabs/x402-scan-mcp"
      ]
    }
  }
}

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

Automated check passed— started and listed 3 tools correctly (6d ago).

Overview

The x402-scan-mcp MCP server probes x402-protected URLs and reports whether agents can discover and parse their payment challenges. It checks HTTP status, classic and body-based x402 envelopes, required payment fields, MPP discovery, and responses that incorrectly expose paid content. Use it locally before publishing or troubleshooting one endpoint, or scan up to 10 URLs in a batch. No payment is sent, and outbound requests are restricted to approved public HTTP targets.

Use cases

  • Validate a new x402 payment route
  • Find malformed payment envelopes
  • Batch-check a catalog of paid endpoints
  • Detect paid content returned for free

Key features

  • Checks HTTP 402 responses and x402 envelopes
  • Validates payment fields and Base64-encoded JSON
  • Reports MPP dual-stack discovery
  • Grades endpoints from A to F with findings
  • Scans up to 10 URLs sequentially
  • Blocks unsafe and private network targets

Tools3

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

Verified live~565 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 Today

Recent health check succeeded.

6/6 checks healthy over the last 21d

What it can do

From the 3 tools this server returned when we ran it; 3 declare their own safety hints.

Makes network requests · 3Read-only tools · 3
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age74 days
Maintainers1

Observed 2026-11-02 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · @forgemeshlabs/x402-scan-mcp (npm)

Adoption & maintenance

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

npm downloads1.1kPackage downloads in the last 30 days.
Last commit7d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed3Callable tools this server registers over MCP.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How X402 Scan MCP works

What x402-scan-mcp does

The x402-scan-mcp MCP server examines whether an HTTP endpoint presents a usable x402 payment challenge. It is intended for developers operating paid APIs, feeds, or other routes that should return 402 Payment Required until an agent pays.

A scan evaluates the response status, finds the payment envelope in the PAYMENT-REQUIRED header or response body, and checks whether the encoded value can be decoded into valid JSON. It also verifies that the envelope has a numeric x402Version, a non-empty accepts[] list, and the required scheme, network, asset, payTo, and amount fields on each payment option.

Results include an A–F grade and plain-language findings. The grading distinguishes a valid classic envelope with MPP discovery from a classic-only result, malformed or missing payment data, unreachable routes, incorrect statuses, and routes that return paid content without payment.

How it works

The server exposes MCP tools that make outbound requests to the URLs supplied by the user. scan_endpoint probes one URL, while scan_batch runs the same check sequentially for up to 10 URLs and produces a short aggregate count. census_stats retrieves live ForgeMesh catalog statistics and reports headline figures from the August 2026 x402 Bazaar health census.

The scanner never includes a PAYMENT-SIGNATURE, so it cannot authorize or settle a transaction. Redirects are reported rather than followed. A scan normally makes one GET request and may make one POST retry when the endpoint responds with 405; requests have an 8-second timeout and a 64 KB body limit.

Setup and configuration

Install Node.js 20 or newer, then run the published package through npx or install it globally with npm. For MCP clients, the recommended command is npx -y @forgemeshlabs/x402-scan-mcp. Claude Code can register that command directly, while Claude Desktop, Cursor, and Windsurf can use an MCP server entry with npx as the command and the package arguments.

The x402-scan-mcp MCP server uses stdio by default and does not require environment variables, an API key, a wallet, or a source checkout. A source build is available for development with the repository's npm install and build commands. A CLI smoke test can scan a URL from a source checkout.

Tools and capabilities

  • scan_endpoint: checks one endpoint's status, envelope location and validity, payment-option summary, MPP support, grade, and findings.
  • scan_batch: checks up to 10 URLs sequentially and summarizes healthy, unavailable, and malformed results.
  • census_stats: returns ForgeMesh catalog statistics and the published census headline numbers.

The x402-scan-mcp MCP server also applies SSRF protections. Only http and https schemes are accepted, and explicit ports are limited to 80, 443, 8080, and 8443. Local names and private, loopback, link-local, reserved, multicast, CGNAT, and cloud-metadata destinations are rejected after DNS validation. The request connects to the validated public IP while retaining hostname verification for TLS.

Limitations and notes

This is a local probe: apart from the endpoint being tested, census_stats may contact ForgeMesh's public statistics endpoint. It does not perform a payment or verify settlement. The scanner reports a redirect without inspecting the destination, and it cannot test endpoints blocked by its scheme, port, hostname, or destination policies.

The hosted ForgeMesh scan and browser tool are separate services. A public HTTP deployment of this MCP server should add authentication, per-client rate limits, request logging, and an egress policy before exposure. The package is distributed under the MIT license.

Reviews

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

Frequently Asked Questions about X402 Scan MCP

x402-scan-mcp is an MCP server that connects to x402 HTTP endpoints and checks whether agents can discover and parse their payment challenges. Its main tools, scan_endpoint and scan_batch, inspect statuses, envelopes, required payment fields, MPP support, and free-content leaks; census_stats reports ForgeMesh census data.

Install it with Node.js 20 or newer using npx -y @forgemeshlabs/x402-scan-mcp, or install the package globally with npm. MCP clients can launch the npx command directly, so cloning and building the repository is not required for normal use.

Yes, x402-scan-mcp works with Cursor through a standard MCP configuration. Add an entry that runs npx with -y and @forgemeshlabs/x402-scan-mcp as its argument, then use the scanning tools from the client.

No, x402-scan-mcp never sends a payment or a PAYMENT-SIGNATURE. It only inspects the 402 challenge returned by the endpoint, so it cannot authorize or settle an x402 transaction.

The scan_batch tool accepts up to 10 URLs and processes them sequentially. It returns individual scan results along with a one-line summary of healthy endpoints, unavailable endpoints, and broken envelopes.

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 PreviewX402 Scan MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/x402-scan-mcp?style=directory)](https://allmcps.com/mcp/x402-scan-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/x402-scan-mcp"><img src="https://allmcps.com/api/badge/x402-scan-mcp?style=directory" alt="X402 Scan MCP on AllMCPs" /></a>