CodeGraph
A local pre-indexed code knowledge graph that reduces token usage and tool calls for AI coding assistants.
Tool overview
CodeGraph parses your codebase with tree-sitter to create a structured knowledge graph of symbols, call relationships, and routes, exposing it as an MCP server for AI assistants like Claude Code and Cursor. Instead of repetitive grep/read, assistants can query the graph directly, cutting tool calls by about 58% and token costs by around 16%.
It runs entirely locally, storing data in SQLite without sending code to external servers — a big plus for security-conscious teams. With support for 20+ languages and file-system watching for incremental updates, the graph stays up to date automatically.
As an early open-source project, some language edge cases may not be fully covered, and the tool requires a Node.js environment. However, for developers who use AI coding assistants frequently and want to save on API costs while keeping code private, CodeGraph offers a pragmatic solution. If your team doesn’t use AI coding tools or your projects are very small, the setup effort may not be justified.