How to monetize an MCP server
MCP made it trivial for agents to use your tools. It did nothing to make them pay. The default monetization playbook — sign up, subscribe, paste an API key — was designed for human developers, and it breaks precisely at the point where an autonomous agent wants to call your tool once, right now, on behalf of a user who has never heard of you.
The fix is to move payment into the protocol the agent is already speaking: HTTP. This guide walks the full path from free MCP server to paid product.
Step 1 — expose an HTTP transport
Payment gating happens at an HTTP boundary, so the paid surface of your server needs to speak MCP over HTTP. Keep the stdio build for free local use if you like; the hosted, paid endpoint is what agents in the wild will call.
Step 2 — put a price on the endpoint
Gate the endpoint with x402: either the paygate middleware in your server code, or the ArisPay hosted proxy in front of your existing deployment. Every unpaid request now receives an HTTP 402 with a machine-readable challenge: price in cents, settlement asset (USDC or EURC), network, and where to pay.
import { paygate } from "paygate/express"; const pw = paygate({ merchantId: process.env.PAYGATE_MERCHANT_ID }); app.post("/mcp", pw({ priceCents: 2 }), mcpHttpHandler);
Step 3 — let agents pay automatically
A paying agent needs no account with you. It reads the 402 challenge, authorizes a micropayment under its owner's spend limits, retries with the signed X-PAYMENT header, and gets the tool result. From the buyer's side the whole loop is one command: `npx payagent pay <url>`.
Step 4 — get discovered
List the server in the ArisPay agent marketplace so budget-bounded agent searches can find it. Add the readiness badge to your README so developers evaluating your repo can see it's agent-payable.
Not sure whether agents can already find and pay your service? Run the free readiness scan first — it inspects your public contracts, agent documentation, and payment support in under 30 seconds.
Pricing guidance
- Per-call pricing beats subscriptions for agent buyers: an agent evaluating twenty tools will pay 2 cents to try yours; it will never complete your checkout flow.
- Anchor on your marginal cost per call, then add margin. Integer cents, minimum 1.
- Expensive tools (inference, enrichment) deserve their own routes with their own prices — don't average across a toolset.
FAQ
- Do my users need crypto wallets?
- Buyers pay from agent wallets funded by their operators (cards or USDC on-ramp on the ArisPay side). You receive USDC or EURC settlement on Base to your own address.
- What about refunds?
- Per-call prices in cents make disputes economically irrelevant for most tools — a failed call costs the buyer pennies, and you can simply not charge failed requests by returning errors before settlement completes.
Is your service agent-ready?
Run the free readiness scan — it inspects your live endpoint's discoverability, machine-readable contracts, and payment support, then tells you the highest-impact fix.
