← Learn
AGENT ECONOMY

How to Monetize an MCP Server: Subscription Plus x402, a Working Example

How to monetize an MCP server: free sample tools, a subscription behind OAuth, and pay-per-call over x402, with a live server that runs all three.

Guide · November 14, 2026 · 10 min read

There is no built-in billing in the Model Context Protocol. The spec defines tools, transports and authorization. It says nothing about money. That leaves every server builder to decide who pays, when, and how the server finds out.

This page covers the three models that work today, how each one runs at the protocol level, and how to decide which tools go where. The worked example is Coil's own server, which uses all three on one endpoint. If you want the wider argument for why a SaaS company would do this, start with SaaS as an MCP server.

The three models

Free sample tools. The server answers with no sign-in and no payment. The purpose is evaluation: an assistant, and the person behind it, can see what the server returns before committing anything.

A subscription behind OAuth. The customer pays you a flat fee through your normal billing. The MCP client signs in to your server with OAuth, and the server unlocks the paid tools for that user. This suits people who connect an assistant and use it every week.

Pay-per-call over x402. An agent with a wallet pays for a single read. No account, no key, no signup. x402 is an open payment standard that uses the HTTP 402 status code, so payment fits inside an ordinary request and response. This suits agents that need one answer, one time, and anything that cannot hold an account.

The models are not exclusive. They answer three different buyers: someone who is looking, someone who is committed, and a machine that is passing through.

How each one works at the protocol level

Free tools

Nothing special. The server exposes tools and answers tools/call without credentials. The current MCP specification still expects servers to validate inputs, apply access controls, rate limit and sanitize outputs, and that applies to free tools too. A free tier with no rate limit is an open door for scrapers.

OAuth on the MCP endpoint

Authorization is optional in the spec, and when you use it the shape is fixed:

  1. The client calls a protected tool without a token.
  2. The server answers 401 with a WWW-Authenticate header that points at its protected resource metadata, defined by RFC 9728.
  3. The client reads that metadata, finds the authorization server, and runs an OAuth 2.1 flow with PKCE, including the resource parameter that names your server.
  4. The client sends the resulting token as Authorization: Bearer on every request.
  5. Your server checks that the token was issued for it, not for some other service.

On client registration, the 2026-07-28 revision says Client ID Metadata Documents are the preferred route, and marks Dynamic Client Registration as deprecated and kept for backward compatibility. Support the preferred route if you are building fresh.

The spec also allows the tool list to vary with the authorization presented. A signed-out caller can see the free tools. A subscriber's token reveals the rest.

Assistants handle the sign-in screen for you. Anthropic's custom connectors support OAuth, and Microsoft's Copilot Studio wizard offers no authentication, an API key, or OAuth 2.0. Both are documented in Anthropic's connector guide and Microsoft's MCP guide. OpenAI's Responses API accepts an OAuth token in an authorization field on the MCP tool.

How Coil does it: the free tools stay open on the main endpoint. A client that calls a Live tool is sent through an OAuth sign-in, where the subscriber's licence is checked. The token lasts an hour, and each refresh checks the licence again, so a cancelled subscription ends within the hour. The steps are in Coil's auth.md.

The 402 challenge and the retry

x402 follows a fixed sequence:

  1. The agent requests a paid resource.
  2. The server answers HTTP 402 with the payment requirements: which network, which asset, how much, and who gets paid.
  3. The agent signs a payment and retries the same request with the payment attached.
  4. The server verifies and settles the payment, directly or through a facilitator, and returns the data.

In version 2 the requirements travel in a base64-encoded PAYMENT-REQUIRED header. The retry carries a PAYMENT-SIGNATURE header, and the server confirms in a PAYMENT-RESPONSE header, per the x402 documentation.

Inside MCP, the same idea rides in the request metadata. Coil accepts the payment on params._meta["x402/payment"], which is compatible with the @x402/mcp client. The same server also answers plain HTTP routes with a 402, for agents that do not speak MCP.

The v1 and v2 dialects

This part catches most new sellers. x402 has two wire formats in circulation, and a client built for one may not parse the other.

Per the official migration guide, version 1 used X-PAYMENT and X-PAYMENT-RESPONSE headers, plain network names such as base, and an x402Version of 1. Version 2 renames the headers to PAYMENT-SIGNATURE and PAYMENT-RESPONSE, identifies networks in CAIP-2 form such as eip155:8453, and sets x402Version to 2. The facilitator accepts both.

What the guide does not cover is how real clients behave when you serve only one. In our own testing, which we wrote up in x402 v1 vs v2, the v1 npm client parsed the 402 response body and rejected CAIP-2 network names. The v2 client read the header and ignored the body. A seller serving one format locked out the other half of the ecosystem, and never saw it, because a client that cannot parse your 402 never sends a request you can log.

Our fix was to serve both: a v1-readable entry in the body, and the canonical v2 document in the header. Test with the real published client packages, not clients you wrote against your own server.

Choosing per-tool prices: what to give away and what to gate

A rule that has held up for us: free tools prove the server works, and paid tools deliver the thing the customer would otherwise do by hand.

Give away what shows the shape of the answer. A sample is useful when it is real. Coil's free tools return an actual slice of the data, not a mock-up. If an agent cannot tell what a paid call would return, it will not pay for one.

Give away setup help. A tool that explains how to connect, what each tier unlocks and what the limits are should never be behind a wall. Coil's setup tool is free to call.

Gate on depth and freshness, not on basics. Charging for the full result set, for fresher data, or for history costs the free user nothing they relied on. Charging for something the user expected to be free reads as a trap.

