402MCP is an MCP server and open registry for HTTP 402 agent payments; the site is https://402mcp.org。其核心用途是帮助 AI agents understand, when they receive 402 Payment Required, the payment scheme used by the server (L402, x402, or MPP), what needs to be paid, and the specific way to pay and retry; it also helps developers recommend payment rails based on explicit requirements when choosing a payment method for agents or designing agent billing for an API.
Main capabilities include: decoding 402 challenges and identifying payment schemes; providing an open registry of sourced, scored payment solutions; providing the resources 402mcp://registry, 402mcp://methodology, 402mcp://solutions/{id}, 402mcp://schemes/{scheme}, and the prompts choose_payment_rail and handle_402_response. All tools are annotated with readOnlyHint and cannot spend funds.
Usage: the remote MCP endpoint is https://402mcp.org/api/v1/mcp(streamable HTTP); the npm package @402mcp/mcp provides a stdio mode and is suitable for any stdio MCP client such as Claude Desktop, Cursor, and Windsurf. The hosted endpoint and the stdio package share the same transport-agnostic core (lib/mcp/), so they expose the same tools, resources, and prompts. See the installation guide at https://402mcp.org/docs#install。运行需 Node 18.18 or later.
Security design: 402 response content is entirely server-controlled; the decoder lists these fields in untrusted_fields and does not repeat their text as instructions; it flags expired challenges and macaroons whose committed payment hash does not match the invoice. The probing feature rejects private, loopback, link-local, and metadata addresses (including hostnames that resolve to these addresses) and non-web ports; the hosted endpoint rate-limits probing per client.
Registry scoring: each entry is scored 1–10 on six equally weighted criteria, including hosting and sovereignty, operational friction, agent-native support, payment rails and assets, settlement speed and fees, and developer experience; the total is the unweighted average, rankings are sorted by mean, and exact ties are ordered alphabetically. Each entry lists the source, the date the claims were last verified, and a maturity label taken from the vendor or release history. See current rankings at https://402mcp.org and /api/v1/registry; see the full methodology at https://402mcp.org/docs#methodology。站点与所索引供应商无关联、无赞助或补偿,列表位置不可购买;事实更正会更新数据与排名并记录变更日志。
Other interfaces and deployment: any page returns Markdown when the request header Accept: text/markdown is sent. The site runs on a Cloudflare Worker via the OpenNext adapter; to deploy, copy wrangler.example.jsonc to wrangler.jsonc, create the KV namespace it specifies, and fill in your own values. The code is MIT licensed, and the registry data is CC BY 4.0 licensed. The verification suite by default targets http://localhost:3000,可传入 URL against a deployment.