CodeGraph builds a local knowledge graph of a codebase (every symbol, call edge, and dependency) and serves it to AI coding agents over MCP, so an agent answers a structural question from the graph instead of discovering structure with grep, glob, and file reads one at a time. One query returns the relevant symbols as verbatim source grouped by file, the call paths between them (including dynamic-dispatch hops that text search cannot follow), and the blast radius of a change.
Parsing runs in a native Rust kernel with tree-sitter grammars compiled in for 20 languages, with per-file fallback to a reference engine for the remaining languages. Extracted nodes (functions, classes, methods) and edges (calls, imports, extends, implements) go into a local SQLite database with FTS5 full-text search, after which references are resolved: calls to definitions, imports to source files, class inheritance, and framework-specific patterns. Worker pools and caches are sized from the machine, container-aware, so a 2-core VPS indexes the Linux kernel (70k files, 2M symbols) in under 12 minutes and a workstation fresh-indexes the Swift compiler repository (27k files) in about 100 seconds.
The index stays current without manual syncing: a native OS file watcher re-indexes changed source files after a debounce window, MCP responses that would reference a still-pending file carry a staleness banner, and the server reconciles the index against the working tree on every reconnect. Nothing leaves the machine: no API keys, no external services, SQLite only. Anonymous aggregated usage statistics can be sent and switched off.
As an MCP server it exposes a single listed tool, codegraph_explore, which answers "how does X work", flow, and area-survey questions in one call. Narrower tools (node, search, callers, callees, impact, files, status) stay callable but unlisted, and a project path argument lets one server query any indexed project in a monorepo or a second repository. An interactive installer wires the server into Claude Code, Cursor, Codex CLI, OpenCode, Hermes Agent, Gemini CLI, Antigravity IDE, Kiro, and GitHub Copilot in VS Code, the Copilot CLI, and JetBrains IDEs. A CLI and a library interface cover scripted use, including an affected-symbols command.
Benchmarks across seven open-source repositories (VS Code, Excalidraw, Django, Tokio, OkHttp, Gin, Alamofire) compare a headless Claude Code run answering one architecture question with and without the graph, at the median of four runs, with the CodeGraph CLI blocked in both arms. Reported averages are 88% fewer tool calls, 53% faster, 62% fewer tokens, 44% lower cost, and zero file reads on every repo. The same measurement notes that CodeGraph responses leave about 80% more retrieval context resident in the window at the end of a multi-turn session. Cross-file dependency coverage is measured per language on a benchmark repo, ranging from 73.8% (Liquid) to 100% (Python, PHP, Ruby, Svelte).
Features
- Single explore tool: codegraph_explore returns verbatim source grouped by file, the call paths between symbols, and a blast-radius summary in one MCP call, with narrower tools available but unlisted
- Native Rust kernel: tree-sitter parsing compiled in for 20 languages with one boundary crossing per file, verified against the reference engine and falling back per file
- Machine-aware scaling: worker pools and analysis caches sized from container-aware core counts and measured available RAM, from a 2-core VPS to a workstation
- Auto-sync: native FSEvents, inotify, or ReadDirectoryChangesW watcher with debounced incremental re-indexing, per-file staleness banners, and connect-time reconciliation
- Impact analysis: callers, callees, and the full impact radius of any symbol, including dynamic-dispatch hops that grep cannot follow
- Full-text search: symbol lookup by name across the codebase through SQLite FTS5
- Language support: TypeScript, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, C, C++, CUDA, Objective-C, Swift, Kotlin, Scala, Dart, Lua, R, Nix, Erlang, COBOL, Solidity, Terraform, Svelte, Vue, Astro, Liquid, Pascal, and more
- Framework-aware routes: route nodes linked to handler functions for 17 web frameworks (Django, Flask, FastAPI, Express, NestJS, Laravel, Rails, Spring, and others), plus navigates edges for Expo Router, Next.js, React Router, Vue Router, SvelteKit, and Angular
- Mixed-stack bridging: Swift to Objective-C bridging, React Native legacy bridge, TurboModules and Fabric components, native-to-JS event emitters, and Expo Modules resolved as cross-language edges
- Agent installer: detects and configures Claude Code, Cursor, Codex CLI, OpenCode, Hermes Agent, Gemini CLI, Antigravity IDE, Kiro, and GitHub Copilot
- Fully local: no API keys, no external services, a SQLite database per project, with anonymous aggregated usage statistics that can be turned off
- CLI and library: status, sync, affected-symbols and query commands for scripting, and a programmatic interface for use outside an agent session

