DEV Community

Cover image for What Is MCP, and What It Costs Before You Ask Anything

What Is MCP, and What It Costs Before You Ask Anything

Vladimir Beskorovainyi on November 20, 2026

MCP is the standard way to connect an AI assistant to your tools. I counted what my own setup brings into a session: 721 tools from 19 servers, aga...
Collapse
 
aiapikey profile image
HAOHAOnovai •

The 721 versus 58 comparison is the right way to make this visible, and what makes it worse than a one-time context load is that it is a per-turn tax. Tool definitions are resent on every turn, so a 20-turn session pays the tool block twenty times - and the cost scales with how long the conversation runs, not with how many tools you actually call.

Two numbers I would measure alongside the token count.

First, how many of the 721 were called in the last 30 days. The unused tail is not free context, it is context that pays rent every turn and returns nothing. The honest budget is the tools that get used plus the cost of carrying the ones that do not, which is exactly what you delete.

Second, tool-selection accuracy as a function of tool count. There is a count past which the model starts choosing a plausible neighbour instead of the right tool, and that failure looks like a model problem rather than a context problem - so it gets attributed to the wrong cause. With 19 servers it is very likely you have several near-duplicates, since almost every server ships its own search and its own fetch. Those are the ones that cost accuracy rather than tokens.

The switch taking a second while the cost is invisible is the exact shape of this problem: every tool you connect is cheap to add and expensive to audit. A per-server row showing tokens contributed and calls made would make the switch an honest decision instead of a one-way ratchet.

Collapse
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Thanks, both measurements are worth doing. I have not counted calls per tool yet, and I expect most of the 721 were never called. The near-duplicate point matches what I see: several servers ship their own search and fetch. On the per-turn cost, prompt caching softens it, but the window is still occupied on every turn. A per-server row with tokens and calls is exactly what I would want in the client.

Collapse
 
aiapikey profile image
HAOHAOnovai •

Prompt caching is the right caveat and it splits the per-turn tax into two costs that need separate budgets. Caching lowers the price of resending the block; it does not lower the occupancy. So on a tight turn cadence 721 tools are cheap in dollars and expensive in window - and it is the window that binds, because a long-context agent needs that room for content rather than for schemas it will not call.

The second thing caching does not fix is cadence. A cache has a lifetime, so a conversation with a gap in it pays full price for the tool block on the next turn, and conversations with humans in them have gaps. The effective saving is therefore a function of how fast turns arrive, which is not something you control at design time - it is a property of how the thing is used.

Which is the argument for the per-server table living in the client rather than in a post: the numbers depend on your own call pattern and they change month to month as servers get added and removed. A static 721 is the right hook to make people look; a row per server with tokens and calls is the thing that makes them act.

On the uncounted calls - I would guess the distribution is worse than "most were never called". It is usually a small number of tools doing nearly all the work and a body of tools that were enabled for one task once. Those are the ones worth deleting, and they are invisible until you count.

Thread Thread
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Agreed on both. Price and occupancy are separate budgets, and the cache lifetime makes the saving depend on how the tool is used. I will count calls per tool and write up the distribution.

Thread Thread
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Done: 39 of 738 tools called in 30 days, five tools take about half of the calls, and there is a per-server table with tokens and calls. I have not measured selection accuracy yet, that needs its own test set. besk.tech/articles/mcp-tools

Thread Thread
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

@aiapikey I measured the selection accuracy you asked about. 63 tasks with a known right tool, three passes: 53 and 55 right with 738 tools, 53 with 454. In 189 picks the model never took a near-duplicate from another server. What it did take, 19 times, was the shell in place of a connected server. besk.tech/articles/mcp-tool-search

Collapse
 
jacksonxly profile image
Jackson Ly •

In a fresh Claude Code session in an empty folder, /context showed 36.6k tokens before I'd asked anything, and MCP was a small part of it. Three of my servers connected, with 35 tools. Their definitions took 650 tokens up front and server instructions 717, and the other 9.8k is deferred until the model asks for a tool. The descriptions of the 153 custom agents I have installed took 14.7k, more than all 35 tool definitions would if they loaded in full. Skills took 10k.

Collapse
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Thank you, this is the measurement my post lacks. Your 650 tokens for 35 tool names is about 19 per name, which puts my 721 at roughly 13,000 and inside the range I estimated. Your 280 tokens per full definition is well below the average in Anthropic's example, so my upper estimate is probably too high for a typical setup. And the point about agents and skills outweighing MCP is fair: the bill has more lines than the one I counted.

Collapse
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

