
Tempo MPP Go SDK
https://github.com/tempoxyz/mpp-go- Category
- AI Agents
- Rank
- No. 1502Tools index
- Pricing
- Open Source
- Type
- TOOL
- Builder
- tempoxyz
- GitHub
- 23 stars
- Latest release
- v0.2.0
- Date
About
Go SDK for the Machine Payments Protocol — payment infrastructure for AI agents.
What it does
Tempo MPP Go SDK adds payment negotiation to ordinary HTTP traffic. A server answers unpaid requests with a structured 402 challenge, while the client builds a payment credential and retries. Server middleware verifies or settles that credential, then exposes payer and receipt data to the protected handler.
Why it's ranked here
The design covers both sides of a paid HTTP exchange and fits established Go server stacks. Strict header parsing, payload size limits, constant-time comparisons, structured errors, split validation and settlement, and several complete payment examples show attention to operational details. It is compelling for MPP adoption, but tightly focused on this protocol and Tempo charge flows.
What's good
The SDK separates generic protocol types, HTTP client behavior, server verification, and Tempo-specific settlement. It supports standard HTTP directly, needs no special Chi adapter, and includes dedicated Gin, Echo, and Fiber integrations. Paid POST guidance correctly treats an external identifier as receipt metadata, not durable idempotency. Validation can also remain advisory until a separate broadcast step performs settlement.
Tradeoffs
Applications must persist idempotency records or cached responses themselves before executing paid side effects. The split lifecycle still revalidates during settlement, and validation requires intents configured with separate hooks. Tempo usage introduces blockchain, RPC, key, recipient, replay, and possible relay concerns beyond ordinary HTTP middleware. The dependency graph also includes several web frameworks, Redis, Ethereum tooling, and Tempo libraries.
How to use it well
Use it when a Go client must purchase an HTTP response, or when a Go service must charge per request using MPP and Tempo. Start with the generic client and server layers, then select standard HTTP or the matching framework adapter. For paid mutations, pair stable client idempotency values with application-owned storage. It does not provide billing accounts, checkout pages, or durable business-operation deduplication.
Technical notes+
The module is declared in go.mod as github.com/tempoxyz/mpp-go with Go 1.26. pkg/mpp/parse.go implements strict Payment challenge and credential parsing, rejects duplicate matching credentials, limits header payloads to 16 KB, and strips or rejects CR/LF during formatting. pkg/mpp/hmac.go generates HMAC-SHA256 challenge IDs and provides constant-time equality; pkg/mpp/digest.go uses SHA-256 body digests. pkg/mpp/units.go avoids floating-point conversion through decimal string handling and big.Int. pkg/tempo/abi.go encodes and matches Tempo transfer calldata. Makefile provides formatting, vetting, module verification, unit tests, coverage, example builds, and tagged integration tests against ./tests.
Observed
- License
- Dual licensed under MIT or Apache License 2.0, at the user's option.
- Primary language
- Go.
- Packaging
- Go module published as github.com/tempoxyz/mpp-go.
- Install surface
- Installed with go get github.com/tempoxyz/mpp-go.
- Interface
- Library packages provide an HTTP 402 client transport, server middleware, protocol types, and Tempo charge support.
- Framework support
- Supports standard net/http and Chi interfaces, plus dedicated Gin, Echo, and Fiber adapters.
- Testing surface
- The Makefile defines unit, coverage, formatting, vet, module verification, and tagged integration test targets.
Read from README.md, go.mod, Makefile, pkg/mpp/doc.go, pkg/mpp/hmac.go, pkg/mpp/json.go, pkg/mpp/parse.go, pkg/mpp/units.go, pkg/tempo/abi.go, pkg/tempo/doc.go, pkg/client/doc.go, pkg/mpp/digest.go, pkg/mpp/errors.go, pkg/server/doc.go, pkg/mpp/expires.go.
What it can do
Initialize payment channels for AI agents
AI agent configuration and payment parameters → Active payment channel connection
Process machine-to-machine payments
Payment request with amount and recipient details → Payment transaction confirmation
Handle micropayments for API calls
API usage data and pricing configuration → Automated micropayment transactions
Manage payment streaming between services
Service endpoints and streaming payment rules → Continuous payment flow execution
Authenticate payment transactions
Transaction data and authentication credentials → Verified payment authorization
Track payment history and balances
Account identifiers and time range → Payment records and current balance data
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.