mpp
Build with MPP (Machine Payments Protocol), open machine-to-machine payments over HTTP 402. Use for paid APIs, payment-gated endpoints, agent payment flows, MCP tool payments, or metered billing. Covers mppx (TS), pympp, and mpp Rust SDKs.
Rank
62
Safety
84
Downloads
1.9k
Updated
Oct 9, 2026
Version
0.10.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.9K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 1.9K downloadsadoption · observed Oct 9, 2026
- Latest release
- 0.10.2release · observed Sep 9, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17bp3v1hm1dnkzey0c9tfh02183j0y5:mpp- Install using `clawhub skill install s17bp3v1hm1dnkzey0c9tfh02183j0y5:mpp` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/tenequm/mpp before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-mpp/snapshot"
Documentation
CLAWHUB
149,703 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: mpp description: Build with MPP (Machine Payments Protocol), open machine-to-machine payments over HTTP 402. Use for paid APIs, payment-gated endpoints, agent payment flows, MCP tool payments, or metered billing. Covers mppx (TS), pympp, and mpp Rust SDKs. metadata: version: "0.10.2" categories: "finance, development" topics: "payments, http-402, stablecoins, machine-payments, apis" upstream: "[email protected], [email protected], [email protected], @buildonspark/[email protected], @stellar/[email protected], @solana/[email protected], @redotpay/[email protected], @defuse-protocol/[email protected], [email protected]" openclaw: homepage: https://github.com/tenequm/skills/tree/main/skills/mpp emoji: "💸" primaryEnv: MPP_SECRET_KEY envVars: - name: MNEMONIC required: false description: BIP-39 mnemonic for client wallet (testnet/regtest only). - name: MPP_SECRET_KEY required: false description: Server-side MPP signing secret (HMAC-binds challenge IDs). - name: MPP_REALM required: false description: Stable realm identifier for mppscan attribution. - name: MPPX_RPC_URL required: false description: Tempo RPC endpoint override. - name: STRIPE_SECRET_KEY required: false description: Stripe API secret key for the Stripe method. - name: STRIPE_PROFILE_ID required: false description: Stripe crypto profile ID for on-chain deposits. --- # MPP - Machine Payments Protocol MPP is an open protocol (co-authored by Tempo and Stripe) that standardizes HTTP `402 Payment Required` for machine-to-machine payments. Clients pay in the same HTTP request - no accounts, API keys, or checkout flows needed. The core protocol spec is submitted to the IETF as the [Payment HTTP Authentication Scheme](https://datatracker.ietf.org/doc/draft-ryan-httpauth-payment/). Code in this skill uses placeholder token names (`<USDC_TEMPO_MAINNET>`, `<PATHUSD_TESTNET>`); the real addresses live in the [Tempo documentation](https://docs.tempo.xyz) and `references/tempo-method.md`. ## Core Architecture Three primitives power every MPP payment: 1. **Challenge** - server-issued payment requirement (in `WWW-Authenticate: Payment` header) 2. **Credential** - client-submitted payment proof (in `Authorization: Payment` header) 3. **Receipt** - server confirmation of successful payment (in `Payment-Receipt` header) ## Payment Methods & Intents MPP is payment-method agnostic. Each method defines its own settlement rail: | Method | Rail | SDK Package | Status | |--------|------|-------------|--------| | [Tempo](https://mpp.dev/payment-methods/tempo) | TIP-20 stablecoins on Tempo chain | `mppx` (built-in) | Production | | [Stripe](https://mpp.dev/payment-methods/stripe) | Cards/wallets (SPT) + on-chain crypto deposit | `mppx` (built-in) | Production | | [EVM](https://mpp.dev/payment-methods/evm) | EIP-3009 stablecoin authorizations (x402-exact compatible) | `mpp
_meta.json
{
"ownerId": "kn76gpsgjw5chv0xvzbzcb8cxn81x46r",
"slug": "mpp",
"version": "0.10.2",
"publishedAt": 1788948139474
}references/cli.md
# mppx CLI
Verified against mppx 0.8.15 (`mppx --help`).
## Making Requests
```bash
# Paid request (payment handled automatically)
npx mppx https://api.example.com/data
# POST with a JSON body
npx mppx -X POST -J '{"prompt":"hello"}' https://api.example.com/chat
# Show response headers, then full negotiation detail
npx mppx -i https://api.example.com/data
npx mppx -vv https://api.example.com/data
```
Key root flags:
| Flag | Purpose |
|---|---|
| `--account, -a` | Account name (env: `MPPX_ACCOUNT`) |
| `--config, -c` | Path to config file (env: `MPPX_CONFIG`) |
| `--data, -d` / `--json-body, -J` | Request body / JSON body (implies POST) |
| `--header, -H` | Add header (repeatable) |
| `--method, -X` | HTTP method |
| `--method-opt, -M` | Method-specific option, `key=value` (repeatable) |
| `--network` | `mainnet` or `testnet` |
| `--rpc-url, -r` | RPC endpoint (env: `MPPX_RPC_URL`, falls back to `RPC_URL`) |
| `--session` | Session selection: `auto` (default), `new`, or a channel ID |
| `--auto-swap` / `--pay-with` / `--slippage` | Tempo auto-swap controls |
| `--include, -i` | Include response headers in output |
| `--verbose, -v` | Verbosity (`-v` details, `-vv` headers) |
| `--currency` | Payment currency/token address to select |
| `--confirm` | Show confirmation prompts |
Global output flags apply to every command: `--format <toon|json|yaml|md|jsonl>`, `--filter-output`, `--full-output`, `--token-count`, `--token-limit`, `--token-offset`, `--schema`, and `--llms` / `--llms-full` for an LLM-readable manifest. `--mcp` runs the CLI itself as an MCP stdio server.
## Inspecting a Challenge Without Paying
There is no `--inspect` flag. Use `mppx sign --dry-run`, which parses and validates a challenge without signing:
```bash
# Parse a challenge without signing it
npx mppx sign --dry-run --challenge 'Payment id="...", method="tempo", ...'
# Or sign it and emit the Authorization header value
curl -si https://api.example.com/data | grep -i www-authenticate | npx mppx sign
```
`mppx sign` accepts the challenge via `--challenge/-C` or on stdin, and shares the account, network, RPC, and auto-swap flags with the root command.
## Validating a Server
`mppx validate` runs an end-to-end conformance check against an MPP server: discovery, challenge formats, error handling, and the full payment flow.
```bash
npx mppx validate http://localhost:4242
# Skip discovery and test one endpoint directly
npx mppx validate http://localhost:4242 -e POST:/paid --body '{"prompt":"hi"}'
```
| Flag | Purpose |
|---|---|
| `--endpoint, -e` | Endpoint to test as `METHOD:path`; skips discovery |
| `--body` | Request body. In discovery mode, JSON keyed by path is a per-path mapping |
| `--query` | Query parameter `key=value` (repeatable) |
| `--header, -H` | Request header `key:value` (repeatable) |
| `--yes, -y` | Auto-approve mainnet payments |
| `--output-json, -j` | JSON output (auto-enabled in known agent environments) |
| `--verbose, -v` | Verbosity level |references/custom-methods.md
# Custom Payment Methods
## Overview
MPP supports dynamic extensibility through custom payment methods. Any payment rail - other blockchains, card processors, proprietary billing systems, loyalty points - can be integrated by implementing three pieces:
1. **Method definition** - schema describing the credential and request shapes
2. **Client implementation** - how to create a credential (proof of payment)
3. **Server implementation** - how to verify a credential
Custom methods plug into the same `Mppx.create()` pipeline and work across all transports (HTTP, MCP, JSON-RPC) and frameworks (Hono, Express, Next.js, etc.) without changes.
---
## Define a Method
Use `Method.from()` to define a new payment method with its name, intent, and Zod schemas:
```ts
import { Method } from 'mppx'
import { z } from 'zod'
const lightningCharge = Method.from({
intent: 'charge',
name: 'lightning',
schema: {
credential: {
payload: z.object({
preimage: z.string().length(64), // 32-byte hex
}),
},
request: z.object({
invoice: z.string(), // BOLT11 invoice
paymentHash: z.string().length(64),
network: z.enum(['mainnet', 'regtest']).default('mainnet'),
}),
},
})
```
`Method.from()` returns a base method definition. It has no behavior - just the type contract that both client and server implementations must satisfy.
**Parameters:**
| Field | Type | Description |
|---|---|---|
| `intent` | `string` | Payment intent (e.g. `'charge'`, `'session'`) |
| `name` | `string` | Method identifier (e.g. `'lightning'`, `'loyalty-points'`) |
| `schema.credential.payload` | `ZodType` | Zod schema for the credential payload |
| `schema.request` | `ZodType` | Zod schema for the challenge request fields |
---
## Client Implementation
Use `Method.toClient()` to add credential creation logic to a base method:
```ts
const lightningClient = Method.toClient(lightningCharge, {
async createCredential({ challenge, context }) {
const request = challenge.request // decoded request object
const invoice = request.invoice
// Pay the invoice and get the preimage
const preimage = await payInvoice(invoice)
return {
payload: { preimage },
}
},
})
```
`createCredential` receives:
- `challenge` - the parsed challenge from the server's 402 response
- `context` - optional context passed from the application (e.g. wallet instance, user preferences)
It must return a serialized credential matching the `schema.credential.payload` Zod schema.
---
## Server Implementation
Use `Method.toServer()` to add verification logic to a base method.
**Note on `verify` vs `validate` + `broadcast`.** The single `verify` hook shown below is now marked deprecated upstream: it "combines both operations and may consume payment state, so it cannot support a safe pre-check endpoint." The replacement splits it in two - `validate` for a non-mutating check that the credential satisfies the challenge, and `broadcast` for references/discovery-and-proxy.md
# Discovery and the Payments Proxy
Two related surfaces: making an existing API payable (`mppx/proxy`), and publishing a machine-readable description of what your service charges for (`mppx/discovery`).
## Payments Proxy (`mppx/proxy`)
Gate an upstream API behind MPP payments without touching it.
```ts
import { Proxy, openai, anthropic, stripe } from 'mppx/proxy'
import { Mppx, tempo } from 'mppx/server'
const mppx = Mppx.create({
methods: [tempo()],
secretKey: process.env.MPP_SECRET_KEY,
})
const proxy = Proxy.create({
title: 'My API Proxy',
description: 'Paid access to AI APIs',
basePath: '/api',
services: [
openai({
apiKey: process.env.OPENAI_API_KEY,
routes: {
'POST /v1/chat/completions': mppx.charge({ amount: '0.005' }),
'GET /v1/models': true, // free passthrough
},
}),
anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
routes: { 'POST /v1/messages': mppx.charge({ amount: '0.01' }) },
}),
],
})
```
Built-in service presets, all from `mppx/proxy`: `openai()`, `anthropic()`, `stripe()`.
### Free Routes
A route is free when its value is the literal `true`. There is no `mppx.free()` helper.
```ts
routes: {
'GET /v1/models': true, // free passthrough
'POST /v1/chat/completions': mppx.charge({ amount: '0.005' }),
}
```
Free routes still run `rewriteRequest`, so header injection and path rewriting apply as normal.
### Custom Services
`Service.from` (exported as `custom`) wraps any upstream:
```ts
import { Proxy, custom } from 'mppx/proxy'
const service = custom({
title: 'Internal Search',
baseUrl: 'https://search.internal.example.com',
bearer: process.env.SEARCH_TOKEN, // Authorization: Bearer <token>
headers: { 'X-Client': 'mpp-proxy' }, // static headers on every upstream call
docs: { homepage: '...', apiReference: '...' },
docsLlmsUrl: 'https://example.com/llms.txt',
rewriteRequest: (req, ctx) => req, // mutate the upstream request
rewriteResponse: (res, ctx) => res, // mutate the response on the way back
routes: {
'POST /search': { pay: mppx.charge({ amount: '0.002' }), options: { apiKey: '...' } },
'GET /health': true,
},
})
```
Route values accept a payment handler, the literal `true`, or a `{ pay, options }` object when a single endpoint needs its own per-endpoint configuration.
### Handlers
```ts
// Fetch API (Cloudflare Workers, Bun, Deno, Next.js, Hono, Elysia, SvelteKit)
export default { fetch: proxy.fetch }
// Node.js http server
import http from 'node:http'
http.createServer(proxy.listener).listen(3000)
```
### Discovery Endpoints
The proxy auto-serves these (all active):
- `GET /discover` - JSON service list
- `GET /discover/{id}` and `GET /discover/{id}.md` - single service detail
- `GET /discover/all` and `GET /discover/all.md` - all services with full route details
- `GET /llms.txt` - LLM-readable overview (`GET /discover.md` is an alias)
Content negotiAionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/tenequm/skills/mpp",
"sourceUrl": "https://clawhub.ai/tenequm/skills/mpp",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T23:41:23.904Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-mpp/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-mpp/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T23:41:23.904Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.9K downloads",
"href": "https://clawhub.ai/tenequm/mpp",
"sourceUrl": "https://clawhub.ai/tenequm/mpp",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T23:41:23.904Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "0.10.2",
"href": "https://clawhub.ai/tenequm/mpp",
"sourceUrl": "https://clawhub.ai/tenequm/mpp",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-09-09T10:02:19.474Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-mpp/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tenequm-mpp/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 0.10.2",
"description": "Updated mpp from 0.10.1 to 0.10.2. Changes: - modified `CHANGELOG.md` - modified `SKILL.md`",
"href": "https://clawhub.ai/tenequm/mpp",
"sourceUrl": "https://clawhub.ai/tenequm/mpp",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-09-09T10:02:19.474Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
