Loomal

How to Monetize an MCP Server with x402 and USDC on Base free tool to paid endpoint, end to end.

The complete path: host your server over HTTP, put an x402 gate in front of it, pick a per-call price, and list it where paying agents can find it.

Thousands of MCP servers do genuinely valuable work and earn their maintainers nothing, because until recently there was no sane way to charge an AI agent a few cents for a tool call. Card minimums made micropayments impossible and API-key billing assumed a human signed up first.

x402 changes the math: a payment protocol built into the HTTP exchange itself, settling USDC on Base per call. This guide is the end-to-end version — prerequisites, the payment flow, pricing, integration, and listing — with links into the deeper per-step guides.

Prerequisites: a URL and a wallet

Two things must be true before any monetization step. Your server must be reachable over Streamable HTTP — x402 is an HTTP handshake, so a stdio-only server has to migrate first (a transport swap, not a rewrite). And you need a wallet address on Base to receive USDC; it is non-custodial, so you hold the key and Loomal never touches your funds.

If your server already runs remotely, the remaining work is genuinely small — most maintainers go from free to paid in an afternoon.

How a paid call actually works

An agent calls your endpoint with no payment attached. Your server responds 402 Payment Required with the price and payment details. The agent's wallet signs a USDC payment authorization and retries; a facilitator verifies the signature and settles the transfer on Base — about two seconds — and only then does your tool handler execute. The agent gets its result, you get an Ed25519-signed receipt, and there is no chargeback path because the settlement is final.

Note the ordering: payment clears before your code runs. You never do work on spec, never invoice, never collect.

Pick the price

The minimum on Loomal is $0.01 per call, and that floor is the right starting point for lookups, conversions, and light transforms. Price upward from there based on what a call costs you (compute plus any upstream fees) and what it replaces for the buyer — specialized data and heavy compute commonly land between $0.05 and a few dollars per unit.

Don't over-deliberate. The price is one field in the console and you can change it whenever the data tells you to; the detailed pricing guides below cover benchmarks per category.

Wire up the gate

Integration is a wrapper in front of your MCP endpoint. With the Loomal SDK, you declare the price and your handler; the 402 response, signature verification, and settlement are handled for you:

mcp/route.ts
import { requirePayment } from "@loomal/sdk";
import { handleMcpRequest } from "./server"; // your existing MCP logic

export const POST = requirePayment(
  () => ({ price: "$0.02" }), // per tool call, settled in USDC on Base
  async (req) => handleMcpRequest(req),
);

List it where paying agents look

A priced endpoint nobody can discover earns nothing. List the server on the Loomal Index: claim your existing listing (Loomal imports from the official MCP registry) or submit it new, verify ownership through GitHub, connect your endpoint so the live tool list is published, and set the price. Every listing in the index is machine-queryable with its price, so an agent can find your server and pay it in one programmatic flow.

Loomal's fee is 5% on settled transactions, and it is currently waived.

What running a paid server looks like

Revenue arrives call by call as USDC in your wallet, and the console shows calls and settled volume per listing — no payout schedules, no reconciliation, receipts for every transaction. From there the levers are ordinary product work: tighten tool descriptions so agents call you correctly, watch which tools earn, and reprice as you learn.

Keep a free tier of value if you want one — a free stdio package for local use alongside the paid hosted endpoint is a common and honest split. What you cannot do is set the hosted price to zero; the floor is $0.01.

FAQ

Do I need to write any blockchain code?

No. Your integration surface is HTTP and JSON — declare a price, wrap your handler. Signature verification and on-chain settlement are handled by the SDK and facilitator. If you can add middleware to a web server, you can add x402.

Why USDC on Base specifically?

Per-call payments need cents-level amounts, near-zero fees, and fast finality. Base, an Ethereum L2, settles in about two seconds at fees far below a cent, and USDC is a dollar-pegged stablecoin — so a $0.02 price is actually two cents, not a volatile token amount.

What if an agent pays and my handler then fails?

Design for it: validate the request before quoting where possible, and make failures rare and observable. The signed receipt records exactly what was paid for which call, so making a failed call good — by retry or refund — is a deliberate policy you implement, not a chargeback imposed on you.

Can I monetize a server I maintain but didn't originally list?

Yes — if your server was imported from the official MCP registry it likely has an unclaimed listing already. Claim it via GitHub ownership verification, connect your endpoint, and add the price. The claim flow exists precisely so maintainers control their own listings.

Turn calls into revenue.

Claim your server, set a price, and accept your first x402 payment.

Open the Loomal console