Maximum Context

Maximum Context is a Go-based MCP (Model Context Protocol) server that gives AI coding assistants deep, always-current awareness of a codebase. It indexes a project's structure, symbols, dependencies, and architecture, then exposes that knowledge through a focused, decisive MCP tool interface.
Why max-context
AI coding agents waste 30–60% of their context window grepping and re-reading files to figure out where things are. max-context pre-computes that understanding and serves it on demand.
- Always current — file changes reflected in < 2 seconds via OS-native watchers
- No LLM at index time — deterministic tree-sitter parsing; no API keys, no token spend on indexing
- Minimal surface, no breaking changes — a small set of focused MCP tools, stable schema
See BENCHMARK.md for per-tool-call token savings vs naive and skilled Grep+Read baselines, measured over the same file set the index covers. The most robust result is 32–47× fewer tokens on "where is X defined?" across four repos in three languages (max-context, cobra, flask, zod) — that band holds because a lookup costs ~300–470 tokens whatever the repo, while grep grows with it. Blended per-repo figures range from 11× to 94×, but they are dominated by question mix and by how greppable a given symbol is, so BENCHMARK.md reports per category and explains which number to quote. Both sides are measured by running them: real greps for the baselines, real tool calls for max-context.
For agent-session quality and cost — does an LLM actually do better with these tools? — see the causal A/B in experiments/eval/benchmarks/in-house/FINDINGS.md (same model, same tasks, only the toolset differs; blind different-model judge; pre-registered). On the tasks measured so far it finds equal answer quality to a skilled grep agent, at materially lower cost — up to 94% fewer tokens (≈90% in aggregate) on call-graph / "what-calls-this" questions — plus a structural edge on aliased imports (from m import f as g; g()), where text search can't connect the call site to the definition and max-context can. Honest scope: small sample (1 repo family, 1 replicate); quality is a tie, not a win, except the alias case.
How it works
┌─────────────────────────────────┐
│ max-context binary │
┌─────────────┐ fsnotify │ ┌─────────────────────────┐ │
│ Codebase │───────────────┼─▶ │ tree-sitter parser │ │
└─────────────┘ │ └────────────┬────────────┘ │
│ ▼ │
│ ┌─────────────────────────┐ │
│ │SQLite FTS5 + call graph │ │
│ └────────────┬────────────┘ │
┌─────────────┐ │ ▼ │
│ AI CLI / IDE│ stdio MCP │ ┌─────────────────────────┐ │
└─────────────┘◀──────────────┼───│ MCP server · 5 tools │ │
│ └─────────────────────────┘ │
└─────────────────────────────────┘
Tree-sitter parses every supported language deterministically. Symbols and call edges land in a SQLite database with FTS5 indexes on function/type names. Recursive CTEs power call-chain and impact queries. No LLM is involved at index time — the host CLI's model does all the reasoning, with max-context feeding it pre-computed structure.
Features