-
Notifications
You must be signed in to change notification settings - Fork 1
feat: MPP machine payments — agent-native pay-per-tool-call #16
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
Stripe launched Machine Payments Protocol (MPP) on 2026-03-18. mppx SDK is installed. Foundation code stashed on main.
What's Ready (git stash)
src/mpp.ts— pricing map (18 tools priced), server factorysrc/rest-mpp.ts— REST endpoint handler skeletonsrc/types.ts— MPP_SECRET_KEY + STRIPE_SECRET_KEY in GatewayEnvsrc/index.ts— /api/pay/:toolName + /api/pay catalog routes- mppx installed in package.json
What Needs Building
- Wire mppx server with Stripe SPT method (
stripe.charge()frommppx/server) - MCP-native path using
Transport.Mcp(JSON-RPC error -32042 for payment required) - Test with a real agent client
- Deploy with MPP_SECRET_KEY + STRIPE_SECRET_KEY as Worker secrets
Key Discovery
mppx has native MCP support:
- `Transport.Mcp` type for JSON-RPC payment flow
- Error code `-32042` (payment required)
- `_meta["org.paymentauth/credential"]` for credentials
- `_meta["org.paymentauth/receipt"]` for receipts
This means we can do MPP inside MCP JSON-RPC — agents using our MCP server get native payment flow without a separate REST surface.
References
Estimated Effort
2-3 focused hours with mppx docs loaded.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request