MCP servers can consume a large share of an AI agent's context window before any work begins

MCP servers send every tool's name, description, and JSON Schema to the model before a task starts, so the cost is paid whether or not the tools are used. A developer reported 28,400 input tokens on a first request triggered by a simple "Run tests" prompt, which they traced to seven MCP servers. In a measured setup, four common MCP servers added about 11,923 tokens of tool definitions, while a narrowly scoped Apidog CLI skill added only 112 tokens at session start. The author notes that tool count and schema depth drive the cost, and that CLI tools load their details only when the agent invokes them. The figures came from a single developer's measurement using a tokenizer that differs from those of Claude and Gemini, so exact numbers will vary, though the relative gap holds.
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