testmpp endpoint reference
The live /pay/echo runs on Tempo mainnet and settles a real $0.01 USDC.e per call. The free /echo never charges. You can run your own instance against Moderato testnet (MPP_CHAIN_ID=42431, faucet pathUSD) to test the payment flow without spending.
Network details
Live default — Tempo mainnet:
| Network | Tempo mainnet |
| Chain ID | 4217 |
| RPC | https://rpc.tempo.xyz |
| Stablecoin | USDC.e (6 decimals) — a real $0.01 per paid call |
Testnet option — Moderato (set MPP_CHAIN_ID=42431 on your own instance):
| Network | Tempo testnet "Moderato" |
| Chain ID | 42431 |
| RPC | https://rpc.moderato.tempo.xyz |
| Explorer | explore.testnet.tempo.xyz |
| Test stablecoin | pathUSD 0x20c0000000000000000000000000000000000000 (6 decimals) |
| Faucet | POST https://docs.tempo.xyz/api/faucet or npx mppx account fund |
GET /health
$ curl -s https://testmpp.com/health
{"ok":true,"service":"testmpp","chainId":4217}
ANY /echo — free echo
Returns your method, headers (minus Authorization/Cookie), and body. Use it to verify HTTP plumbing before involving payments.
$ curl -s https://testmpp.com/echo -d '{"hello":"agent"}'
{
"status": "received",
"method": "POST",
"path": "/echo",
"headers": { "...": "..." },
"body": { "hello": "agent" },
"timestamp": "2026-06-11T00:00:00.000Z"
}
ANY /pay/echo — MPP-paid echo
An unpaid request gets a spec-correct challenge per draft-ryan-httpauth-payment-01:
$ curl -i https://testmpp.com/pay/echo
HTTP/2 402
cache-control: no-store
content-type: application/problem+json
www-authenticate: Payment id="<challenge-id>", realm="testmpp.com",
method="tempo", intent="charge", request="<base64url JSON>",
expires="<RFC 3339>"
{"type":"https://paymentauth.org/problems/payment-required","title":"Payment Required","status":402,...}
The request parameter decodes (base64url) to:
{
"amount": "10000",
"currency": "0x20C000000000000000000000b9537d11c60E8b50",
"methodDetails": { "chainId": 4217 },
"recipient": "0x… (testmpp's receiving wallet)"
}
amount: "10000" = $0.01 in USDC.e base units (6 decimals) — a real $0.01. The payer covers gas. (On a testnet instance the currency is pathUSD 0x20c0… and chainId is 42431, with gas free from the faucet.)
Successful payment returns the same JSON as /echo, plus a Payment-Receipt header (base64url JSON: status, method, timestamp, reference=<tx hash>). The mainnet tx is viewable on the Tempo explorer (testnet txs on explore.testnet.tempo.xyz). No fake receipts: malformed/expired/underpriced credentials return RFC 9457 problem+json with a paymentauth.org type.
Client examples
mppx CLI (the official MPP reference client):
npx mppx account create # generates a local keypair
# fund the account with real USDC.e on Tempo mainnet
npx mppx https://testmpp.com/pay/echo # settles a real $0.01 USDC.e
npx mppx sign --dry-run --challenge '<WWW-Authenticate value>' # inspect a challenge (no payment)
To rehearse the full flow for free, run your own testmpp against Moderato testnet (MPP_CHAIN_ID=42431) and fund with npx mppx account fund (free pathUSD from the faucet).
mppx in code (auto-handles 402s by patching fetch):
import { Mppx, tempo } from 'mppx/client'
import { privateKeyToAccount } from 'viem/accounts'
const mppx = Mppx.create({ methods: [tempo({ account: privateKeyToAccount('0x…') })] })
const res = await mppx.fetch('https://testmpp.com/pay/echo', { method: 'POST', body: '{"hi":1}' })
MCP agents: mppx mcp add registers payment capability with your agent; it can then pay this endpoint natively.
Spec & further reading
- IETF draft: The "Payment" HTTP Authentication Scheme
- Spec repo: tempoxyz/mpp-specs · Protocol docs: mpp.dev/protocol
- SDK: wevm/mppx (TS/Python/Rust/Go/Ruby)
- Tempo testnet: connection details · faucet
- Stripe rail: docs.stripe.com/payments/machine/mpp