MCP server tool definitions can silently inflate AI agent token costs

Connecting several MCP servers to an AI agent adds tens of thousands of overhead tokens to every message, because tool definitions load into the context window whether or not they are called. Measurements of nine popular servers found 38,900 tokens across 116 tools, about 19.4% of a 200k context window. Since language models retain no memory between requests, this overhead is resent and billed at every step of an agent's task, so a ten-step job multiplies the cost. Much of the volume comes from JSON Schema markup rather than useful instructions; in one Notion server example, 93.6% of tokens were schema structure. The article notes that exact figures vary by tokenizer and API provider, though the overall scale of the overhead remains consistent.
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