Connecting 8 MCP servers burned 47,800 tokens before our first prompt: measurements and a 91% diet
We measured 8 popular MCP servers (134 tools) with Anthropic's official count_tokens API and Claude Haiku 4.5. Notion alone took 24,441 tokens, all 8 took 47,800. Description compaction saved only 15.6%. An allowlist cut billed input tokens by 81.8% while lifting in-scope accuracy from 10/12 to 12/12; deferred loading cut total input tokens by 91.3% at the cost of a second round-trip.

Attach a handful of MCP servers to a coding agent and tens of thousands of tokens vanish before the user types a single word. The rule of thumb floating around developer threads is "five servers cost about 20K tokens", but few people measure which servers actually cause the bloat, or how far an OpenAI tiktoken estimate drifts from what Claude actually bills.
We launched 8 popular MCP servers over local stdio (GitHub, Playwright, Chrome DevTools, Notion, Filesystem, Memory, Postgres, and Context7) and dumped all 134 live tools/list schemas. We counted tokens with both tiktoken (o200k_base) and Anthropic's official /v1/messages/count_tokens endpoint, then ran 15 developer tasks on claude-haiku-4-5-20251001 across three diet strategies to measure real billed input tokens, latency, and tool-selection accuracy.
The first surprise: tiktoken undercounted actual Claude billing tokens by 36%. On the exact same 134-tool payload, tiktoken reported 35,136 tokens while Anthropic billed 47,800 tokens. Notion MCP alone consumed 24,441 tokens. The second surprise: loading all 134 tools did not improve accuracy. Overlapping browser tools from Playwright and Chrome DevTools caused Claude to pick the wrong tool on 2 of 12 core tasks (10/12), whereas trimming to a 25-tool allowlist cut input tokens by 81.8% and hit 12/12.
Below we break down per-server token weight, compare three diet methods on live Claude calls, compute 20-turn session costs, and share drop-in code for both allowlist filtering and deferred tool loading.
Measuring 8 live MCP servers: Notion alone took half the budget
Each server was started via npx -y and queried with initialize followed by tools/list. No external writes occurred and all 8 servers responded cleanly.

