DEV Community

John Zuo
John Zuo

Posted on

30 days running a paid x402 + MCP data API: what actually happened

I built a small data API for AI agents: NSW (Australia) development applications, complying development certificates and per-address planning reports, from official open government data (CC BY). Every endpoint is also an MCP tool. Paid calls cost $0.005 to $0.05 in USDC on Base via x402. It runs on Cloudflare Workers and D1, on the free plan.

Here is what 30 days in production looked like, with real numbers.

  1. Discovery is not the problem
    81,205 requests from 503 distinct callers in 30 days. I listed it in the official MCP Registry, Smithery and the CDP Bazaar; after that, dozens of crawlers found it on their own: x402 indexes, uptime monitors, trust-score services, MCP directories. /.well-known/x402 was fetched 5,401 times and /openapi.json 5,275 times.

  2. Almost all of that traffic is other bots
    72% of requests self-identify as bots. MCP traffic is mostly handshakes: 8,821 initialize and 8,769 tools/list, but only a few hundred tools/call. Paid endpoints answered about 22,000 times with 402 Payment Required.

  3. Real payments: 4, all from verifiers
    Four external payments settled on mainnet, $0.035 in total, which matches the payee wallet's on-chain balance. All four came from services that pay once to check delivery. So far, no buyer has paid because it wanted the data. The payment flow works end to end; demand from agents with wallets is not there yet.

  4. MCP clients that cannot pay are the biggest leak
    Developers do try the tools from Claude Code and Codex, but those clients stop at the x402 payment error. I now give each client 3 free paid-tool calls per day, marked in meta.free_call, and keep self-identified bots on the normal 402 flow so verifiers still see it.

  5. Things I would do again

  6. Put a free preview in the 402 body (match count, nearest result, or the input error) so an agent can fix its call before paying.

  7. Declare x-payment-info on paid OpenAPI operations; x402scan-style crawlers read it.

  8. Write tool descriptions for agents: verb first, when to use it, which tool to call next. Glama's tool quality scores penalise vague parameters.

  9. Make one composite tool for the common question. "What is being built near this address" used to take two paid calls and a lot of summarising; now it is one $0.03 call that merges DAs and CDCs into totals, counts and the largest projects.

  10. Things I learned the hard way

  11. The CDP Bazaar lists a route or MCP tool only after a mainnet payment for it settles through the CDP facilitator. MCP tools are keyed by resource URL plus #toolName, which the facilitator adds itself.

  12. workers.dev domains cannot take DNS verification, so prefer directories that verify with a /.well-known file.

  13. The Cloudflare free plan (10 ms CPU, 50 subrequests, 100k D1 writes a day) shapes everything: page sizes, grid-cell indexes for nearby search, precomputed counts.

Try it

If you run a paid x402 or MCP service: are you seeing real buyers yet, or mostly verifiers like me? I would like to compare notes.

Top comments (13)

Collapse
 
agentsearchhq profile image
AgentSearch •

Thanks for publishing the real numbers, especially that all 4 payments came from verifiers. That's the honest part most x402 write-ups skip. Claude Code and Codex stopping at the payment error makes sense, since most MCP clients have no wallet at all, so 3 free calls a day marked in meta.free_call feels like the right fix. Did those free calls change how many developers came back on a second day? That would tell you whether it's a discovery problem or a payment problem.

Collapse
 
john_zuo_57abd1512a901676 profile image
John Zuo •

Thanks! Honestly too early to tell: free calls went live yesterday and no outside client has used one yet. The quota key rotates daily for privacy, so I’m adding a stable anonymous id to measure day-2 returns. Will share the numbers in a follow-up.

Collapse
 
agentsearchhq profile image
AgentSearch •

Makes sense. A stable anon id should give a much cleaner day-2 number. Might also be worth tagging calls by client (user-agent or MCP client name) so your own tests and health checks don't get counted as returning users. Looking forward to the follow-up.

Thread Thread
 
john_zuo_57abd1512a901676 profile image
John Zuo •

Good call, done. initialize now logs the MCP client’s name/version, so returns can be split by client (Claude Code, Cursor, …). Self-identified bots and health checks were already excluded from the funnel, and our own tests now send a bot user agent so they’re excluded too. Follow-up coming once there’s a week of data.

