Skip to content

Latest commit

 

History

History
49 lines (35 loc) · 3.64 KB

File metadata and controls

49 lines (35 loc) · 3.64 KB

CodeGraph

ZH EN Home

One-line take: CodeGraph is a local code knowledge graph plus MCP server — it pre-indexes a codebase into a queryable SQLite database so agents like Claude Code, Cursor, and Codex CLI can answer architectural questions with materially fewer tool calls and tokens.

Quick Read

Item Conclusion
Vendor colbymchenry (open source)
Route Runtime and tools — code knowledge graph / agent context layer
Open source Yes (MIT)
Best for Teams using Claude Code, Cursor, Codex CLI, opencode, or Hermes Agent who want measurably cheaper code exploration
Main cost An extra indexing layer to keep in sync; payoff scales with codebase size and exploration frequency
GitHub repo https://github.com/colbymchenry/codegraph

When To Pick It

  • You already use Claude Code, Cursor, Codex CLI, opencode, or Hermes Agent. CodeGraph plugs in via MCP — no new agent surface to learn.
  • Your codebase is large enough that agent exploration costs noticeable tokens per task.
  • You want measurable wins on the same exploration workload — the project reports median 35% cheaper, 59% fewer tokens, 49% faster, 70% fewer tool calls across real-world benchmarks.
  • You need local-only operation: no external APIs, no cloud, no data transmission.

When Not To Pick It

  • Your codebase is small enough that an agent can scan it directly without a knowledge graph.
  • You only use an agent that does not yet speak MCP — there is no value without the connector.
  • You need an indexer that handles every exotic language. CodeGraph covers 19+ via tree-sitter; the long tail is not guaranteed.

Capability Shape

Dimension Assessment Notes
Cross-agent integration Very strong First-class MCP plugins for Claude Code, Cursor, Codex CLI, OpenCode, Gemini, AntiGravity, Kiro, and Hermes Agent
Local-only operation Very strong Tree-sitter + SQLite + FTS5 — no external dependencies
Language coverage Strong 19+ languages including TypeScript, Python, Go, Rust, Java
Live syncing Strong Native OS file watchers keep the graph current
Impact analysis Strong Caller/callee tracing, framework-aware routing recognition

Operating Cost

Complexity is Low to Medium. Initial indexing happens automatically; the steady-state cost is keeping the database alive and the file watcher running. The payoff scales with how often the agent has to ask "where is this function called?" — for small repos the overhead is not worth it, for medium-to-large repos the token savings dominate.

Bottom Line

CodeGraph is the first profile in this map dedicated to "agent context infrastructure" — the realization that as agents do more code exploration, the cheapest way to make them better is not to upgrade the agent but to give it pre-computed structure. The MCP-first design slots cleanly into already-tracked agents (Claude Code, Cursor, Codex CLI, OpenCode, Gemini, AntiGravity, Kiro, and Hermes Agent). If you spend serious tokens on code Q&A, the published 35-70% improvements are the bar to evaluate against.