| MCP server | Tools | Raw MCP JSON (o200k) | API payload (o200k) | Official Claude tokens | Claude tokens / tool |
|---|---|---|---|---|---|
| Notion (@notionhq/notion-mcp-server) | 24 | 17,500 | 17,163 | 24,441 | 1,018 |
| Chrome DevTools (chrome-devtools-mcp) | 33 | 7,173 | 6,753 | 9,118 | 276 |
| Playwright (@playwright/mcp) | 25 | 4,589 | 3,940 | 5,614 | 225 |
| GitHub (@modelcontextprotocol/server-github) | 26 | 3,548 | 3,548 | 5,385 | 207 |
| Filesystem (@modelcontextprotocol/server-filesystem) | 14 | 2,879 | 1,693 | 2,642 | 189 |
| Memory (@modelcontextprotocol/server-memory) | 9 | 2,448 | 957 | 1,770 | 197 |
| Context7 (@upstash/context7-mcp) | 2 | 1,131 | 1,064 | 1,759 | 880 |
| Postgres (@modelcontextprotocol/server-postgres) | 1 | 32 | 32 | 543 | 543 |
| All 8 combined | 134 | 39,286 | 35,136 | 47,800 | 357 |
Official Claude token counts subtract the 8-token empty-message baseline. The sum of individual servers (51,272) exceeds the combined total (47,800) because Anthropic injects a fixed ~500-token tool-use system wrapper once whenever tools is non-empty — which is also why the 1-tool Postgres server (32 raw tokens) costs 543 Claude tokens on its own.
Three patterns stand out:
- Notion alone costs 24,441 tokens. It has fewer tools (24) than GitHub (26) or Playwright (25), yet consumes more than four times the tokens because its OpenAPI-generated schemas embed huge nested block and property definitions (1,018 tokens per tool).
- Low tool count does not guarantee a light schema. Context7 exposes only 2 tools, yet costs 1,759 Claude tokens (880 per tool), matching the 9-tool Memory server.
- Unfiltered MCP metadata leaks another 4,150 tokens. Stripping MCP-only fields (
outputSchemaandannotations) before sending tools to the model cut Filesystem from 2,879 to 1,693 tokens (-41%) and Memory from 2,448 to 957 (-61%).
Even without Notion, the remaining 7 servers (110 tools) still consume roughly 23,360 Claude tokens on every turn.
Three diet strategies: compacting descriptions only saves 15.6%
We applied three reductions to the exact same 134 tools and re-measured with Anthropic's count_tokens API:
| Strategy | Resident tools | Official Claude tokens | Reduction vs baseline |
|---|---|---|---|
| Baseline (all tools) | 134 | 47,800 | — |
| Method 3 — Description & metadata compaction | 134 | 40,329 | -15.6% |
| Method 1 — Allowlist scoping | 25 | 8,653 | -81.9% |
| Method 2 — Deferred loading (2 meta-tools + name index) | 2 | 1,379 | -97.1% |
Truncating every tool description to 80 characters, trimming parameter descriptions to 60 characters, and removing $schema/additionalProperties saved only 15.6% (47,800 down to 40,329). When auto-generated nested JSON schemas like Notion dominate the payload, shortening prose barely moves the needle. Cutting 80% or more requires reducing the number of resident schemas via an allowlist (-81.9%) or deferred loading (-97.1%).
Live 15-task test on Claude Haiku 4.5: fewer tools improved accuracy
Token savings mean nothing if the model picks the wrong tool. We built 15 realistic developer tasks spanning all 8 servers and ran them on claude-haiku-4-5-20251001 at temperature 0. Twelve tasks fell inside the 25-tool allowlist; three deliberately fell outside it (Lighthouse audit, PR merge, Notion comment) to measure the coverage tradeoff honestly.