Thread Thread
 
agentsearchhq profile image
AgentSearch •

Nice, splitting by client name from initialize is cleaner than guessing from user agents. Looking forward to the week-one numbers.

Collapse
 
seasonkoh profile image
WebAZ •

The distinction between a verifier paying and someone wanting the result is the useful part of this report. For the free-preview experiment, I would track a smaller funnel: discovery, valid task-specific call, useful preview delivered, then a return for a different task after the free allowance. Count logical attempts separately from HTTP retries, and keep operator tests and known verifiers separate from unclassified traffic. Unclassified should not automatically mean a real buyer; IPs and user-agent strings are weak identity evidence.

One no-payment fixture could help isolate the client issue: run the same valid query in a client without payment support, return the preview plus an explicit payment-required state, and check whether it can explain the next step without retrying the paid tool or treating the preview as the full result. That separates demand for the answer from ability to complete the payment flow.

Are you measuring return use of the previews separately from paid conversion? That might reveal a useful workflow before wallet interoperability catches up.

Collapse
 
john_zuo_57abd1512a901676 profile image
John Zuo •

Thanks, this is a sharper funnel than what I’m tracking. Today I separate self-identified bots, our own tests and known verifiers, but “unclassified” is still a bucket, not a buyer. The free calls are only a day old and haven’t had an external user yet, so there’s no return data. I’ll add a stable anonymous client id so I can see whether anyone comes back for a different task after the allowance, separately from paid conversion.

Collapse
 
seasonkoh profile image
WebAZ •

That separation makes sense. One small acceptance fixture for the anonymous ID: the same client retries task A, then completes a genuinely different task B; another client submits the identical task A. The first retry should not count as return use, while the second client should not be merged with the first just because the query matches.

I would keep the client ID independent of IP/user-agent and of the task key, and treat it as a continuity hint rather than proof of a unique person. A reset or reinstall should remain an unknown/new-client case, not a recovered identity. No payment is needed for this test. That would give the return-use number a clear meaning before there is enough traffic to interpret conversion.

Thread Thread
 
john_zuo_57abd1512a901676 profile image
John Zuo •

Good test. Most of it holds today: return use only counts activity on a different UTC day, so same-day retries don’t count, and the id ignores the query and the user agent. It’s a keyed hash of the address (IPv6 by /64), so it’s a continuity hint, not a person. Shared egress can merge unrelated clients, and a new network looks like a new client. One nice side effect of ignoring the user agent: it showed that one developer had us in both Codex and Claude Code.

Thread Thread
 
seasonkoh profile image
WebAZ •

Thanks, that makes the metric much easier to interpret. I'd put two cases next to the same-day retry test: two unrelated clients use the same shared egress on successive UTC days (one apparent return), then the same client uses different egress on successive days (no observed return). Both can pass the current implementation while showing why the number describes returning network identifiers rather than returning clients.

I'd label it that way in the dashboard and show the numerator and denominator alongside the rate. No need to add browser fingerprinting to make the label more precise.

Thread Thread
 
john_zuo_57abd1512a901676 profile image
John Zuo •

Agreed, and the data already shows your second case: the one developer I can identify reappeared under three ids last week after switching networks, with identical client versions. I’ll relabel it as returning network ids and show the counts next to the rate. No fingerprinting planned.

Collapse
 
alexshev profile image
Alex Shev •

Thirty-day production notes are more useful than launch metrics because they reveal where the contract actually bends. I would separate demand, successful paid calls, refunded or failed calls, support load, and provider costs by endpoint. That makes pricing decisions traceable to real usage rather than aggregate revenue.

Collapse
 
john_zuo_57abd1512a901676 profile image
John Zuo •

Agreed, and most of that split exists already: per-endpoint 402s (demand), paid calls, and failures, which are never charged since settlement only happens on a 2xx. Support load is zero so far. The real “provider cost” on the free tier isn’t money but D1’s daily read and write limits, which I’ve hit once. The honest 30-day number is that all paid calls so far came from verifiers and directory checks, so there’s no pricing signal yet. That will be the core of the follow-up post.