mcpField
X
x402 Conformance

x402 Conformance

Local
github.comDeveloper Tools1Updated 1d ago

About x402 Conformance

x402 Conformance exposes x402 payment checks for developers and agents testing payment-enabled servers. It shares checks and reports with the suite’s CLI and CI integrations, and does not pay, sign, or access mainnet.

Key features

  1. 01Validate unpaid 402 responses
  2. 02Probe server settlement safety
  3. 03Run built-in demo checks
  4. 04Explain checks and failures
  5. 05Prepare anonymized failure cases

Use cases

  1. 01Check a paid endpoint’s 402 response
  2. 02Verify no content is served before settlement
  3. 03Reproduce checks with a demo server

MCP support

The MCP server exposes x402 conformance checks and utilities as tools. Facilitator-double and resource-probe tools are MCP-only; the server does not pay or sign.

Configuration

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

mcp.json · Universal config
{
"mcpServers": {
"atsp-protocol-x402-conformance": {
"command": "npx",
"args": [
"-y",
"x402-conformance-mcp"
]
}
}
}
Run commandnpx -y x402-conformance-mcp

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
npmx402-conformance-mcp1.6.0
ocighcr.io/atsp-protocol/x402-conformance:1.6.0

Tools

7

Saved tool list · updated 4d ago

ParameterTypeRequiredDescription
urlstringYesThe paid URL, http or https

Details

From the project 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, check IDs and report as the CLI, the GitHub Action and the test matchers. It never pays, signs or touches mainnet.

MCP

{ "mcpServers": { "x402-conformance": { "command": "npx", "args": ["-y", "x402-conformance-mcp"] } } }
toolwhat it does
x402_check_payment_requiredone unpaid GET to a paid URL; checks its 402 answer (P1-P7)
x402_demothe whole suite against a built-in demo server, no wallet or setup; fault: serve_on_any_settle shows a failure
x402_start_facilitator_doublestarts the facilitator double on loopback; point your server at its URL
x402_probe_resource_serverR0-R10 against your server on loopback: no content on a timeout, a broken answer, settlement_pending, a failure or a duplicate
x402_stop_facilitator_doublestops the double
x402_explain_checkwhat a check tests and how to fix a failure
x402_share_casean 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

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

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 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.

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.