DEV Community

ScriptMasterLabs
ScriptMasterLabs

Posted on Originally published at scriptmasterlabs.com

How to Monetize an MCP Server: Per-Call x402 Payments (With Live Receipts)

How to Monetize an MCP Server: Per-Call x402 Payments (With Live Receipts)

There are 20,000+ MCP servers in the wild and fewer than 5% have any monetization. The guides that rank for "how to monetize an MCP server" are vendor pitches, Stripe subscription tutorials, or marketing calculators — none shows a live payment receipt.

Here's the receipt-first version. I run ScriptMasterLabs; we bill x402 on our MCP/HTTP tool infra on Base.

The model

Per-call x402 billing: your server answers each unpaid tool call with a 402 Payment Required challenge carrying price, asset, network, payTo address, and expiry. The agent's wallet signs the payment authorization, retries the same call, and a facilitator verifies and settles it on-chain. No accounts, no API keys, no checkout pages. Receiving a challenge costs the caller nothing.

Live receipts (curl them yourself)

1. The x402 payment manifest:

curl https://squeezeos-api.onrender.com/.well-known/x402
Enter fullscreen mode Exit fullscreen mode

Returns a live machine-readable contract: operator SCRIPTMASTERLABS, network eip155:8453 (Base), asset USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913), payTo 0xc29185fa176357612f3194735753e520e91adc46, facilitator https://api.cdp.coinbase.com/platform/v2/x402, challenge header PAYMENT-REQUIRED, MCP endpoint https://squeezeos-api.onrender.com/mcp, identity registered on the ERC-8004 agent registry (agent id 74033). Verified live September 22, 2026.

2. A live MCP handshake:

curl -X POST https://mcp-x402.onrender.com/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}'
Enter fullscreen mode Exit fullscreen mode

Answers with serverInfo: {"name": "mcp-x402", "version": "2.1.11"} and tool capabilities live.

Seller DIY

  1. On tools/call without a payment credential, return the payment terms — JSON-RPC error data on the MCP transport, or 402 + PAYMENT-REQUIRED header over HTTP.
  2. Verify the buyer's signature through a facilitator (ours points at the Coinbase CDP facilitator above), settle on-chain.
  3. Execute the tool, return the result with a PAYMENT-RESPONSE receipt.
  4. Zero-code alternative: proxy wrappers (xpay.sh, ag402) — but the proxy holds your upstream credentials and takes a cut. Own the challenge handler for production.

Real prices

  • SML provider listing: one-time 0.01 USDC on Base (verified live).
  • ProBlocks demo endpoint: 0.001 USDC per call on Base (September 2026).

The protocol sets no price — each seller does. Verify the fresh 402 challenge before signing anything.

Honest caveat

Our marketplace paid reads are currently quarantined (provider listings only), so I claim zero revenue figures. The manifest, the headers, and the handshake are what I can prove.

Canonical version: https://scriptmasterlabs.com/monetize-mcp-server

Top comments (0)