MCP PAYWALL-AS-A-SERVICE — PROTOTYPE
Put this in front of any MCP server. Every tools/call is metered and gated behind an on-chain USDC (Base) x402 payment before it's forwarded to the real server. The server owner keeps 85% of every paid call.
/dashboard/3ilm — requires the owner's dashboard token (X-Dashboard-Token header or ?token=), issued at onboarding, not shown here.POST /mcp/3ilm
tools/call with no X-PAYMENT header → gateway answers
HTTP 402 with the price + payTo address (standard x402 accepts[] challenge).
Client retries with a base64 EIP-3009 transferWithAuthorization payload (gasless — the payer
signs, the facilitator submits) or a Base USDC tx-hash → gateway verifies (local signature recovery +
facilitator settle) → forwards the call to the real MCP server → returns its result untouched.
Every paid call is logged to a revenue ledger split 15% platform / 85% server owner.