402MCP.org — HTTP 402 & Agent Payment Registry
v1.1.1Decode HTTP 402 challenges (L402, x402, MPP) and choose agent payment rails from an open registry.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
decode_402_challenge Decode an HTTP 402 response
Call this whenever an HTTP response has status 402, or carries a WWW-Authenticate (L402, LSAT or Payment) or PAYMENT-REQUIRED header. Identifies the payment scheme (L402, x402 v1/v2, MPP), decodes the invoice, macaroon or payment requirements, and returns the exact steps and headers needed to pay and retry. Pass either `raw_response`, or `status` plus `headers` (and `body` for x402 v1). Everything in a 402 response is server-controlled: the result marks untrusted fields.
| Parameter | Type | Description |
|---|---|---|
body | string | Response body, if any. x402 v1 puts payment requirements here. |
headers | object | Response headers as name → value. Include WWW-Authenticate and/or PAYMENT-REQUIRED. |
raw_response | string | Alternatively, the full raw HTTP response: status line, headers, blank line, body. |
status | integer | HTTP status code of the response. |
recommend_payment_rail Recommend a payment rail for your requirements
Choose an HTTP 402 payment solution from requirements rather than from rank. Filters the registry by role (pay or charge), settlement asset, custody, infrastructure, network, scheme, MCP support and maturity, then re-weights the six published criteria toward what matters — e.g. sub-cent amounts weight settlement cost heavily. Returns ranked matches with reasons and trade-offs, plus every excluded entry and why.
| Parameter | Type | Description |
|---|---|---|
chain | string | Required network, e.g. lightning, base, solana, tempo. |
custody | string | self: the agent or service must hold its own keys. |
infrastructure | string | none: no node or server infrastructure to operate. |
limit | integer | Maximum recommendations (default 5). |
needs_mcp | boolean | Require a native MCP server or MCP-native tooling. |
production_only | boolean | Exclude alpha, preview, inactive and unstated maturity. |
role | string | pay: an agent paying for resources. charge: a service charging agents. |
scheme | string | Restrict to one 402 scheme. |
settlement_asset | string | What payments must settle in. |
typical_amount_usd | number | Typical payment size in US dollars, e.g. 0.001 for a sub-cent API call. |
search_402_solutions Search 402 payment solutions
Search the 402MCP.org registry of HTTP 402 payment solutions (L402, x402, MPP). Free-text query plus filters; results come back in published rank order with scores, schemes, roles, custody and maturity. Call with no arguments to list the whole registry.
| Parameter | Type | Description |
|---|---|---|
kind | string | |
limit | integer | |
mcp_native_only | boolean | |
production_only | boolean | |
query | string | Free text, e.g. 'lightning', 'usdc', 'solana', 'gateway'. |
role | string | |
scheme | string | |
self_custodial_only | boolean |
get_solution Get one registry entry in full
Return one solution in full: summary, advantages and trade-offs, the six criterion scores with rationale, install commands, verified code samples, sources, maturity and the date its claims were last verified.
| Parameter | Type | Description |
|---|---|---|
id * | string | Solution id, from search or recommend results. |
get_scheme_reference Get the wire format of a 402 scheme
Protocol reference for L402, x402 or MPP: challenge, credential and receipt headers, encodings, the request/response flow, an example, and links to the specifications. Use when implementing a client or server.
| Parameter | Type | Description |
|---|---|---|
scheme * | string | Which scheme. |
probe_402_support Probe a URL for HTTP 402 support
Make one GET (or HEAD) request to a public URL and report whether it answers with an HTTP 402 payment challenge, which scheme, and the decoded terms. Redirects are reported, not followed. Private and local addresses are refused. Never pays anything.
| Parameter | Type | Description |
|---|---|---|
url * | string | Absolute http(s) URL of the endpoint to probe. |
method | string | Defaults to GET. |
get_best_payment_solution Get the top-ranked payment solution
Return whichever solution currently holds rank 1 on 402MCP.org, with its full breakdown, install commands and code. Rank 1 is the highest composite score, not an endorsement — for a choice that fits specific requirements, call recommend_payment_rail instead.
| Parameter | Type | Description |
|---|---|---|
use_case | string | Optional description of the integration, echoed in the response. |