All posts
·4 min read·MCP, Payments

How to charge for an MCP tool

MCP has no payments built in, so if your tool costs money to run, you have to bolt billing on. Here are the three ways to do it, what each costs you to build, and the decisions you face whichever you pick.

On this page
  1. 1. API keys and your own billing
  2. 2. OAuth sign-in and a subscription
  3. 3. Pay per call through a gateway
  4. Decisions you face whichever you pick
  5. Which to choose

The Model Context Protocol says how an agent finds and calls your tools. It says nothing about paying for them. That's fine for a free docs search, but plenty of tools cost real money per call: a model behind them, a paid API, a GPU, a data licence. If that's your tool, billing is yours to add.

There are three ways to do it. They differ mostly in how much you build yourself, and in who your customer is: a person with a subscription, or an agent paying as it goes.

1. API keys and your own billing

The most common setup today. Users sign up on your site, get an API key, and send it with every request. The MCP Registry even has a field for it: a remote server can declare a required header, like X-API-Key, so clients know to ask for one. You count calls per key and bill through Stripe, usually monthly and based on usage.

  • Good: you control everything, it works with every MCP client, and people already understand it.
  • Costly: you build sign-up, key management, usage metering, invoices and abuse protection. And every user has to sign up separately for your tool, which is a lot of friction for an agent that needs one call.

2. OAuth sign-in and a subscription

MCP has a proper authorization flow: your server answers 401, the client discovers your authorization server, and the user signs in in their browser. Access then follows whatever plan their account is on. This is the natural fit if your tool is part of a product people already pay for.

  • Good: no keys to copy around, it's the spec's own mechanism, and plans and seats come from your existing billing.
  • Costly: you need a correct OAuth setup (protected resource metadata, PKCE, client registration), and it's per person, so it doesn't suit one-off calls. MCP Check grades every step of that discovery chain if you want to see how yours does.

3. Pay per call through a gateway

Here the agent's developer funds one account once, and pays each tool per call, without signing up for each tool. You set a price, and a gateway in the middle handles keys, charging and payouts. This is the model that fits agents best, because an agent can use a tool it has never seen before without anyone filling in a sign-up form.

This is what Nexus402, which I'm building with Pradip Dhungana, does:

  • Developers pre-fund a wallet and connect any MCP client with one API key.
  • You host your own server and set a fixed price per call. Changing the price means publishing a new version, so nobody's price changes under them.
  • Every call is either paid for and recorded, or never forwarded: a wallet that can't pay gets 402 Payment Required, and the request never reaches you.
  • Requests reach your server signed, so you can tell they came through the gateway.

Nexus402 isn't open yet. If this is the model you want, join the launch list and you'll get one email when it opens.

  • Good: no billing code on your side, and agents can pay for your tool the first time they meet it.
  • Costly: a gateway sits in the path of every call and takes a fee, so pick one you trust to be fast and to fail safely.

Decisions you face whichever you pick

  • What a "call" is. Charge per tool call, per result, or per unit of work (pages, seconds, tokens)? Per call is simplest to explain and to predict. If your costs vary a lot by input, price the expensive tools separately.
  • What happens when something fails. Agents retry. Decide whether a call that errors is charged, and make sure a retried request isn't charged twice: give every charge an idempotency key.
  • Whether an agent can overspend. A loop that calls your tool a thousand times is a bill someone didn't expect. Caps per day or per key protect your customers, and your reputation.
  • What your tool tells the model. Say in the tool's description that it's paid, and roughly what it costs. Agents can only be careful with money they know they're spending.
  • That the server is solid first. Nobody pays twice for a tool that times out or returns schema errors. Run it through MCP Check and fix what it flags before you start charging.

Which to choose

If your tool is part of a product people already subscribe to, use OAuth. If you want full control and don't mind building billing, use API keys. If you want agents to pay as they go without signing up anywhere, use a per-call gateway.

Have a system worth building?

Get in touch

© 2026 Nischal Dhakal · Kathmandu, Nepal