MCP retrieval tools cut tokens 86% on large repos but cost 4x more on small ones
A developer ran a weekend experiment comparing MCP retrieval tools against traditional grep-based search across two code repositories of different sizes. On a 33-file TypeScript repository, MCP tools consumed 4.1 times more tokens than grep, while on a 249-file Python and TypeScript repo, they delivered an 86% token reduction. The test used the same AI model and identical tasks across 32 agent runs, with token counts pulled directly from provider responses. The experiment was inspired by the CodeNib research paper, which claimed context-aware retrieval policies could reduce agent trajectory tokens by 50–87%, though the author noted those figures reflect per-model best-case results rather than a single consistent outcome. The findings suggest that MCP-style retrieval tools offer meaningful efficiency gains only beyond a certain repository size threshold.
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