GitHub MCP Server Adds 62,000 Tokens of Overhead Per 20-Turn Claude Code Session
MCP servers extend Claude Code's capabilities, but each registered tool injects a definition block into the context window on every session turn, creating compounding token costs. Measurements across three server setups showed that the official GitHub MCP server, with 26 tools, adds roughly 3,100 tokens per turn and approximately 62,000 tokens of overhead across a 20-turn session. For long autonomous agent loops running 2,000 turns, that overhead can reach 6.2 million tokens — costing around $18.60 at Claude Sonnet 4 input pricing before any actual work is counted. Claude Code's session logs stored in ~/.claude/projects/ allow users to inspect per-turn token usage and identify whether tool definitions are inflating costs. Developers are advised to use project-scoped MCP configs and prefer servers with fewer, focused tools to reduce unnecessary overhead.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in