MCP context cost calculator

Free, runs in your browser. Updated .

Every MCP tool an agent can call is described to the model on every request: its name, its description and its input schema. Those definitions use context and cost input tokens whether or not the tool is called. Enter how many servers you connect and how large their tools are, or paste a server’s tools/list response, and the calculator estimates the tokens per request, the share of the context window, and the daily and 30-day cost at the price you enter. Everything runs in your browser and nothing you paste is sent anywhere.

Your MCP setup
Paste a tools/list response below to measure a real server.
Size of each tool definition
Compact is a one-line description with flat arguments; heavy has long notes, enums and nested objects.
Model and usage
Context window
Each model request counts, including tool-call round trips.
Your model’s list price. The default is only an example.
Requests whose tool block is read from the prompt cache.
Measure a real server

Get it from the MCP Inspector or your client's debug log. It stays in this browser tab.

Estimate

Tool definitions per request24,000tokens60 tools across 5 servers12% of a 200k context window176,000 tokens left for instructions, conversation and files
Tokens per day
4,800,000
Cost per day
$14.40
Cost per 30 days
$432.00

Counts tool definitions only, at four characters per token. Your model's tokenizer and client format change the exact number.

How much context common setups use

Tool definitions per request against a 200,000-token window. These are worked examples from the calculator, not measurements of named servers.

SetupToolsTokens per toolTokens per requestShare of window
One small server1 server × 8 tools81501,2000.6%
A typical project5 servers × 12 tools6040024,00012%
Everything switched on15 servers × 20 tools300400120,00060%
Large enterprise servers10 servers × 40 tools4001,000400,000Over 100%

How the estimate works

  1. Tokens per request = servers × tools per server × tokens per tool. A pasted tools/list response is measured tool by tool from each tool's name, description and input schema.
  2. Share of the context window = tokens per request ÷ context window. What is left holds your instructions, the conversation, files and tool results.
  3. Daily cost = tokens per request × requests per day × your input price, blending in the cached price for the share of requests served from the prompt cache. The 30-day figure is 30 times the daily one.
  4. Tokens are counted at four characters each. Output tokens, tool results and the conversation are not included: the calculator isolates what connecting the tools costs.

Questions

How many tokens does an MCP tool definition use?
It depends on the description and the input schema. A tool with a one-line description and two or three flat arguments is often around 150 tokens; one with long usage notes, enums and nested objects can pass 1,000. Paste the server’s tools/list response into the calculator to measure each tool.
Do MCP tools use context even when the agent never calls them?
In clients that send every connected tool with each request, yes: the definitions are part of the input on every turn. Some clients load tool definitions only when they are needed, or let you switch servers off per project; with those, the number per turn is lower than this estimate.
Does prompt caching make tool definitions free?
No, but it can make them much cheaper. When the tool block is unchanged between requests, providers that support prompt caching bill the cached part at a lower rate. It still takes the same room in the context window. Set the cached share and cached price to see the effect.
How accurate is the token estimate?
It is an estimate. The calculator counts four characters per token, the usual rule of thumb for English text and JSON. Each model has its own tokenizer, and clients wrap tools in their own format, so the exact count for your setup can differ in either direction.
How do I reduce the context my MCP tools use?
Connect only the servers a project needs, turn off tools you never call, keep descriptions to what the model needs to choose the tool, and flatten input schemas where you can. If you maintain a server, measure it here before and after a change.

Related