Skip to main content
MCP server CX Codex

402MCP.org — Claude Code MCP server: what it does, how to install

402MCP.org — HTTP 402 & Agent Payment Registry is an MCP server for Claude Code that decodes HTTP 402 responses and tells an agent how to pay and retry.

MIT updated 2026-10-18

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http registry https://402mcp.org/api/v1/mcp
Open on GitHub

What 402MCP.org — HTTP 402 & Agent Payment Registry does

The decode_402_challenge tool parses a 402 response — an L402 macaroon with its BOLT 11 invoice, x402 v1 or v2, or MPP — and returns the exact next steps plus the retry header. A separate recommend_payment_rail tool filters rails by role, asset, custody model, infrastructure, network, scheme and maturity, letting you re-weight the criteria. The probe_402_support tool sends a single GET to a public URL to check for 402 support and never moves money.

Every field in a 402 response is treated as server-controlled: the decoder lists them separately instead of running their text as instructions, and flags expired challenges or macaroons whose payment hash doesn't match the invoice. The probe rejects private, loopback and link-local addresses and non-standard ports, and the hosted endpoint rate-limits probe calls per client.

Recommendations draw on a registry where each entry carries a score from 1 to 10 across six criteria, with sources listed for verification. Running the server locally over stdio needs the @402mcp/mcp package, launched through npx.

What it helps with

  • parse a 402 Payment Required response using L402, x402 or MPP
  • pick a payment rail by role, asset and custody requirements
  • check whether a given URL supports HTTP 402 payments without sending money
  • look up the wire format for L402, x402 or MPP
  • browse an open registry of agent payment solutions

Example prompts for the agent

  • Decode this 402 response and tell me how to pay and retry
  • Recommend a payment rail with non-custodial storage and x402 support
  • Check if this URL supports the 402 payment scheme, without paying anything

How to install 402MCP.org — HTTP 402 & Agent Payment Registry

1Platform CLI: remote server

claude mcp add --transport http registry https://402mcp.org/api/v1/mcp

2Platform CLI

claude mcp add --env MCP_402_OFFLINE=<MCP_402_OFFLINE> --transport stdio 402mcporg-http-402-agent-payment-registry -- npx -y @402mcp/mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about 402MCP.org — HTTP 402 & Agent Payment Registry

How do I install 402MCP.org in Claude Code?

Run claude mcp add --transport http registry https://402mcp.org/api/v1/mcp to connect the remote MCP server over HTTP.

What does 402MCP.org do?

It decodes HTTP 402 responses under the L402, x402 and MPP schemes, tells an agent how to pay and retry, and recommends a payment rail from an open registry of solutions.

What's the difference between the remote connection and the local npx install?

The remote endpoint https://402mcp.org/api/v1/mcp runs over streamable HTTP, while installing locally with npx -y @402mcp/mcp exposes the same tools over stdio.

Similar MCP servers

All MCP servers for Backend and APIs →

Project sponsors

Companies that keep this analytics open