Dev.to
7/21/2026

I added MCP servers to Claude Code. Here's what they cost in tokens.
Short summary
Every MCP tool registered in Claude Code injects 80–150 tokens of tool definitions into the context window on every turn. The GitHub MCP server alone adds ~62,000 tokens of overhead per 20-turn session, costing ~$0.19 at Sonnet 4 pricing — and in autonomous loops of 2,000 turns, that balloons to ~$18.60 in pure overhead. The author recommends project-scoped MCP configs, fewer tools per server, and tight descriptions to minimize the per-turn tax.
- •MCP tool definitions cost 80–150 tokens per tool per turn, compounding across sessions
- •GitHub MCP server adds ~62K tokens overhead per 20-turn session (~$0.19 at Sonnet 4 pricing)
- •Mitigations: project-scoped configs, fewer focused tools, tight descriptions
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



