Stop paying 100x more tokens for code exploration. A knowledge graph MCP server that gives AI coding assistants precise structural answers in a single query.
Works with Claude Code, Codex CLI, Cursor, Windsurf, Gemini CLI, VS Code, and Zed. Also has a CLI mode for direct terminal use.
AI coding assistants explore codebases by reading files one at a time. Every structural question triggers a cascade of grep → read file → grep again → read more files.
Five structural questions about a real codebase: ~412,000 tokens via file-by-file search. ~3,400 tokens via knowledge graph queries.
The 120x reduction isn't about fitting in the context window. It's about cost ($3-15/M tokens adds up), latency (<1ms vs seconds), and accuracy (less noise = better answers, no "lost in the middle" problem).
| Question Type | Graph | File-by-file | Savings |
|---|---|---|---|
| Find function by pattern | ~200 | ~45,000 | 225x |
| Trace call chain (depth 3) | ~800 | ~120,000 | 150x |
| Dead code detection | ~500 | ~85,000 | 170x |
| List all routes | ~400 | ~62,000 | 155x |
| Architecture overview | ~1,500 | ~100,000 | 67x |
| Total | ~3,400 | ~412,000 | 121x |
Tested across 31 languages with agent-vs-agent methodology (372 questions). MCP achieves 90% of Explorer quality at 20-100x lower per-query cost. Full benchmark report →
Python, Go, JS, TS, TSX, Rust, Java, C++, C#, C, PHP, Ruby, Kotlin, Scala, Zig, Elixir, Haskell, OCaml, Swift, Dart, and 39 more via vendored tree-sitter grammars.
Trace callers and callees across files and packages. Import-aware, type-inferred resolution. BFS traversal up to depth 5.
Find functions with zero callers, with smart filtering that excludes entry points (route handlers, main(), framework decorators).
Discovers REST routes and matches them to HTTP call sites across services with confidence scoring.
Background polling detects file changes and triggers incremental re-indexing. No manual reindex needed.
Ad-hoc graph exploration with a Cypher-like query language: MATCH, WHERE, RETURN, ORDER BY, LIMIT.
Languages, packages, entry points, routes, hotspots, boundaries, and hidden modules via Louvain community detection.
Map uncommitted changes to affected symbols + blast radius with CRITICAL/HIGH/MEDIUM/LOW risk classification.
search_graph, trace_call_path, detect_changes, query_graph, get_architecture, manage_adr, and 6 more.
| Feature | codebase-memory-mcp | GitNexus |
|---|---|---|
| Languages | 59 | 8-11 |
| Runtime | Single Go binary | Node.js (npx) |
| Runtime dependency | None | Node.js |
| Embedded LLM | No (uses your MCP client) | Yes (extra API key + cost) |
| Published benchmarks | Yes (31 langs, 372 questions) | No |
| Auto-sync | Yes | No |
| MCP tools | 12 | 7 |
| Cross-service HTTP linking | Yes | No |
| Cypher queries | Yes | No |
| Visual web UI | No | Yes |
| Graph RAG chat | No | Yes |
GitNexus is a visual dashboard — great for interactive exploration. codebase-memory-mcp is production tooling — the most comprehensive, zero-dependency backend for AI coding assistants.