Codebase graph servers: MCP for AI agents, genuine breakthrough or just middleware?

Article · 3 min read
🇫🇷 This article is also available in Français

A large share of codebases today are driven, in great part if not entirely, by agents.

To explore and navigate those codebases, agents reach for native bash commands like grep. It works. It’s battle-tested. But it’s noisy: plenty of lines get read for nothing, and some occurrences still slip through.

Code graph MCP servers emerged as an answer to that. The idea: index the entire codebase, build a graph of symbols (variable names, functions, classes), and let an agent query that graph through an MCP server instead of grepping in the dark.

Useful in theory. The question that remains is “for whom, when, and for how much longer?”.

What code graph MCP servers actually do

An indexing tool parses the codebase with a syntax parser to extract symbols and their relationships: calls, references, imports, and inheritance chains show up as links between objects or files. When an agent needs to track down every call to a given function, it gets a clean, structured response in a handful of tokens, and nothing gets missed.

Plenty of implementations exist, with varying degrees of maturity. colbymchenry/codegraph is currently the most popular and the most complete (stable, actively maintained, with a real community behind it). All of them share the same underlying principle: relationships between symbols are pre-computed by a parser, not statistically inferred by an LLM.

Before making it a reflex

The performance of these tools may be established, but the question remains: does the gain justify the complexity of setup and upkeep?

The answer is nuanced. In 2026, recent models have context windows of a million tokens and more — a small codebase could almost fit inside one entirely. But that’s not necessarily a good approach. The “lost in the middle” effect, even reduced by recent models, is documented (arXiv:2503.00353). The better move is to select the right files before opening the context: an agent that first loads the directory tree, identifies the relevant modules, then loads only those files covers 90% of the codebases that exist today, with no setup, no watcher, no MCP server to maintain.

The setup cost is real: initial indexing takes several minutes on a large project, the watcher needs to stay alive, the MCP server needs configuring for every tool the team uses. A pip install doesn’t cut it. This is an infrastructure dependency.

The graph earns its place when the codebase gets very large, with dependencies entangled across multiple layers of abstraction.

What NeurIPS 2025 points toward

Current codebase graphers are middleware: external adapters that compensate for something LLMs don’t do natively.

That might change. A poster at NeurIPS 2025 points to a different possibility: integrating the code graph directly into the LLM’s attention mechanism via an adapter. No external RAG, no agent making MCP requests. The graph becomes a native input to the model. Early benchmarks are encouraging; more detail in the Code Graph Model (CGM) paper.


So, what’s the move? There’s no quantitative study today that directly links codebase size to how much these tools actually help. And there’s no reliable way to estimate the setup cost for your specific project either.

Here’s my take: if you can get by without it, do. Keep an eye on how these tools evolve, and if the need becomes real, be ready to set one up — unless something better has already replaced them by then.

← Back to articles