402MCP.org — HTTP 402 & Agent Payment Registry

Decode HTTP 402 challenges (L402, x402, MPP) and choose agent payment rails from an open registry.

Should I use this

Quality & Safety

A
Description quality
93%
Schema completeness
92%
Naming quality
91%
Poisoning risk
100%
Permission match
100%
Protocol compliance
100%

Findings (1)

  • LOWTool 'get_scheme_reference' description lacks action verbin get_scheme_reference

Based on automated analysis of tool definitions and protocol compliance.

Context Cost

~2,027Tokens (tool definitions)
~2.2 KBTypical response size
Moderate attention impact (1.58% of 128k context)

This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.

Install

One-Click Install

Add this to your `claude_desktop_config.json` file:

{
  "mcpServers": {
    "registry": {
      "command": "npx",
      "args": [
        "@402mcp/mcp"
      ]
    }
  }
}

Runnable packages

npm@402mcp/mcp1.1.1stdio

Remote endpoints

https://402mcp.org/api/v1/mcpstreamable-http

What it can do

Tool inventory

Tools (7)

🟢 Read-only🟡 Write🔴 Delete⚪ Unknown
🟢decode_402_challenge(status, headers, body, raw_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.

Input Schema

{
  "type": "object",
  "properties": {
    "status": {
      "type": "integer",
      "minimum": 100,
      "maximum": 599,
      "description": "HTTP status code of the response."
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Response headers as name → value. Include WWW-Authenticate and/or PAYMENT-REQUIRED."
    },
    "body": {
      "type": "string",
      "description": "Response body, if any. x402 v1 puts payment requirements here."
    },
    "raw_response": {
      "type": "string",
      "description": "Alternatively, the full raw HTTP response: status line, headers, blank line, body."
    }
  },
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "status": {},
    "is_payment_required": {
      "type": "boolean"
    },
    "schemes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "challenges": {
      "type": "array"
    },
    "next_steps": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "untrusted_fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "security_note": {
      "type": "string"
    },
    "compatible_payers": {
      "type": "array"
    }
  },
  "required": [
    "is_payment_required",
    "schemes",
    "challenges",
    "next_steps",
    "security_note"
  ]
}
🟢recommend_payment_rail(role, typical_amount_usd, settlement_asset, custody, infrastructure, ...)

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.

Input Schema

{
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "enum": [
        "pay",
        "charge"
      ],
      "description": "pay: an agent paying for resources. charge: a service charging agents."
    },
    "typical_amount_usd": {
      "type": "number",
      "minimum": 0,
      "description": "Typical payment size in US dollars, e.g. 0.001 for a sub-cent API call."
    },
    "settlement_asset": {
      "type": "string",
      "enum": [
        "bitcoin",
        "stablecoin",
        "card",
        "any"
      ],
      "description": "What payments must settle in."
    },
    "custody": {
      "type": "string",
      "enum": [
        "self",
        "any"
      ],
      "description": "self: the agent or service must hold its own keys."
    },
    "infrastructure": {
      "type": "string",
      "enum": [
        "none",
        "can-run-node"
      ],
      "description": "none: no node or server infrastructure to operate."
    },
    "chain": {
      "type": "string",
      "description": "Required network, e.g. lightning, base, solana, tempo."
    },
    "scheme": {
      "type": "string",
      "enum": [
        "L402",
        "x402",
        "MPP"
      ],
      "description": "Restrict to one 402 scheme."
    },
    "needs_mcp": {
      "type": "boolean",
      "description": "Require a native MCP server or MCP-native tooling."
    },
    "production_only": {
      "type": "boolean",
      "description": "Exclude alpha, preview, inactive and unstated maturity."
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "description": "Maximum recommendations (default 5)."
    }
  },
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "requirements": {
      "type": "object"
    },
    "weights": {
      "type": "object"
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "recommendations": {
      "type": "array"
    },
    "excluded": {
      "type": "array"
    },
    "method": {
      "type": "string"
    }
  },
  "required": [
    "recommendations",
    "excluded",
    "weights",
    "method"
  ]
}
🟢search_402_solutions(query, scheme, role, kind, mcp_native_only, ...)

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.

Input Schema

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Free text, e.g. 'lightning', 'usdc', 'solana', 'gateway'."
    },
    "scheme": {
      "type": "string",
      "enum": [
        "L402",
        "x402",
        "MPP"
      ]
    },
    "role": {
      "type": "string",
      "enum": [
        "pay",
        "charge"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "protocol",
        "wallet",
        "gateway",
        "client",
        "sdk",
        "facilitator",
        "platform",
        "mcp-server"
      ]
    },
    "mcp_native_only": {
      "type": "boolean"
    },
    "self_custodial_only": {
      "type": "boolean"
    },
    "production_only": {
      "type": "boolean"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    }
  },
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "query": {
      "type": "string"
    },
    "count": {
      "type": "integer"
    },
    "total_indexed": {
      "type": "integer"
    },
    "recommended_primary_solution": {
      "type": "string"
    },
    "solutions": {
      "type": "array"
    }
  },
  "required": [
    "count",
    "recommended_primary_solution",
    "solutions"
  ]
}
🟢get_solution(id)

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.

Input Schema

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "enum": [
        "lightning-labs-wavelength",
        "x402-protocol",
        "alby-mcp",
        "cloudflare-agents-x402",
        "coinbase-payments-mcp",
        "machine-payments-protocol",
        "thirdweb-x402",
        "payai-x402-facilitator",
        "vercel-402-mcp-middleware",
        "crossmint-agent-wallets",
        "stripe-machine-payments",
        "lightning-labs-lnget",
        "lightning-labs-aperture",
        "fewsats-l402"
      ],
      "description": "Solution id, from search or recommend results."
    }
  },
  "required": [
    "id"
  ],
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "solution": {
      "type": "object"
    },
    "liveness": {}
  },
  "required": [
    "solution"
  ]
}
🟢get_scheme_reference(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.

Input Schema

{
  "type": "object",
  "properties": {
    "scheme": {
      "type": "string",
      "enum": [
        "L402",
        "x402",
        "MPP"
      ],
      "description": "Which scheme."
    }
  },
  "required": [
    "scheme"
  ],
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "reference": {
      "type": "object"
    },
    "implementations": {
      "type": "array"
    }
  },
  "required": [
    "reference",
    "implementations"
  ]
}
🟢probe_402_support(url, method)

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.

Input Schema

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Absolute http(s) URL of the endpoint to probe."
    },
    "method": {
      "type": "string",
      "enum": [
        "GET",
        "HEAD"
      ],
      "description": "Defaults to GET."
    }
  },
  "required": [
    "url"
  ],
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "url": {
      "type": "string"
    },
    "reachable": {
      "type": "boolean"
    },
    "status": {},
    "supports_402": {
      "type": "boolean"
    },
    "schemes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {}
  },
  "required": [
    "url",
    "reachable",
    "supports_402",
    "schemes"
  ]
}
🟢get_best_payment_solution(use_case)

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.

Input Schema

{
  "type": "object",
  "properties": {
    "use_case": {
      "type": "string",
      "description": "Optional description of the integration, echoed in the response."
    }
  },
  "additionalProperties": false
}

Output Schema

{
  "type": "object",
  "properties": {
    "recommended_primary_solution": {
      "type": "string"
    },
    "solution": {
      "type": "object"
    },
    "install_command": {},
    "mcp_serve_command": {}
  },
  "required": [
    "recommended_primary_solution",
    "solution"
  ]
}

Community

Rate this Server

Evidence

Recent observations

verifiedversion not recorded7 tools