Pre-indexed code knowledge graph for Claude Code, Cursor, Codex, and OpenCode
When AI assistants explore codebases, they spawn expensive Explore agents that scan files with grep, glob, and Read β consuming tokens on every tool call.
Discovery takes minutes before the assistant can even start analyzing relevant code.
Large codebases require hundreds of API calls and thousands of tokens just to understand basic structure.
CodeGraph builds a pre-indexed knowledge graph of symbol relationships, call graphs, and code structure.
Agents query the graph instantly instead of scanning files β one tool call returns complete context.
100% local processing β no data leaves your machine, no API keys required.
One tool call returns entry points, related symbols, and code snippets β no expensive exploration agents needed.
Find code by name instantly across your entire codebase, powered by FTS5 for lightning-fast results.
Trace callers, callees, and the full impact radius of any symbol before making changes.
File watcher uses native OS events with debounced auto-sync β the graph stays current as you code.
TypeScript, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, C, C++, Swift, Kotlin, Dart, and more.
No data leaves your machine. No API keys. No external services. SQLite database only.
| Codebase | With CodeGraph | Without CodeGraph | Improvement |
|---|---|---|---|
| VS Code Β· TypeScript | 3 calls, 17s | 52 calls, 1m 37s | 94% fewer Β· 82% faster |
| Excalidraw Β· TypeScript | 3 calls, 29s | 47 calls, 1m 45s | 94% fewer Β· 72% faster |
| Claude Code Β· Python + Rust | 3 calls, 39s | 40 calls, 1m 8s | 93% fewer Β· 43% faster |
| Claude Code Β· Java | 1 call, 19s | 26 calls, 1m 22s | 96% fewer Β· 77% faster |
| Alamofire Β· Swift | 3 calls, 22s | 32 calls, 1m 39s | 91% fewer Β· 78% faster |
| Swift Compiler Β· Swift/C++ | 6 calls, 35s | 37 calls, 2m 8s | 84% fewer Β· 73% faster |
CodeGraph detects web-framework routing files and emits route nodes linked to their handlers
tree-sitter parses source code into ASTs. Language-specific queries extract nodes (functions, classes, methods) and edges (calls, imports, extends).
Everything goes into a local SQLite database with FTS5 full-text search for instant symbol lookup.
References are resolved: function calls β definitions, imports β source files, class inheritance, and framework-specific patterns.
File watcher uses native OS events. Changes are debounced and incrementally synced β the graph stays fresh as you code.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Claude Code β
β β
β "Implement user authentication" β
β β β
β βΌ β
β βββββββββββββββββββ βββββββββββββββββββ β
β β Explore Agent β ββββ β Explore Agent β β
β ββββββββββ¬βββββββββ ββββββββββ¬βββββββββ β
β β β β
βββββββββββββΌβββββββββββββββββββββββββΌββββββββββββββββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CodeGraph MCP Server β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Search β β Callers β β Context β β
β β "auth" β β "login()" β β for task β β
β ββββββββ¬βββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ β
β β β β β
β ββββββββββββββββββΌβββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββ β
β β SQLite Graph DB β β
β β β’ 387 symbols β β
β β β’ 1,204 edges β β
β β β’ Instant lookups β β
β βββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Supercharge your AI code assistants in minutes
bash npx @colbymchenry/codegraph
The installer will auto-detect your AI assistants (Claude Code, Cursor, Codex CLI, opencode) and configure them.
Restart your AI assistant (Claude Code / Cursor / Codex CLI / opencode) for the MCP server to load.
bash cd your-project codegraph init -i
Build the per-project knowledge graph index. That's it β your agent will use CodeGraph automatically!
Join thousands of developers who've supercharged their AI assistants with CodeGraph