x402 Conformance

io.github.atsp-protocolPublished by GitHub account atsp-protocolv1.6.0Updated Oct 25, 2026

x402 payment safety checks: validate a 402 answer, prove a server never serves before settlement.

Overview

AI-generated overview

An MCP server that runs x402 payment conformance checks, validating a paid endpoint's 402 response and proving a server never serves content before settlement.

What you can do
Check a paid URL's 402 answer against the P1-P7 payment-required checks with a single unpaid GET request. Run the full P1-P7 and R0-R10 check set against a built-in demo server, optionally with a deliberate fault. Start and stop a local facilitator double on loopback so your own resource server can be pointed at it. Probe a resource server on loopback for settlement-ordering failures such as serving on timeout, a broken answer, settlement_pending, a failure or a duplicate. Explain what a given check ID tests and how to fix a failure. Prepare an anonymised corpus case and a pre-filled issue link from a report, without sending anything.
When to use it
Use it when building or reviewing an x402-paid API and you want an assistant to verify the payment-required response and settlement ordering before going live. It suits local development and testing against loopback servers rather than production traffic.
Requirements
Runs locally over stdio, either via npx with the npm package or from the Docker image. No accounts, API keys or environment variables are declared. The probe and facilitator-double tools expect loopback URLs and a running local resource server. The optional AI SDK and LangChain adapters need their peer packages installed.
Before you install
The check tool makes an unpaid GET request to whatever URL you give it, so point it only at endpoints you are allowed to contact. The probe and double tools are meant for loopback and local testing. Sharing a case prepares an anonymised report and a link but sends nothing; the user reviews and submits it. Reports record the entry point that produced them in the report and User-Agent. The server states it never pays, signs or touches mainnet.

Installation

In SourceWeft

  1. Open x402 Conformance 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

x402-conformance-mcp

x402 conformance and safety checks as tools, for MCP clients (Claude, Cursor, VS Code, Windsurf and others), the Vercel AI SDK and LangChain. It's a thin entry point into the open x402-conformance suite: the same checks and check IDs as the CLI, the GitHub Action and the test matchers, and the full x402-conformance.report/1 report. It never pays, signs or touches mainnet.

MCP

json
{ "mcpServers": { "x402-conformance": { "command": "npx", "args": ["-y", "x402-conformance-mcp"] } } }

The same server runs from the Docker image, which starts it on stdio when given no arguments: { "mcpServers": { "x402-conformance": { "command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/atsp-protocol/x402-conformance:1"] } } }. npx -y x402-conformance-mcp --version prints the version, and --help prints the client config and a link to docs/USING.md.

toolargumentswhat it does
x402_check_payment_requiredurl, http or httpsone unpaid GET to a paid URL; checks its 402 answer (P1-P7)
x402_demofault, optional: none or serve_on_any_settleP1-P7 and R0-R10 against a built-in demo server, no wallet or setup; fault: serve_on_any_settle shows a failure
x402_start_facilitator_doubleport, optional; 0 or omitted picks a free onestarts the facilitator double on loopback; point your server at its URL
x402_probe_resource_serverresource_url on loopback; network, optional: auto, solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1 or eip155:84532R0-R10 against your server on loopback: no content on a timeout, a broken answer, settlement_pending, a failure or a duplicate. Start the double first
x402_stop_facilitator_doublenonestops the double
x402_explain_checkid, for example R3, P5 or R11awhat a check tests and how to fix a failure, from docs/FIXES.md
x402_share_casereport from another x402 tool; optional framework, sdk, sdk_version, networkan anonymised corpus case and a pre-filled issue link; nothing is sent, the user decides

Try asking: "Run the x402 demo", "Check the 402 answer at http://127.0.0.1:4020/paid", or "Start the facilitator double, I'll point my server at it, then probe http://127.0.0.1:4020/paid".

Vercel AI SDK

ts
import { generateText } from "ai";import { x402ConformanceTools } from "x402-conformance-mcp/ai-sdk";
await generateText({ model, tools: x402ConformanceTools(), prompt: "Is the 402 answer at https://api.example.com/paid valid x402?" });

LangChain and LangGraph

ts
import { createReactAgent } from "@langchain/langgraph/prebuilt";import { x402ConformanceTools } from "x402-conformance-mcp/langchain";
const agent = createReactAgent({ llm, tools: x402ConformanceTools() });

The AI SDK and LangChain adapters give an agent the four read-only tools (check, demo, explain, share). The double and probe tools stay in MCP, where a person is driving. The adapters need ai 5.0.0 or later, or @langchain/core 0.3.0 or later, installed next to them; both are optional peer dependencies.

The corpus

A failing report can become an anonymised case in the public corpus of real x402 failures. x402_share_case prepares it and returns the link; the user reviews it and submits it, or doesn't. Every report names the entry point that produced it (via: mcp, ai-sdk or langchain) in the report and the User-Agent; there's no other identifier and no telemetry.

Apache-2.0. Ryan Gillespie / Optitransfer.

Source: ts/mcp/README.md at commit 91c533e

Tools

0
SourceWeft started this package once in an isolated sandbox, without credentials, to list its tools. That failed: the package did not install.

Version history

3
  1. v1.6.0LatestOct 25, 2026
  2. v1.5.0Oct 24, 2026
  3. v1.4.0Oct 23, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts