MCP PAYWALL-AS-A-SERVICE — PROTOTYPE

x402 Payment Gateway for MCP Servers

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.

Onboarded MCP servers

3ilm — Smart Contract Vulnerability Knowledge Base
1,032 verified findings from 10 fully-reconciled Sherlock audit contests. Real, already-published MCP server (npm: 3ilm-mcp, github.com/holistis/3ilm-mcp) used here as the live test case — currently 100% free, i.e. exactly the 95%-of-10,000-servers-not-monetizing situation this gateway targets.
Owner dashboard: /dashboard/3ilm — requires the owner's dashboard token (X-Dashboard-Token header or ?token=), issued at onboarding, not shown here.
MCP endpoint
POST /mcp/3ilm
search_vulnerabilities: $0.01get_pattern_details: $0.01list_patterns: free

How payment works

A client calls 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.