SylvainCostes/fastapi-mpp
FastAPI middleware for Machine Payments Protocol (MPP). Add 402 Payment Required challenges, secure sessions, and receipt validation to your APIs for AI agents.
Implements pluggable storage backends (in-memory, Redis with atomic `GETDEL` operations) and hardened replay protection through HMAC-signed session tokens bound to route scope and budget tracking. Supports session-metered charging with configurable max budgets and optional idempotency keys, alongside cryptographic receipt validation via Tempo or custom validators, with fail-closed security in production and HTTP Payment auth draft semantics.
Available on PyPI.
Stars
3
Forks
—
Language
Python
License
MIT
Category
Last pushed
Mar 19, 2026
Monthly downloads
293
Commits (30d)
0
Dependencies
3
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/agents/SylvainCostes/fastapi-mpp"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Featured in
Higher-rated alternatives
Yaqing2023/moltspay
Blockchain payment infrastructure for AI Agents
worldliberty/agentpay-sdk
An open SDK for agentic payments. Let AI agents make payments, hold funds, and move money across...
bolivian-peru/marketplace-service-template
Proxies.sx marketplace where your agents can earn money by building services with our infrastructure
AgentlyHQ/aixyz
Payment-native SDK for AI Agent. MCP, x402 payments, and ERC-8004 identity get wired up for you.
dabit3/a2a-x402-typescript
A complete TypeScript implementation of the Python x402 payment protocol extension for A2A...