MCP servers are the hot new plumbing for Claude Code. Drop in a GitHub server and your agent can open pull requests. Add a filesystem server and it reads your repo structure. The demos look magical. What nobody demos is the receipt.

The cost is not in the API calls the tools make. It is in the tools themselves.

Every time you register an MCP server, you are not just adding a capability. You are adding a block of text to your context window, and that block gets billed on every single turn. Whether the agent uses the tool or not, you pay for its existence. The meter starts running the moment the server connects.

Paying Rent on Tools You Never Touch

Here is the mechanic that gets glossed over. Each tool definition in an MCP server ships with a name, a description, and a JSON schema telling the model what arguments the tool expects. That entire payload gets injected into the system context at the start of every turn. The model needs to see the full catalog so it can decide whether to call a tool, but you are the one footing the bill for that visibility.

The overhead per tool is not trivial. In practice, a single tool definition consumes between 80 and 150 tokens. That means a modest server exposing ten tools quietly eats 800 to 1,500 tokens before you have typed a single sentence. You are not paying for compute. You are paying for the privilege of having the option.

I ran the numbers across a standard 20-turn session to see exactly how this compounds.

With no MCP servers loaded, the overhead is zero. The context window contains only your conversation.

Load a custom minimal server with three tightly scoped tools, and the tax is 180 tokens per turn. Across 20 turns, that is 3,600 tokens gone. Not a disaster, but real money.

The popular filesystem server, which exposes seven tools, pushes that to 640 tokens per turn. Over the same session, you have burned 12,800 tokens just maintaining the connection. You have not read a file yet. You have not listed a directory. You have merely kept the server on the menu.

Then there is the GitHub server. With 26 tools registered, it dumps 3,100 tokens into every turn. After 20 back-and-forth messages, the overhead totals 62,000 tokens. At Sonnet 4 pricing, that is $0.19 in pure context tax. You paid nineteen cents for overhead before the agent even considered creating an issue.

That figure feels small in isolation. It is not.

The Overnight Agent Problem

Where this stings is in long-running autonomous loops. If you are using Claude Code as an agent that iterates on its own, that per-turn tax multiplies brutally. An agent running overnight across 2,000 turns with the GitHub server loaded does not pay 62,000 tokens in overhead. It pays 6.2 million.

That is $18.60 spent on literally nothing productive. The agent might have slept through the night without touching a single GitHub tool. It might have worked entirely inside local files. You still get charged for all 26 GitHub tool definitions on every one of those 2,000 turns because they were registered in the session.

The critical point to internalize is that you pay for registered tools, not called tools. The model does not check which tools it actually uses and then discount your bill. If the server is connected, its full manifest is re-introduced into context each cycle. This is a per-turn tax on potential, not on action.

For developers running iterative coding agents, test harnesses, or batch review jobs, this is a silent budget killer. A human conversation of 20 turns is light. An agentic loop of 200 or 2,000 turns is where the math turns punitive.

How to Keep Costs Under Control

MCP is genuinely useful. You should use it. But treat it like a utility you switch on for the job at hand, not a permanent fixture you bolt onto every session.

Scope Configs to the Project and Task

Do not load every server into your global Claude Code configuration by default. Build project-scoped MCP configs that match the work you are actually doing. If you are refactoring a local module, you probably need the filesystem server and nothing else. If you are triaging issues, load the GitHub server for that specific task and disconnect it when you switch back to local development.

Think of it like leaving apps open on your phone. One or two is fine. Twenty running in the background drains the battery for no reason.

Prefer Servers with Fewer Tools

Tous les serveurs MCP ne sont pas conçus avec la même rigueur. Certains proposent une interface épurée de deux ou trois actions ciblées. D'autres livrent un catalogue tentaculaire de 25 ou 30 outils, dont beaucoup vous ne les invoquerez jamais. Un serveur avec trois outils peut vous coûter 180 tokens par tour. Un autre avec 26 outils peut en coûter 3 100. Cela représente un surcoût 17 fois plus élevé pour un écart de capacité qui n'a peut-être aucune importance pour vous.

Avant d'installer un serveur, examinez son manifeste d'outils. S'il enregistre une douzaine d'opérations redondantes et que vous n'en avez besoin que d'une seule, voyez s'il est possible de le configurer de manière plus restreinte, de le forker ou d'écrire un wrapper plus léger. Chaque définition d'outil que vous pouvez supprimer constitue une économie de tokens directe et permanente à chaque tour futur.

Allégez les descriptions d'outils

La plage de 80 à 150 tokens par outil n'est pas une loi de la nature. Elle dépend de la verbosité des descriptions et des schémas. Une description gonflée de 400 tokens consomme cinq fois plus de contexte qu'une description de 80 tokens, et cette pénalité quintuplée s'applique à chaque tour.

Auditez les serveurs sur lesquels vous vous appuyez. Si la description d'un outil ressemble à un texte marketing, réécrivez-la. Supprimez les adjectifs. Supprimez les exemples qui ne clarifient pas le schéma. Resserrez le JSON. Le modèle doit comprendre ce que fait l'outil, mais il n'a pas besoin d'un paragraphe de préambule. Traitez les définitions d'outils comme du code : plus elles sont courtes et claires, mieux c'est.

Ce qu'il faut retenir

MCP étend la portée de Claude Code. Il n'étend pas votre fenêtre de contexte gratuitement. Le surcoût est déterministe, récurrent et totalement déconnecté de l'utilisation effective des outils.

Ne chargez que les serveurs que votre tâche actuelle exige. Déconnectez-les une fois terminé. Auditez le nombre d'outils et la longueur des descriptions comme vous le feriez pour n'importe quelle autre dépendance. La règle est simple : si l'outil n'apporte pas de valeur dans cette session spécifique, il ne devrait pas ajouter de tokens à votre facture.

Mesures et méthodologie de la source : J'ai ajouté des serveurs MCP à Claude Code — voici ce qu'ils coûtent en tokens

Rejoignez la communauté d'apprentissage IA de GyaanSetu pour plus d'analyses techniques : t.me/GyaanSetuAi