← testmpp.com

testmpp endpoint reference

Everything here runs on Tempo testnet only — no real money.

Network details

NetworkTempo testnet "Moderato"
Chain ID42431
RPChttps://rpc.moderato.tempo.xyz
Explorerexplore.testnet.tempo.xyz
Test stablecoinpathUSD 0x20c0000000000000000000000000000000000000 (6 decimals)
FaucetPOST https://docs.tempo.xyz/api/faucet or npx mppx account fund

GET /health

$ curl -s https://testmpp.com/health
{"ok":true,"service":"testmpp","network":"tempo-testnet-moderato","chainId":42431}

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>",
  description="testmpp paid echo (Tempo testnet)", expires="<RFC 3339>"

{"type":"https://paymentauth.org/problems/payment-required","title":"Payment Required","status":402,...}

The request parameter decodes (base64url) to:

{
  "amount": "10000",
  "currency": "0x20c0000000000000000000000000000000000000",
  "methodDetails": { "chainId": 42431, "feePayer": false },
  "recipient": "<testmpp testnet address>"
}

amount: "10000" = $0.01 in pathUSD base units (6 decimals). feePayer: false means the payer covers gas (testnet gas is free from the faucet).

Current status: challenge issuance is live and spec-correct. If you present an Authorization: Payment credential, the endpoint responds 501 with an honest problem+json — on-chain settlement verification is the next milestone. No fake receipts here.

Client examples

mppx CLI (the official MPP reference client):

npx mppx account create        # generates a local keypair
npx mppx account fund          # free pathUSD from the Tempo faucet
npx mppx https://testmpp.com/pay/echo
npx mppx sign --dry-run --challenge '<WWW-Authenticate value>'   # inspect a challenge

mppx in code (auto-handles 402s by patching fetch):

import { Mppx } from 'mppx'
import { tempo } from 'mppx/methods'
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