CodeGraph

colbymchenry.github.io

Local code knowledge graph that gives Claude Code, Cursor and Codex precise codebase context.

GitHub stars
78,124
License
MIT
Language
TypeScript
Pricing
Open source
Published
Nov 19, 2026

Next steps

What it does

CodeGraph turns a repository into a pre-indexed knowledge graph of symbols, calls, routes and cross-file references, with a Rust-powered kernel, and re-syncs automatically when code changes. Coding agents query it through MCP tools to get surgical context instead of reading whole files, which saves tokens and reduces wrong edits. It runs 100% locally, installs with a one-line script or npm, and is MIT-licensed.

Use cases

  • Give Claude Code, Cursor or Codex precise context about callers, routes and dependencies instead of grepping the whole repo
  • Explore an unfamiliar codebase as a queryable graph before a refactor
  • Keep a local, auto-synced index of a monorepo that coding agents query through MCP tools

Frequently asked questions

What is CodeGraph?
CodeGraph is a local-first code-intelligence tool that pre-indexes a codebase into a knowledge graph and keeps it in sync as code changes, so AI coding agents can query it.
Which agents does it support?
The README lists Claude Code, Cursor, Codex, OpenCode, Hermes Agent, Gemini, Antigravity, Kiro and GitHub Copilot, among others, mainly through MCP tools.
Does my code leave my machine?
The project describes itself as 100% local. It has optional anonymous usage telemetry that you can switch off with `codegraph telemetry off`.
Is it free?
Yes, the CLI is open source under the MIT license. A hosted PR-analysis product is in early beta.
Log in to join the discussion