What Micropayment Protocols Do MCP Servers Support? A Complete Technical Guide
MCP servers support six distinct micropayment protocols—x402, L402, AP2, MPP, UCP, and ACP—that enable autonomous agents to pay per tool call using USDC, Bitcoin Lightning satoshis, and cross-chain token transfers without requiring user-managed API keys.
The punkpeye/awesome-mcp-servers repository catalogs the emerging ecosystem of Model Context Protocol (MCP) implementations that leverage these micropayment protocols supported by MCP servers to monetize API access at the agent level. By integrating lightweight payment standards directly into tool invocation flows, developers can create truly autonomous economic relationships where AI agents settle micro-charges for compute, data, or specialized services in real time.
x402: HTTP 402 Payments with USDC
The x402 protocol implements the HTTP 402 status code—traditionally reserved for "Payment Required"—to facilitate USDC-based micropayments across EVM chains and Solana. When an agent invokes a payable tool, the MCP server returns an HTTP 402 response containing a signed JWT invoice; the agent's wallet signs the receipt and re-submits it for validation before execution.
Supported currencies include USDC on Base, Solana, Arbitrum, and Polygon. According to the README.md in punkpeye/awesome-mcp-servers, notable implementations include:
- daedalusdevelopmentgroup/ddg-agent-payable-services: Full x402 integration with cloud deployment support
- forgemeshlabs/coinopai-mcp: Python-based x402 payment processing
- blockrun-ai/blockrun-mcp: Cloud-enabled x402 monetization for AI tools
The reference implementation resides in x402node/x402-mcp, where the src/index.ts file handles JWT invoice generation and receipt validation.
import requests, json
# 1️⃣ Get the tool definition (list/get)
manifest = requests.get("https://api.example.com/mcp/manifest").json()
tool = manifest["tools"]["weather"]["call"] # example tool ID
# 2️⃣ Request payment invoice (HTTP 402)
pay_resp = requests.post(
f"https://api.example.com/mcp/tools/{tool}/pay",
json={"price_usd": 0.001}
)
invoice = pay_resp.json()["invoice"] # signed x402 invoice (JWT)
# 3️⃣ Pay the invoice (using a wallet library, e.g. coinbase‑pay)
signed = wallet.sign_x402(invoice) # returns a receipt JWT
# 4️⃣ Call the tool with the receipt
result = requests.post(
f"https://api.example.com/mcp/tools/{tool}/call",
headers={"Authorization": f"Bearer {signed}"},
json={"location": "Seattle"}
).json()
print(result)
L402: Lightning Network Micropayments
L402 adapts the Lightning Network for satoshi-scale payments, enabling MCP servers to charge per-call fees denominated in sats rather than fiat-equivalent stablecoins. This protocol suits Bitcoin-native agents and applications requiring privacy-preserving, near-instant settlement with fees measured in fractions of a penny.
The toadlyBroodle/satring server compares L402 and x402 services side-by-side, while ocbenji/bitcoinbenji-mcp implements Lightning payments in Python. For developers adding support to existing servers, refined-element/lightning-enable-mcp provides middleware that injects L402 capability into any MCP-compliant tool.
The payment flow relies on standard Bolt11 invoices:
# 1️⃣ Ask the server for a Lightning invoice (curl)
curl -X POST https://api.example.com/mcp/tools/translate/pay \
-d '{"price_sats": 50}' -i
# Server replies with HTTP 402 and an invoice string in the body
# e.g. lnbc1... (standard Bolt11 invoice)
# 2️⃣ Pay the invoice with a Lightning node (lncli or lntools)
lncli payinvoice lnbc1...
# 3️⃣ Re‑send the request including the preimage as proof
curl -X POST https://api.example.com/mcp/tools/translate/call \
-H "Authorization: Bearer <preimage_hex>" \
-d '{"text":"hola"}'
The l402-kit repository provides boilerplate code in src/server.ts for handling preimage verification and invoice state management.
AP2 and MPP: Agent-to-Agent Token Transfers
AP2 (Agent-to-Agent Payments) and MPP (Multi-Party Payment) enable direct wallet-to-wallet transactions between autonomous agents without intermediary custody. Unlike request-response protocols like x402, AP2 facilitates push-based transfers using USDC and native tokens across Algorand, Solana, Hedera, and Stellar.
AP2 supports single-destination payments, while MPP extends this to batched or split settlements among multiple agent participants. The chopmob-cloud/AlgoVoi-Platform-Adapters repository exposes AP2-enabled checkout links through its adapter layer, allowing agents to generate payment requests programmatically.
import { AP2Client } from '@algovoi/ap2-sdk';
// Initialise with your agent’s private key (no custodial wallet)
const client = new AP2Client({ privateKey: process.env.AGENT_KEY });
const receipt = await client.pay({
destination: "agent://data-collector",
amount: "0.05 USDC",
memo: "price‑lookup"
});
const data = await fetch("https://api.example.com/mcp/tools/price/call", {
method: "POST",
headers: { "Authorization": `Bearer ${receipt}` },
body: JSON.stringify({ symbol: "BTC" })
}).then(r => r.json());
console.log(data);
The AP2 SDK implementation in src/ap2Client.ts handles cryptographic receipt generation that servers validate against on-chain transaction records.
UCP and ACP: Universal Commerce Standards
UCP (Universal Commerce Protocol) provides an on-chain attestation framework for commerce across heterogeneous blockchains, while ACP (Agent Communication Protocol) serves as the complementary messaging layer. Though ACP is not strictly a payment protocol, it standardizes the negotiation and settlement coordination required for UCP transactions.
The douglasborthwick-crypto/mcp-server-insumer implements UCP commerce tools for cross-chain attestation, enabling agents to verify product authenticity or service delivery before releasing funds. For interoperability between ACP-native agents and MCP clients, the i-am-bee/acp-mcp bridge translates ACP message formats into MCP tool schemas.
UCP typically operates alongside x402 or AP2 for value transfer, using the former for the attestation logic and the latter for settlement execution.
How MCP Servers Implement Payment Flows
MCP servers declare payable capabilities in the manifest.json or server.json configuration file located at the repository root. This metadata specifies:
- Payment protocol: x402, L402, AP2, etc.
- Accepted currencies: USDC, satoshis, native tokens
- Price matrices: Per-tool pricing in fractional units
When an agent's client initiates a tool call, the server inspects the Authorization header for a valid payment receipt. If absent, it returns HTTP 402 with a payment request payload specific to the configured protocol. The client then orchestrates the wallet signing, user approval (if required), and re-submission with the proof-of-payment attached.
This architecture decouples the payment rail from the tool implementation, allowing server operators to swap between x402, L402, or AP2 without modifying core business logic.
Summary
- x402 enables USDC micropayments on Base, Solana, and EVM chains using HTTP 402 JWT invoices.
- L402 facilitates Bitcoin Lightning payments denominated in satoshis for sub-cent transaction fees.
- AP2 and MPP support direct agent-to-agent token transfers and multi-party splits across Algorand, Solana, and other chains.
- UCP and ACP provide attestation and messaging standards for complex commerce workflows.
- Configuration occurs in
server.json/manifest.json, while protocol specifics are handled by dedicated SDKs likex402-mcpandl402-kit.
Frequently Asked Questions
What is the difference between x402 and L402 in MCP servers?
x402 uses stablecoin settlements (primarily USDC) across EVM and Solana networks, returning signed JWT invoices that agents sign with Ethereum or Solana wallets. L402 operates exclusively on the Bitcoin Lightning Network, generating Bolt11 invoices paid in satoshis and verified via cryptographic preimages. Choose x402 for dollar-denominated pricing stability or L402 for Bitcoin-native privacy and the lowest possible transaction fees.
How do I add micropayment support to my existing MCP server?
Add a payment section to your server.json manifest defining the protocol (x402, L402, etc.) and required schemas. For x402, integrate the x402-mcp SDK from src/index.ts to handle invoice signing. For Lightning, use l402-kit middleware as demonstrated in src/server.ts. Wrap your tool handlers to check Authorization headers for valid receipts before execution, returning HTTP 402 when payment is required.
Which MCP micropayment protocol supports cross-chain USDC transfers?
AP2 (Agent-to-Agent Payments) natively supports USDC transfers across Algorand, Solana, Hedera, and Stellar. While x402 supports USDC on multiple chains, it typically processes payments on the specific chain where the server operates. AP2 explicitly facilitates cross-chain settlement, allowing an agent holding USDC on Solana to pay a server requiring USDC on Algorand through atomic swaps or bridge protocols.
Are there minimum payment amounts for MCP server tool calls?
Minimum amounts vary by protocol. L402 payments can theoretically settle single satoshis (fractions of a cent), making it ideal for high-frequency micro-calls. x402 implementations typically enforce minimums around $0.001 USD (0.1 cents) due to EVM gas costs. AP2 minimums depend on the underlying blockchain's transaction fees but generally allow sub-cent payments on low-cost chains like Solana or Algorand.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →