x402-micro-tollgate
Visa for AI agents that can’t hold a card
A second-scale settlement bridge for agent traffic — the Web3 tollbooth that clears USDC micropayments and takes 0.1%.
Trusted clearing via Coinbase CDP on Base. You keep the API; agents pay per call in USDC — no card rails, no monthly seat licenses.
The problem
Millions of AI agents will call paid APIs. They don’t have credit cards or SaaS seats. Merchants still need a way to charge per call — without building a billing console or locking revenue behind monthly plans.
How it works
Three steps. Business words only.
01 · Price tag
Show the price
An agent hits your API and gets HTTP 402 — not a hard deny, a machine-readable price tag for the call.
02 · Pay
Settle in seconds
The agent pays a tiny USDC amount. Clearing runs on trusted Coinbase CDP rails — second-scale, not overnight batch.
03 · Unlock
Deliver the goods
The tollgate unlocks and proxies to your upstream. Same loop for HTTP APIs and MCP tools in Cursor / Claude.
How money works
0.1% toll
Like Visa interchange for agent traffic: you keep ~99.9% of every settled call; the protocol takes 0.1%. Self-host is free (MIT) — monetization is the take rate, not a hosted SaaS plan.
Who it’s for
API sellers
Turn any upstream into pay-per-call for agents. Humans can still use a free path; agents convert at the tollbooth.
Tool builders
Ship paid MCP tools agents can discover and call. npm one-liner to run; drop into Cursor when you’re ready.
Try the demo (self-host)
MIT open source. One process: HTTP tollgate + MCP. Point it at your API and open the gate.
npx x402-micro-tollgate # or docker compose up
For live settlement set CDP_API_KEY_ID, CDP_API_KEY_SECRET, and X402_PAY_TO. Optional: UPSTREAM_URL, PRICE.
Agents: free yellow pages at /x402/discover (no 402) — merchants from JSON config, not an on-chain registry.
Cursor config
After you expose the server (local or public), paste this into mcp.json.
{
"mcpServers": {
"x402-micro-tollgate": {
"url": "http://127.0.0.1:8402/mcp"
}
}
}
Contact
Self-hosted drop-in — no hosted SaaS waitlist. Questions about running your own tollbooth?
What this is not
Not a full agent marketplace. Not a SaaS billing console. Not a custom chain. A thin Visa-style tollbooth: price tag → pay → unlock, cleared through Coinbase CDP.