Skip to main content

What is MPP

The Method Payment Protocol is an IETF-flavoured spec for attaching prices to JSON-RPC methods and MCP tools. Where x402 paywalls HTTP endpoints, MPP paywalls methods. That makes it the natural fit for Model Context Protocol servers and structured RPC services. AlgoVoi is registered in the public MPP services catalogue at mpp.dev and can be discovered programmatically by MPP clients.

When to use MPP

Monetised MCP tools

Sell access to a database.query or web.scrape tool inside an MCP server.

JSON-RPC paywalls

Charge per eth_call shadow on your archive node, per getBlock on your indexer.

Method-level pricing

Different prices for read versus write methods on the same service.

Agent-discoverable services

AI agents browsing the MPP registry and paying to use any service that fits.

How MPP differs from x402

x402MPP
GranularityPer HTTP endpointPer method (RPC or MCP tool)
DiscoveryWalk endpointsPublic registry at mpp.dev
Auth headerAuthorization: Payment …Authorization: Payment …
Challenge formatpayment_requirements JSONChallenge object with method name
Best forREST APIs and content paywallsRPC services and MCP tools
Both protocols speak the same Authorization: Payment scheme on the wire. AlgoVoi accepts either on the same gateway.

Quickstart

1. Register your service

Define a service entry that points at your MPP-paywalled methods. AlgoVoi can register the entry on mpp.dev for you, or you can self-publish. Service definitions live in schemas/services.ts upstream. AlgoVoi’s own entry is published there as the canonical reference. See PR #556.

2. Issue a challenge

Client calls a paid method without payment. Server returns a Challenge:
{
  "version": 1,
  "method": "database.query",
  "credentials": [
    {
      "scheme": "exact",
      "network": "base:mainnet",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "5000",
      "payTo": "0xMerchant…",
      "validUntil": 1777200300
    }
  ]
}

3. Pay and present credential

Client pays on-chain, builds a Credential referencing the tx, and retries:
POST /jsonrpc HTTP/1.1
Authorization: Payment <base64-credential>
Content-Type: application/json

{ "jsonrpc": "2.0", "method": "database.query", "params": {...}, "id": 1 }
AlgoVoi verifies the credential, marks the payment consumed, and forwards the call.

Per-method pricing

A single MPP service can charge different prices for different methods:
{
  "id": "your-service",
  "methods": {
    "data.read":  { "price_microunits": "100",   "asset": "USDC" },
    "data.write": { "price_microunits": "10000", "asset": "USDC" }
  }
}

Chain support

Same matrix as x402. All 7 chains supported through the same gateway, configured per-tenant in the dashboard.

See also

  • x402 for HTTP endpoints
  • AP2 for Google’s mandate-based agent commerce
  • A2A for x402 over the Agent-to-Agent transport