Every MCP server you connect injects its full tool schemas into the prefix of every single request — before you have typed a word. This calculator turns that invisible tax into numbers: total fixed overhead, how much working context is actually left, how many turns you get before auto-compact fires, and a ranked list of which servers to disable for the biggest gain.
/context to read yours.wc -c CLAUDE.md. Prose, so divided by 4.Tick the servers you have enabled. Tool counts and token totals below are approximate typical values that vary a lot by version and enabled toolsets — every cell is editable, and pasting a real tools/list response gives exact numbers.
A config file lists server names only — it contains no schemas. Recognised names are matched to the library; anything unknown is added with a placeholder estimate you should correct.
Exact mode. Each tool costs ceil((len(name)+len(description)+len(JSON(inputSchema)))/k) tokens. Also accepts a bare {"tools":[...]} object, a bare array, or a map of server name to tools.
| On | Server | Tools | Tokens (Ts) | Tokens / tool |
|---|
| Server | Tokens re-sent / turn | Tokens / tool | Share of window | Turns gained if disabled |
|---|
An MCP tool is not free the moment you call it — it is charged the moment it is available. Tool definitions live in the request prefix, so the full JSON schema of every tool on every connected server is serialised into every API call for the entire session. Twenty servers you never invoke still cost you the same tokens as twenty servers you use constantly.
Each tool definition is a name, a natural-language description, and a JSON Schema for its arguments. Its serialised length in characters, divided by the tokenizer's characters-per-token ratio, gives the token cost:
tokens(tool) = ceil( ( len(name) + len(description) + len(JSON(inputSchema)) ) / k )The default k = 3.6 reflects that JSON is denser than prose: braces, quotes, colons and repeated keys such as "type" and "properties" break into many short tokens, so a schema yields more tokens per character than English text, which sits nearer 4 characters per token for Claude's tokenizer. That is why CLAUDE.md is divided by 4 here while schemas are divided by 3.6. Both are estimates — the only exact figure comes from Anthropic's token counting endpoint, or from running /context inside Claude Code, which prints the real live breakdown.
F is fixed overhead: it is present before the first user message and it never shrinks during the session. Two numbers follow immediately:
Claude Code watches how full the transcript is and triggers auto-compact as it approaches the ceiling — the threshold here defaults to 92 percent of the window and is adjustable, because the exact trip point moves between releases. Conversation grows by roughly a constant a tokens per turn (your message, the reply, and any tool results), so compaction happens on the first turn where:
Because F sits in the numerator, every token of tool schema is a token stolen directly from your turn budget. Disabling a server with T_s tokens hands those tokens back, and the turns you regain are approximately T_s / a — the payoff table computes the exact integer difference by re-solving the equation with and without each server.
This is the number that actually hurts. Every compaction is a summarisation pass that discards detail, loses file contents you had already loaded, and frequently makes the model repeat work it has already done. Cutting fixed overhead is the cheapest way to reduce it: it costs nothing but a config edit.
T_s is what you actually pay. A 90-tool server dwarfs everything else even with modest per-tool cost, which is why the largest integrations ship toolset flags — enabling only the toolsets you need is usually a bigger win than dropping the server.Verify against reality: run /context in Claude Code for the live breakdown, and use each server's own tools/list output in the exact mode above rather than the library estimates.
Context Window Visualizer MCP Server Config Validator Token Counter Session Cost Tracker CLAUDE.md Linter