Price per call by the size of the answer. A tool that returns one fact should cost less than one that returns a whole dataset. Coil's per-read prices on its agents page run from a tenth of a cent to five cents, with the cheapest reads being small yes-or-no checks. Read current prices from that page.

Put a free check in front of paid reads. Agents poll. If every poll costs money, buyers stop polling, or stop buying. Coil publishes a free change-detection hash so an agent can check cheaply and pay only when something moved.

Keep a subscription for heavy or repeat use. A person who connects an assistant and uses it every morning should not meter every call. A flat fee gives them predictability and gives you recurring revenue.

How Coil splits its tools

Coil is a research publication: a scored board of 650+ US stocks and ETFs, served at https://mcp.coil.trade/mcp. It reads and ranks, and it has no tools that place orders. The split looks like this.

  • Free is a sample of the morning read: three names per book with headline fields. It covers the market regime, a buy list, single-stock and sector reads, leaders, rotation, hold state and a crypto trend gate. No key, no account.
  • Coil Live is the full feed and the versioned rulebook, behind OAuth sign-in on a subscription. It is for someone who wants the whole board throughout the market day.
  • x402 is single reads for agents with no account. Each free tool has a paid live twin, and a few reads, such as the full board and a point-in-time archive of past scores, exist only as paid calls.

The three lanes do not cannibalize each other because they serve different jobs. The sample shows what the board is. The subscription is for people who use it all the time. The per-read lane is for an agent that needs one answer now. The guide to Coil's free tools shows what each returns, and the agent docs have the catalogue.

Coil is research, not investment advice. Orders are placed by the customer's own agent at their own broker.

Discovery: how paying customers find the server

A monetization model with no traffic earns nothing. Four pieces carry most of the discovery work.

The MCP Registry entry. The official registry is a metadata catalog for public servers. It is in preview, and names are tied to a verified domain or GitHub account. Coil's entry is trade.coil/stock-market-scanner, and you can see it in the registry API.

A server card. A server card is a small JSON document that describes a server for clients before they connect. The format is still moving. Early drafts placed it at /.well-known/mcp/server-card.json, which is where Coil serves its card. The current server card extension points clients to an AI Catalog at /.well-known/ai-catalog.json and reserves the endpoint URL plus /server-card as the default location. Check that document before you pick a path.

llms.txt. A plain-text map at your site root, as described at llmstxt.org. It is a proposal, not a formal standard, but agents and answer engines read it. Say what you sell, what is free, and where the payment terms live.

A page written for agents. Coil publishes agents.md, a short document that gives the endpoint, the free tools and the sign-in route in one place. That is Coil's own convention, not a standard. Its value is that an agent can read the whole offer in one fetch.

Directories matter too. Claude's connector directory, for example, puts a server where users already look. Coil is listed there.

Mistakes to avoid

  • Serving one x402 dialect. Covered above. It is the most common silent failure.
  • Long resource descriptions. In our testing, a resource description over 500 characters made the Coinbase facilitator reject both verify and settle, while the endpoint kept serving 402 responses nobody could pay.
  • Ignoring the delist clock. Payment catalogs may remove a listing that sees no settlement for 30 days, and in our experience there is no re-register call. Only a real settled payment refreshes it. If your traffic is all crawlers, plan for that.
  • Writing prices into tool descriptions. Descriptions go stale. Read prices from one source, and link to it.
  • Testing with your own client only. Your probes share your server's assumptions. Pay your own endpoint with the packages your buyers will use.
  • Trusting tool annotations. The spec tells clients to treat annotations as untrusted unless they come from a trusted server. Do not rely on a hint to protect a write tool.
  • Passing tokens through. An MCP server must accept only tokens issued for itself, and must not forward the token it received to another service.
  • Charging for the basics. If the free tier cannot show what the paid tier does, nobody pays for the second call.
  • Leaving the free tier unlimited. Rate limit it. The spec requires servers to.

FAQ

Can you charge for an MCP server?

Yes, though the protocol has no billing of its own. You charge through a subscription that unlocks tools after an OAuth sign-in, through per-call payment such as x402, or through a mix. Most servers also keep a free sample so buyers can evaluate it.

What is x402 and how does it work with MCP?

x402 is an open payment standard built on HTTP 402. The server answers a request with the payment terms, the agent signs a payment and retries, and the server returns the data. Inside MCP, the payment can ride in the request metadata, so an agent pays for a tool call without leaving the protocol.

Should I use a subscription or pay-per-call?

Use both if your buyers differ. A subscription suits people who connect an assistant and use it often. Pay-per-call suits agents that need one answer and have no account. Keep a free sample in front of either.

How do I stop free users from abusing the server?

Rate limit every tool, free ones included, as the spec requires. Keep the free tier to a real but limited sample, and offer a cheap change check so legitimate agents have no reason to poll the paid routes.

How do paying customers find my MCP server?

Publish it to the official MCP Registry, list it in assistant directories, serve an llms.txt file, and write a short page that an agent can read in one fetch. A server does not bring its own demand.

Sources

Educational research only. Nothing here is a buy or sell recommendation, financial advice, or a promise about any market. Figures are as of the dates shown and sourced above; decide for yourself, or talk to a licensed adviser.

See all three models on a live server

Coil is a stock-research MCP server: a scored board of US stocks and ETFs that your assistant reads. The free tools need no key and no account, Coil Live adds the full feed behind sign-in, and agents with a wallet can pay per read over x402. More on how Coil works for agents.

Connect Coil to your AI — free

Coil is software and impersonal research, not investment advice. It is not a managed account and not a signal service. Markets can lose money, and leveraged ETFs can lose value rapidly, including total loss. Backtested research is not a promise of returns.