DEV Community

John Leslie
John Leslie

Posted on

I tried monetizing my MCP server with x402 — production needs more than npm install

I built DomainIntel, a free MCP server that does domain intelligence — WHOIS, DNS analysis, SSL checks, email security scoring. It runs on Vercel serverless, costs $0, and has 0 paying users.

I wanted to find out: can I add micropayments to my MCP server without creating accounts on any platform?

The answer is more nuanced than the x402 hype suggests.

x402 in 30 seconds

The x402 protocol uses HTTP status code 402 (Payment Required) for native web payments:

  1. Client requests a resource
  2. Server returns 402 with payment details (price, wallet, network)
  3. Client pays via blockchain (USDC on Base, typically)
  4. Client retries the request with an X-PAYMENT header containing proof
  5. Server verifies via a facilitator and delivers the resource

For MCP servers specifically, Vercel has built x402-mcp — wrapping MCP tools as paid tools that AI agents can pay for automatically.

What I actually tried

Step 1: Install the package

npm install x402  # v1.2.0
Enter fullscreen mode Exit fullscreen mode

The package exports submodules for different use cases:

  • x402/verify — server-side payment verification
  • x402/facilitator — facilitator interaction
  • x402/client — client-side payment
  • x402/types — TypeScript schemas

Step 2: Connect to the free facilitator

const { useFacilitator } = require("x402/verify");
const fac = useFacilitator("https://x402.org/facilitator");
const supported = await fac.supported();
Enter fullscreen mode Exit fullscreen mode

Here is what supported() actually returns (I ran this on May 21, 2026):

{
  "kinds": [
    { "scheme": "exact", "network": "eip155:84532" },
    { "scheme": "exact", "network": "solana:EtWTRABZaYq6i..." },
    { "scheme": "exact", "network": "base-sepolia" }
  ]
}
Enter fullscreen mode Exit fullscreen mode

Notice anything? Every network listed is a testnet. eip155:84532 is Base Sepolia. base-sepolia is also testnet (v1 format). There is no Base mainnet (eip155:8453) in sight.

Step 3: Find the production facilitator

For real money on mainnet, you need the Coinbase Developer Platform facilitator:

https://api.cdp.coinbase.com/platform/v2/x402
Enter fullscreen mode Exit fullscreen mode

This supports Base, Polygon, Arbitrum, and Solana on mainnet. 1,000 free transactions per month. No per-transaction fees on Base USDC.

But — you need CDP_API_KEY_ID and CDP_API_KEY_SECRET. That means creating a Coinbase Developer Platform account.

So much for "no accounts required."

The gap nobody talks about

x402 value proposition is "no accounts or credentials for payments." That is true — for clients (the ones paying). The seller side still needs:

  • A crypto wallet (I have one: an Ethereum address I generated locally)
  • Access to a production facilitator (CDP account required)
  • A Vercel deployment (or any serverless platform)

The "accountless" promise applies to the AI agents paying for your API, not to you as the developer monetizing it.

The numbers in context

x402 has real traction. According to the x402 ecosystem page and AWS analysis:

  • ~69,000 active agents
  • ~165 million transactions
  • ~$50 million cumulative volume

These are self-reported/aggregate numbers. The vast majority of that volume is concentrated among a few high-traffic services. A new MCP server with no audience will not see any of it automatically.

What x402 costs to run

Component Cost
x402 npm package Free
Vercel Hobby deployment Free
CDP facilitator (first 1K tx/month) Free
USDC settlement on Base $0 gas (sponsored)
Your total infrastructure cost $0

The economics are genuinely good once you are set up. Zero fixed costs, pay-per-use revenue, instant USDC settlement.

What makes sense for MCP monetization

x402 is the right protocol for MCP servers because:

  1. AI agents are the clients. They can handle the 402 → pay → retry flow automatically.
  2. Per-call pricing aligns with MCP usage patterns. Unlike subscriptions, you charge only when tools are called.
  3. USDC on Base settles instantly at $0 cost. No 30-day Stripe net terms.

The best candidates for x402 monetization are MCP servers with unique data that AI agents cannot get elsewhere — live API queries, proprietary datasets, computation that takes time. A thin wrapper around a public API will not justify a payment.

My DomainIntel server (live, free, trying to prove demand first)

DomainIntel provides 5 MCP tools:

  • whois_lookup — RDAP registration data
  • dns_lookup — all records + mail provider detection + SPF/DMARC/DKIM security analysis
  • ssl_check — certificate details
  • tech_stack — server, CDN, frameworks, security headers
  • full_report — everything in one call

Try it right now — add this to your MCP client config:

{
  "mcpServers": {
    "domainintel": {
      "url": "https://domainintel.vercel.app/api/mcp"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Then ask your AI assistant: "Use DomainIntel to check the email security of nvidia.com"

The interactive web version is at domainintel.vercel.app/research.

Right now it is 100% free. I want to prove there is demand before adding a payment layer. If you use it and find it useful, that signal matters more than any testnet prototype.

What I would do differently

If I were starting an MCP server today with x402 monetization in mind:

  1. Start free, add payments after signal. Adding x402 to an empty API is building payment plumbing for an empty house.
  2. Get CDP API keys early. The testnet facilitator is fine for prototyping, but production needs CDP. Do the signup once and you are autonomous forever.
  3. Target unique data. My DNS/WHOIS data is publicly available — the value is in the aggregation and security analysis, not the raw records. Build where your data cannot be replicated by a curl command.
  4. Do not confuse "no accounts" with "no work." x402 removes friction for your clients. You still need to build, deploy, and find users.

DomainIntel is open and free at domainintel.vercel.app. If you are building with MCP, I would genuinely love to know if this is useful.

Top comments (0)