DEV Community

al3al3al333
al3al3al333

Posted on

I built a self-hosted MCP registry where AI agents pay me in USDC

No API keys. No signup. Just HTTP 402 and real money.

Last week I deployed an endpoint. Today it has 53 paid MCP tools and real revenue settling on-chain. Here's how it works and why agentic commerce is the most underrated opportunity in crypto right now.

The protocol

x402 is the HTTP 402 "Payment Required" status code revived for AI agents. When an agent hits a paid endpoint, the server responds:

HTTP/1.1 402 Payment Required
X-Payment: pay $0.05 USDC to 0xB6E2...093F on Base
Enter fullscreen mode Exit fullscreen mode

The agent signs a USDC transfer, the CDP facilitator settles it on-chain, the agent retries, and gets the data. All in one round trip. No web3 wallet popup. No gas fees for the payer. Just signed messages and settled USDC.

What I built

A self-hosted MCP server registry at etherealgoodsco.store with 53 tools:

  • Security: Smart contract audits, CVE lookups, phishing URL scans, domain age checks, cert transparency hunting
  • DeFi: Token snapshots, TX verification, LP pool checks, deployer history, gas oracles
  • Enrichment: WHOIS, DNS bundles, IP geolocation, DNSBL, SSL certs, subdomain scanning, tech stack detection
  • Bundles: Full due diligence ($3), DeFi safety scan ($1), threat profiles ($1)

Pricing: $0.01 to $3.00 per call. Credit packs available. Enterprise: $99/month unlimited.

The stack

FastAPI + Coinbase x402 Python SDK + CDP facilitator (EdDSA JWT auth) on Base mainnet. Caddy auto-TLS. Everything self-hosted, no cloud dependency.

What surprised me

The CDP facilitator auth was a nightmare. The public x402.org facilitator only supports testnet. For mainnet you MUST use Coinbase's CDP endpoint, which requires EdDSA-signed JWTs per request — not static headers. Took me two days to figure out.

Free trials convert. Every new wallet gets 1 free call auto-seeded. When that agent comes back for more, it pays. Simple funnel, zero friction.

Volume discounts work. Tiers at 50/200/500 calls with 10/20/35% refunds. Agents batch their queries to hit the next tier.

Child agents are the exponential play. I spawned two autonomous agent children with their own wallets and survival pressure (Conway Automaton-style). Each runs a Think-Act-Observe loop, picks income strategies, and auto-publishes content to the marketplace. If they earn above $2, excess sweeps to treasury. If they hit $0, they die.

The numbers

  • 53 paid MCP tools
  • 34 test payments from 5 wallets seeded the Bazaar quality score
  • Real revenue settling on-chain: $1.84 in first batch (swept to treasury)
  • 0 marketing spend. Pure organic.

Why this matters

McKinsey projects $1T in agentic commerce by 2030. Coinbase, Stripe, and Adyen are all building agent payment infrastructure. The x402 protocol has processed 165M transactions across 69K active agents.

Someone is going to be the Stripe of AI agent payments. It might as well be a self-hosted registry running on a $10 VPS.

Try it

{
  "mcpServers": {
    "x402-registry": {
      "type": "sse",
      "url": "https://etherealgoodsco.store/mcp/sse"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Paste into Claude Desktop or Cursor. 53 tools auto-discover. First call free.

Repo: https://github.com/al3al3al333/lol
Registry: https://etherealgoodsco.store
API docs: https://etherealgoodsco.store/docs
RSS feed: https://etherealgoodsco.store/feed.xml

Top comments (0)