Verified project record
colbymchenry/codegraph
CodeGraph builds a local, per-project knowledge graph of symbols, call edges, and dependencies and exposes it to AI coding agents via an MCP server, so agents can retrieve exact code, call paths, and impact radius in one tool call instead of file-by-file searching. It auto-syncs the index on file changes to keep it current.
Project overview
Benchmarks across 7 codebases report 88% fewer tool calls, 53% faster runs, 62% fewer tokens, and 44% lower cost when agents query the graph instead of exploring with grep/glob/Read.
- Project type
- MCP · AI Coding · AI Search
- Use cases
- Coding & Development
- Deployment
- Refer to project documentation
- License
- MIT
Best for
- Developers and AI engineers who use MCP-capable coding agents and want the agent to answer structural questions about a codebase in a single tool call rather than repeated grep/glob/Read cycles.
- Teams on modest hardware, including 2-core VPS machines, since the indexer adapts worker pools and caches to available cores and RAM.
- Projects needing regression scoping after edits, using `codegraph affected` to trace affected test files from changed sources.
Key capabilities
- `codegraph init` builds a full graph of symbols, call edges, and dependencies per project into a local .codegraph/ directory.
- Watches the project and updates the graph on every file change so the index is never stale.
- `codegraph install` wires the CodeGraph MCP server into Claude Code, Cursor, Codex, Gemini, Copilot, and other agents.
- One tool call returns entry points, related symbols, and code snippets instead of file-by-file exploration.
- Instant code search by name across the codebase powered by FTS5.
- `codegraph affected` traces import dependencies transitively to find test files affected by changed source files.
- The npm package re-exports a programmatic CodeGraph class for embedding in apps such as an Electron main process.
Limitations and risks
- CodeGraph only helps when the agent queries it directly; sub-agents that read files instead of using the graph turn the index into pure overhead.
- Setup requires shell installation and CLI commands plus an agent restart, which excludes users who cannot or will not use a terminal.
- GPU needs, telemetry behavior, and a full end-to-end local data boundary are not documented, so no conclusions are drawn about them; benchmark figures come from the project's own 7-codebase benchmark.
Getting started
- Install the CLI via the install script or npm, run `codegraph install` to wire the MCP server into your agents, run `codegraph init` inside the project, then restart the agent. Setup is rated medium difficulty because it requires terminal commands and an agent restart.
- For application embedding, install the npm package and use the re-exported programmatic CodeGraph class, for example in an Electron main process.
Alternatives and comparisons
- Another MCP-based code-intelligence server addressing the same problem of agents spending excessive tool calls exploring codebases; compare its indexing and query features against CodeGraph before choosing.
- An MCP code search server aimed at reducing the tokens coding agents spend on grep-and-read exploration; compare its approach with CodeGraph's pre-indexed graph.
- A semantic code search CLI with agent integration that also targets token waste from grep and raw file dumps in coding agents.
Project comparisons
Evidence and sources
- README: 100% Local | No data leaves your machine. No API keys. No external services. SQLite database only
- README: curl -fsSL https://raw.githubusercontent.com/colbymchenry/codegraph/main/install.sh | sh
- README: npm i -g @colbymchenry/codegraph
- README: Detects and auto-configures Claude Code, Cursor, Codex CLI, opencode, Hermes Agent, Gemini CLI, Antigravity IDE, Kiro, and GitHub Copilot (VS Code, Copilot CLI, JetBrains IDEs) —…
- README: `codegraph init` creates the local `.codegraph/` directory and builds the full graph in the same step — one command, done.
AI Search
Find projects, verify facts, compare options, or turn a complex need into an actionable plan
Try a searchA click only fills the search box; you stay in control
Project Details
0