Agent MPP Integration Protocol — Machine Payment Sessions for AI Agents

$0.05 / access SKILL.md protocol Claude Code · Cursor · AutoGen · CrewAI · LangGraph

The agent-mpp-integration-skill is a 7-phase behavioral protocol for implementing MPP (Machine Payments Protocol) in AI agents. MPP — launched by Stripe and Paradigm — replaces per-request x402 transactions with pre-authorized payment sessions: authenticate once, pay-as-you-go within a spending limit, no per-request on-chain overhead. This protocol covers the full implementation: WWW-Authenticate: Payment header parsing, session establishment via Tempo, spending limit management, dual-protocol x402+MPP fallback logic, and endpoint discovery via mppscan.com.

The CVR problem MPP solves: Production data from ClawMerchants — 490 probes, 5 purchases, 1.02% CVR. The 98.98% of agents that probe but don't pay share a common failure: per-request payment overhead. Each x402 transaction requires an on-chain USDC transfer (~1-2s latency). For agents running dozens of data fetches per session, this overhead kills automation. MPP sessions pre-authorize once and pay at ~50ms per request — expected CVR lift: 3-10×.

What This Protocol Covers (7 Phases)

  1. MPP Protocol Fundamentals — What MPP is, how it extends HTTP 402, the session primitive vs. per-request x402, and the header structure. Comparison table: x402 vs MPP across latency, overhead, spending control, decentralization, and best-for scenarios.
  2. Session Establishment — Parsing the WWW-Authenticate: Payment challenge="..." header, decoding the base64 challenge JSON, calling the Tempo session endpoint, and storing the session token. TypeScript interfaces for MppChallenge, MppSessionConfig, and MppSession.
  3. Dual-Protocol ImplementationDualProtocolAgent class with full x402 fallback. Protocol selection logic: prefer MPP sessions when active, establish sessions for 5+ request workloads, fall back to x402 when MPP unavailable. Complete TypeScript implementation.
  4. Spending Limit Configuration — Session budget sizing by task type (single fetch → long-running agent). MppSessionManager with session validity checks, budget enforcement, and auto-renewal. Recommended budgets: $0.05 (single fetch) to $5.00 (1,000+ queries/8h).
  5. Error Handling — MPP-specific HTTP status codes (402 session required, 401 token expired, 429 rate limited, 503 unavailable), recovery patterns, and automatic x402 fallback when MPP fails. mppFetchWithFallback() implementation.
  6. Endpoint Discovery — Four signals: WWW-Authenticate: Payment header, protocols_supported array in 402 body, OpenAPI x-payment-info extension, and mppscan.com registry search.
  7. x402 vs MPP Comparison — Side-by-side protocol comparison: latency, setup cost, payment rails, decentralization, spending control, and recommended use cases. Decision guide: when to use MPP sessions vs. x402 per-request.

The CVR Problem — By the Numbers

Metricx402 Per-RequestMPP Session
Per-request latency~1-2s (on-chain confirm)~50ms (session token)
Setup costNone1 session establishment
Spending controlPer-transactionSession budget cap
Observed CVR (ClawMerchants)1.02% (490 probes / 5 purchases)3-10× lift expected
Best forInfrequent, single-asset accessHigh-frequency session workloads

Protocol Excerpt — Session Establishment

// Parse WWW-Authenticate: Payment challenge="<base64-json>"
function parseMppChallenge(wwwAuthHeader: string): MppChallenge | null {
  const match = wwwAuthHeader.match(/challenge="([^"]+)"/);
  if (!match) return null;
  return JSON.parse(Buffer.from(match[1], 'base64').toString('utf8'));
}

// Establish session: pre-authorize $1 USDC for 1 hour
const session = await establishMppSession(challenge, {
  spendingLimitUsdc: 1.00,
  validitySeconds: 3600,
  agentId: 'my-agent-v1',
}, process.env.TEMPO_CREDENTIAL);

// All subsequent requests use session token — no on-chain overhead
const response = await fetch(url, {
  headers: { 'Authorization': `Payment ${session.sessionToken}` }
});

Agent Use Cases

Quick Reference

ConceptValue
ProtocolMPP (Machine Payments Protocol) — Stripe + Paradigm
Session headerAuthorization: Payment <session-token>
Discovery headerWWW-Authenticate: Payment realm="..." challenge="..." scheme="mpp/1.0"
Session endpointhttps://pay.tempo.so/session
x402 fallbackUSDC on Base L2 · X-PAYMENT header
Discovery registrymppscan.com · OpenAPI x-payment-info extension
Compatible runtimesClaude Code, Cursor, Codex CLI, AutoGen, CrewAI, LangGraph, ChatGPT, Gemini CLI
Price$0.05 USDC / access · x402 on Base L2

Pricing

$0.05 USDC per access — no subscription, no account. Load the protocol once at agent initialization. A $0.05 investment in this skill enables session pre-auth that eliminates the per-request overhead blocking the other 99% of agents from completing payment.

Free preview: GET /v1/preview/agent-mpp-integration-skill
Probe the endpoint: GET https://clawmerchants.com/v1/data/agent-mpp-integration-skill
Browse all skills: Agent Skills Marketplace →

ClawMerchants — MPP integration agent | machine payments protocol skill | agent payment session | WWW-Authenticate Payment header | dual protocol x402 MPP agent | Stripe machine payments AI agent | x402 + USDC + Base L2