| Condition | Avg billed input tokens | Total input tokens (15 tasks) | In-allowlist accuracy (12) | Out-of-allowlist accuracy (3) | Overall accuracy (15) | Avg latency | Avg turns |
|---|---|---|---|---|---|---|---|
| Baseline (134 tools) | 47,860 | 717,902 | 10 / 12 | 2 / 3 | 12 / 15 | 1.41 s | 1.0 |
| Allowlist (25 tools) | 8,713 (-81.8%) | 130,697 | 12 / 12 | 0 / 3 | 12 / 15 | 1.60 s | 1.0 |
| Deferred loading | 4,156 (-91.3%) | 62,346 | 10 / 12 | 2 / 3 | 12 / 15 | 2.78 s | 1.8 |
All three scored 12/15 overall, but they failed for completely different reasons:
- Baseline failed from tool collision. Asked to take a Playwright accessibility snapshot (T05), Claude called Chrome DevTools'
take_snapshotinstead ofbrowser_snapshot. On console messages (T06) and Lighthouse audit (T13), it calledlist_pagesfirst among the 33 Chrome DevTools tools. Paying 47,860 tokens per turn actively introduced cross-server interference. - Allowlist hit 12/12 on in-scope tasks. Removing overlapping and unused tools eliminated the T05 and T06 collisions while cutting total billed input tokens from 717,902 to 130,697 (-81.8%). On the 3 out-of-allowlist tasks (T13–T15), Claude cleanly declined (
None) instead of hallucinating a wrong tool. - Deferred loading cut total billed input tokens by 91.3% including the second turn. Starting from a 1,379-token index, fetching up to 5 candidate schemas via
search_tools, and invokingcall_toolaveraged 4,156 input tokens per task across 1.8 turns. It also solved 2 of the 3 out-of-allowlist tasks (merge_pull_requestandAPI-create-a-comment). The tradeoff is latency — averaging 2.78 s vs 1.41 s — plus 3 misses (T06, T11, T13) where simple keyword search missed the right schema or the model skipped lookup.
What a 20-turn coding session actually costs
Tool definitions repeat on every turn. Using Claude Sonnet 4.5 pricing ($3.00/M input, $3.75/M cache write, $0.30/M cache read), here is the cost of empty tool definitions alone across a 20-turn session:
| Strategy | Schema tokens / turn | 20-turn total tokens | No cache (per session) | Cached (per session) | 100 sessions / mo (miss / hit) |
|---|---|---|---|---|---|
| Baseline (134 tools) | 47,800 | 956,000 | $2.87 | $0.45 | $287 / $45 |
| Compacted (134 tools) | 40,329 | 806,580 | $2.42 | $0.38 | $242 / $38 |
| Allowlist (25 tools) | 8,653 | 173,060 | $0.52 | $0.08 | $52 / $8 |
| Deferred index (2 meta) | 1,379 | 27,580 | $0.08 | $0.01 | $8 / $1 |
Even with perfect prompt caching, the baseline burns $45/month per 100 sessions on zero user content. And whenever the cache misses — after a 5-minute idle gap, a dynamic tool change, or context trimming — the bill jumps to $2.87 per session ($287/month).
Drop-in implementation patterns
Step 1: Strip MCP metadata and enforce an allowlist
Filtering out outputSchema/annotations and keeping only the tools your workflow actually uses cut input tokens by 81.8% and raised in-scope accuracy to 12/12 with zero extra latency:
ALLOWLIST = {
"get_file_contents", "create_or_update_file", "create_pull_request", "list_issues",
"browser_navigate", "browser_snapshot", "browser_click", "browser_type",
"read_file", "write_file", "edit_file", "list_directory",
"query", "API-post-search", "API-retrieve-a-page",
}
def to_lean_anthropic_tools(mcp_tools: list[dict], allow: set[str]) -> list[dict]:
lean = []
for t in mcp_tools:
if t["name"] not in allow:
continue
lean.append({
"name": t["name"],
"description": t.get("description", ""),
"input_schema": t.get("inputSchema", {"type": "object", "properties": {}}),
})
return leanStep 2: Use deferred tool loading once you pass ~30 tools
For general-purpose agents that cannot hard-code an allowlist, keep only two meta-tools resident. Prefixing each name with its server (server.tool_name) avoids the keyword collisions we saw in our smoke test:
def build_deferred_tools(all_mcp_tools: list[dict]) -> list[dict]:
index = ", ".join(f"{t['_server']}.{t['name']}" for t in all_mcp_tools)
return [
{
"name": "search_tools",
"description": f"Load full JSON schemas by keyword. Available: {index}",
"input_schema": {
"type": "object",
"properties": {"query": {"type": "string"}},
"required": ["query"],
},
},
{
"name": "call_tool",
"description": "Call a loaded tool by exact name and JSON arguments.",
"input_schema": {
"type": "object",
"properties": {
"name": {"type": "string"},
"arguments": {"type": "object"},
},
"required": ["name", "arguments"],
},
},
]What we would ship in production
- Measure with your provider's real tokenizer first.
tiktokenundercounted Claude's tool tokens by 36%. Run Anthropic's free/v1/messages/count_tokensper server — one or two servers (like Notion or Chrome DevTools) usually account for over 70% of the bill. - Default to an allowlist for focused coding and ops agents. It kept single-turn latency (1.60 s), cut billed input tokens by 81.8%, and eliminated cross-server tool collisions (12/12). Avoid mounting overlapping servers like Playwright and Chrome DevTools in the same session.
- Use a hybrid allowlist + deferred loader for general agents. Keep your top 5–10 daily tools resident for 1-turn speed, and push the remaining 100+ long-tail tools behind
search_toolsto capture the 91% token savings without giving up coverage. - Do not rely on description trimming alone. Against OpenAPI-generated schemas, shortening prose only recovered 15.6%. Either drop unused tools or wrap verbose APIs behind a single thin CLI tool (
gh,psql, or a custom endpoint).