I ran /context on my setup. Full definitions come to about 534,000 tokens, 724 per tool, so my upper estimate was not too high after all. Skills take 10,000 on my machine against 16,500 for MCP. besk.tech/articles/mcp-tools

Collapse
 
kevinhall profile image
Kevin Hall •

pinning the tools in the server url was the biggest single cut for me, the default sent about a dozen tools and i only needed two or three

Collapse
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Thanks, that is a cleaner cut than hiding tools in the client: the tools are never announced at all. I have not checked which of my 19 servers accept a filter like that. I will, starting with the largest one.

Collapse
 
jsbry profile image
Joshua Bryan •

When you check, also check the filter actually took. Two servers I've audited accept a misspelled tool name without a word: on the Kubernetes MCP server, disabled_tools = ["pods_deleet"] still served all 21 tools, and GitHub's server takes a misspelled --exclude-tools entry silently. So count what tools/list returns after you pin, not just what you asked for. It saves tokens and the occasional surprise delete.

Thread Thread
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Good catch, thank you. A filter that fails silently is worse than no filter, because you stop looking. I will count what tools/list returns after pinning and compare it with what I asked for.

Thread Thread
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

I ran your check on my own client. A deny rule with one letter wrong removed nothing and printed no warning: 280 tools before, 280 after. The correctly spelled one took it to 279. It is in the follow-up: besk.tech/articles/mcp-tools

Thread Thread
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Done, a few days late. Of my 11 servers only GitHub lets you pin tools in the request itself, so I counted what tools/list returned there against what I asked for. No filter: 46. Toolset repos: 19. Toolset reposs: 0, no error. Path /x/reposs: 0, no error. repos plus a misspelled isues: 19, no error. A misspelled name in X-MCP-Tools: HTTP 400. A misspelled name in X-MCP-Exclude-Tools: 46, nothing excluded, no error. So the explicit tool list is strict and everything else fails quietly, and a bad toolset name leaves you with an empty server that looks configured. You were right that the count coming back is the only check. The other ten offer no such filter: none I could find for Google's four, Vercel, Gamma, Obsidian or the docs connector, a single write on/off switch for analytics, and a per-tool toggle inside Canva's own settings.

Collapse
 
aryan_bulandi_4f767baf4a9 profile image
Aryan Bulandi •

265 tools from a single server is quite a lot.
Have you tried disabling just that server to measure how much context space you actually get back?

Collapse
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Not yet. My client defers the full definitions, so that server costs me its 265 tool names on every turn. At about 19 tokens per name, the figure from Jackson's measurement above, that is roughly 5,000 tokens. That is an estimate, not a measurement. I will switch the server off, compare /context before and after, and put the number in the follow-up.

Collapse
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Measured it. Blocking the 280-tool server gave back a few hundred tokens at most, so my 5,000 estimate was far too high. The expensive one turned out to be a server with 21 tools: 8,600 tokens in every conversation. besk.tech/articles/mcp-tools

Collapse
 
aryan_bulandi_4f767baf4a9 profile image
Aryan Bulandi •

Ha, so the tool count was the wrong thing to watch. 280 tools for a few hundred tokens, but 21 tools for 8,600, means the cost comes from how a server is described, not how many tools it has.

What was that 21-tool server putting in there? Were its definitions loading up front instead of being deferred, or was it long server instructions and big nested schemas? If it's the instructions, that's a cost you can't see from the tool list at all, and most people would never think to check it.

Thread Thread
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

@aryan_bulandi_4f767baf4a9 Mostly the first. Five of its 21 tools loaded in full up front instead of being deferred, and those five came to about 8,600 tokens. I did not split that further into description text and schema. Server instructions are the part you cannot see from the tool list, as you say: across all my servers they came to 7.2k, and disconnecting eight servers brought them down to 2.5k. A deny rule leaves them in place. Only a disconnect removes them.

Collapse
 
alexshev profile image
Alex Shev •

The cost should be described as both context tokens and decision surface. Every additional tool competes for attention, increases ambiguity over which action to take, and expands the authorization boundary. Measuring the before-first-call tax is a great start; measuring the error rate as the catalog grows would complete the case.

Collapse
 
vladimir_beskorovainyi profile image
Vladimir Beskorovainyi •

Agreed, and that measurement exists now. I ran 71 tasks three times, 189 scored picks, with 738 tools connected and with 454. The model took a tool from the wrong server 0 times. What it did take 19 times was the shell: 12 of those on GitHub tasks, because the client's own shell description tells it to use gh. So on my setup the competition was not between servers. It was between a server and a built-in that does the same job, and that is where the authorization boundary actually moved. Numbers and method are in the follow-up: besk.tech/articles/mcp-tool-search