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-definition overhead into the context window on every turn, compounding across entire sessions. Measured results show the GitHub MCP server (26 tools) costs ~62,000 tokens per 20-turn session — roughly $0.19 at Sonnet 4 pricing — and scales to ~$18.60 in pure overhead for 2,000-turn autonomous loops. Practical mitigations include project-scoped MCP configs, preferring servers with fewer focused tools, and keeping tool descriptions tight when authoring MCP servers.
- •Each MCP tool adds 80–150 tokens of definition overhead to every turn, not just when used
- •GitHub MCP server costs ~62K tokens per 20-turn session, scaling to ~$18.60 overhead at 2,000 turns
- •Mitigate with project-scoped configs, fewer tools per server, and tight descriptions when authoring MCP servers
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



