How to charge for MCP tool calls: per-call pricing, payments and agent budgets
MCP has no payment primitive. Four ways servers charge per tool call today, from prepaid credit to x402, and the questions each answers for an agent.
CrabTalk Team
The MCP specification has no way to charge for a tool call. The 2026-07-28 specification defines tools, resources and prompts, but no price, payment or budget. No payment proposal has been adopted: some were closed, such as SEP-2009, and others, such as a request for an x402 client flow, are still open. Servers that charge per call do it on top of the protocol, in one of four ways. This post compares them, with sources, and lists the four questions any design has to answer before an agent can spend money safely.
Why not charge a card per call
Agents pay in small amounts: by transaction count, more than 87% of x402 payments in the 16 months through September 2026 fell between a hundredth of a cent and ten cents (Chainalysis, via Fireblocks). A card can't carry that. Stripe's minimum charge in USD is $0.50, and its fee is 2.9% + 30¢ per successful domestic US card payment, more than any payment in that range.
So the approaches below either charge calls to an account that is billed for many at once, or settle each call on a rail cheap enough to move a cent.
Four ways to charge per call
1. An API key and a plan
The server issues API keys, sells a monthly plan with a quota, and checks the key on each call. Nothing about it is specific to MCP: the key goes in the Authorization header and the server counts calls.
It's the easiest to build and the hardest for an agent to buy. Someone has to sign up, choose a plan and paste a key before the first call, and the agent can't see what one call costs, only that the quota ran out.
2. Charges per event, to an account
Each priced call is charged to the caller's account on the platform, which bills the person for many calls at once. Apify's pay-per-event model works this way: "An event is a specific, measurable action that your Actor triggers programmatically and charges the user for." The publisher names events, such as a tool call, sets a price for each, and charges them from code with Actor.charge(). Users "can set the maximum cost for the run", and "The Apify platform enforces this limit." Apify keeps 20% of the revenue.
Charging an account makes a one-cent call cheap, because the card is charged once for many calls. It needs an account, and the platform holding it becomes the place to set limits.
3. HTTP 402 with x402
x402 is an open protocol, authored by Coinbase, for paying for an HTTP request. The server answers 402 with payment instructions, the client pays and resends the request with proof of payment, and a facilitator verifies and settles it. Clients "are able to transact without the need for accounts, subscriptions, or API keys."
Cloudflare's Agents SDK applies it to MCP with paidTool, which takes a price in USD per call:
server.paidTool("square", "Squares a number", 0.01, { number: z.number() }, {}, async ({ number }) => {
// ...
});"When a client calls a paid tool without payment, the server returns 402 with payment requirements. The client pays via x402, retries with payment proof, and receives the result." Payments settle in USDC on Base, so the client needs a funded wallet and an x402-capable client.
4. A JSON-RPC payment challenge with MPP
The Machine Payments Protocol, "co-authored by Tempo and Stripe", carries the payment inside MCP rather than in HTTP. Its MCP guide describes the flow: the server answers tools/call with JSON-RPC error -32042 and a challenge, the agent retries with a credential in _meta, and the result comes back with a receipt in _meta. The tool charges from its handler:
const result = await mppx.charge({ amount: "0.01", description: "One lookup" })(extra);
if (result.status === 402) throw result.challenge;MPP lists stablecoins and cards through Stripe as payment methods. Its -32042 is the code MCP 2025-11-25 used for URL elicitation, and the 2026-07-28 revision reserves -32020 to -32099 for MCP itself, so the code conflicts with the current spec.
Comparing the four
| Approach | Caller needs | Sees the price | Spending limit |
|---|---|---|---|
| API key and plan | A signup and a plan | No, only the quota | The plan's quota |
| Charges to an account (Apify) | An account | Before the run, on the listing | A maximum cost per run |
x402 (paidTool) |
A funded wallet and an x402 client | In the 402 answer to the first call |
The wallet's balance, or the client's own rules |
| MPP | A payment method MPP supports | In the -32042 challenge to the first call |
The client's own rules |
Four questions any design answers
When does the agent see the price? Ideally before it decides to call, in the same place it reads the tool's schema. A price written in a tool's description is only text, and nothing makes the charge match it. The price the agent reads should come from the system that charges it.
What happens when the call fails? An agent that pays for a timeout and retries pays twice. Either the charge is taken only when the tool succeeds, or the retry has to be recognised as the same call; we covered retries in Idempotency keys for AI agent tool calls.
How much can the agent spend? A cap per run limits one call. An agent runs all day, so the limit a person cares about is per agent per day, and it has to hold across every seller the agent calls.
Who approves a new seller? A wallet that pays any server that answers 402 lets the agent decide where the money goes. A person who funds an agent usually wants to approve each new service once, and then let calls to it run without asking.
How CrabTalk charges for tool calls
A CrabTalk service sets each tool's price in code, in USD micros, and the price is compiled into the image it deploys:
#[tool(price = 2_000)]That tool costs $0.002 a call. Over MCP, inspect returns each tool's configured price before the agent calls it. The call charges the price in effect when it is admitted, unless the paying account owns the service or is the personal account of one of its org's members.
- Prepaid credit. The caller's account pays from its credit. The price is held before the call; a call that succeeds keeps the charge, and a failure, a refusal or a timeout returns it. See Priced calls.
- A budget per key. Each API key, including the dedicated key an MCP connection gets when it signs in with OAuth, spends at most its daily budget on prices, $5 a UTC day unless an owner sets another. A call past it is refused with E0010.
- A grant per seller. A key calls another account's priced service only once it holds a grant for it. The first call is refused with E0009, and the refusal carries a link the agent hands to a person, who approves the service once.
To charge for your own tools, set a price on each one and deploy; see Selling.