mcp-pay vs x402: a rail-agnostic payment layer for MCP
mcp-pay extends the Model Context Protocol with a .well-known JSON manifest for declaring pricing and a reference server demonstrating HTTP 402 payment-gated tools. Compatible with x402, MPP, Lightning, and card rails.
mcp-pay is a Rust-backed drop-in for
x402. Same API, faster hot paths.
Install: see docs.
Rail-agnostic: x402, MPP (Tempo), Lightning, and card.
mcp-pay vs x402: the facts
Rail-agnostic: x402, MPP (Tempo), Lightning, and card.
x402 only.
`.well-known/mcp-pay.json` discovery manifest.
No standard discovery format.
Reference Rust server implementing HTTP 402 + X-PAYMENT-REQUIRED.
Multiple competing reference implementations.
Agent-side SDK for parsing payment requests and choosing a rail.
No standardised agent-side library.
MIT licensed.
Mixed licensing.
When to use mcp-pay
- You want to monetise MCP tools and need to support multiple payment rails (x402, Lightning, card).
- You want a standard `.well-known` discovery manifest so agents can find your pricing.
When NOT to use mcp-pay
- You only ever need x402 — use a x402-native library directly.
Frequently asked questions
Is mcp-pay a replacement for x402?
No — mcp-pay is *compatible* with x402. The x402 protocol defines how an HTTP 402 response carries a payment request; mcp-pay standardises the discovery layer and ships a reference server that implements the 402 flow with multiple rail backends.
Which payment rails does mcp-pay support?
x402, MPP (Tempo), Lightning, and traditional card payments. The reference server demonstrates the x402 flow; the MPP and Lightning backends are pluggable.
Do I have to use Rust to integrate mcp-pay?
No — the `.well-known/mcp-pay.json` manifest is just JSON, and the reference server exposes a standard HTTP API. Any MCP client can consume it.