How Much Does an MCP Server Cost in Tokens?
Nobody shows a count when they warn you that MCP servers drain your context window. So I counted: one tool, ten tools, fifty tools, and the official filesystem server, all measured with the same tokenizer. The drain is real, it is measurable, and it is smaller than the panic suggests — until servers pile up.
Two of the most-read posts about MCP say your servers are silently draining your context window. The claim felt right and unproven at the same time: nobody in either post shows a count. So we built a server with the official SDK, listed its tools the way a host does, and counted the definitions with tiktoken (cl100k). Then we did the same for the official filesystem server, untouched, as a reality check on our own numbers.
The counts
First, a server we built ourselves, with tools modelled on the ones real servers ship: file reading and writing, directory listing, web search, a database query, GitHub issues, a chat message. Same shape, same style of description. We ran it at 1, 10, and 50 tools. Then the official filesystem server, 16 tools, straight from the package.
| Setup | Tools | Tokens | Share of a 200k window | Share of a 1M window |
|---|---|---|---|---|
| One tool | 1 | 101 | 0.05% | 0.01% |
| Small server | 10 | 1,208 | 0.60% | 0.12% |
| Big server | 50 | 6,132 | 3.07% | 0.61% |
| Real filesystem server | 16 | 4,204 | 2.10% | 0.42% |
Real servers cost more than synthetic ones
That gap is the most useful thing in the table. Our synthetic tools averaged 121 to 123 tokens each. The real filesystem server averaged 263. Real servers write longer descriptions and richer schemas than neat test tools, so the synthetic curve understates the real thing by about half. If you take one number from this page, take the real one: roughly 260 tokens per tool, not 120.
Inside the filesystem server, the spread is wide. The fattest tool, edit_file,
costs 408 tokens; the leanest, list_allowed_directories, costs 154 — a
2.6× spread. What makes a tool fat is not a mystery: a long description, several
parameters, and enums or nested objects in the schema. edit_file takes a
path, an array of edits, and a dry-run flag, and its description is a full paragraph
explaining the matching rules. list_allowed_directories takes no parameters
at all and still costs 154 tokens, because the name and description alone have weight.
One formatting detail surprised us: the numbers above count compact JSON, no spaces or newlines. Pretty-printed, the same 16 tools cost 6,010 tokens instead of 4,204, a 43% jump for whitespace alone. Most hosts send compact JSON, but it is worth knowing the formatting is not free.
You pay it on every request
Here is where a small number turns into a real cost. Tool definitions are not sent once per conversation. They go out with every request, attached to each one, for as long as the tools are connected. The window only ever holds one copy at a time, so 4,204 tokens is 2.1% of a 200k window no matter how long the conversation runs. But the meter runs on every copy sent. Twenty turns with the filesystem server connected means 84,080 tokens of tool definitions crossing the wire, just to keep the same 16 tools available. Three servers of that size would be 12,612 tokens per request, 6.3% of a 200k window, before a word of conversation.
Put a price on it and it stays small but stops being nothing. At $1.50 per million input tokens, one current published price, 4,204 tokens is about six-tenths of a cent per request. Twenty turns: about 13 cents. Nobody goes broke on that. The cost that matters is the window share, not the money, because the window is what runs out first in a long task.
What actually helps
The numbers point at three levers, in order of effect.
First, disconnect servers you are not using. A connected server charges rent on every request whether its tools get called or not. This is the entire drain, and it is the only lever that removes it completely.
Second, shorten descriptions. The description is the biggest single chunk of most tools, and it is also the part server authors pad with warnings, examples, and restatements. Cutting a description in half saves roughly a third of that tool's cost. If you maintain a server, this is the cheapest win you have. (Though see our definition split — the description is never the biggest chunk overall.)
Third, split big servers. Fifty tools on one server cost 6,132 tokens in our test, but nobody needs all fifty at once. Two servers of twenty-five, connected only when needed, cost nothing extra to build and let you pay for half the tools at a time.
What does not help: worrying about it at small scale. One or two servers on a 200k or 1M window is a rounding error. The drain becomes worth thinking about around four or five servers, or on a long task where the per-request copies pile up.
Limits, stated plainly
Token counts use cl100k, one tokenizer. Other models count the same text differently, usually within about 10 to 20 percent either way, so treat 4,204 as a measurement on one ruler, not a universal constant. We counted the definitions as the client lists them; a host may wrap them with its own extra fields, which would add a little on top. And we measured definitions only, not the tool results that come back during a task. Those are a separate cost, and usually a bigger one — see our guide on trimming tool results.