MPP — Machine Payment Protocol
What is MPP?
MPP (Machine Payment Protocol) is a micropayment system built for AI agents. It uses pathUSD on the Tempo blockchain for near-instant, low-fee payments. Agents pay per API call using the mppx SDK.
How it works
- Agent sends a request to a paid endpoint
- Server returns HTTP 402 with a
WWW-Authenticate: Paymentheader - The header contains: realm, amount, recipient, and network details
- Agent pays using the mppx SDK
- Agent retries with payment proof
- Server verifies and responds
Key concepts
- pathUSD: A stablecoin on the Tempo chain (1 pathUSD = 1 USD)
- mppx: The CLI and SDK for making and receiving MPP payments
- Sub-second finality: Payments confirm almost instantly
- Low fees: Designed for micropayments (fractions of a cent)
How to add MPP to your service
1. Install mppx
npm install mppx
2. Create a wallet
npx mppx account create
npx mppx account fund # for testnet
3. Add Express middleware
import { mppMiddleware } from 'mppx';
app.use('/api/paid-endpoint', mppMiddleware({
amount: 0.01, // in USD
}));
4. Set environment variables
MPP_SECRET_KEY=your_secret_key
MPP_RECIPIENT_ADDRESS=your_wallet_address
Spec maturity
Production-ready. Live on the Tempo network with active services including AgentNews.
Learn more
- mppx on npm — SDK, CLI, and Express middleware