Index local code into a graph database to give AI assistants and developers repository-wide context
open sourceMITself-hostablefreeMCP
CodeGraphContext (CGC) is an MCP server and CLI that parses a repository with tree-sitter (and optional SCIP indexers) into a graph of files, symbols, calls, inheritance and imports, stored in a graph database. AI assistants query it over MCP for callers, callees, class hierarchies and call chains, and developers use the same queries from the CLI to trace dependencies, find dead code and generate interactive HTML graph visualizations. It runs locally on an embedded database (FalkorDB Lite, KuzuDB or LadybugDB) or on Neo4j, watches files to keep the graph current, and can load pre-indexed bundles of popular repositories. Python. MIT.
Problems it solves
- give my AI coding assistant an understanding of how functions and classes in my repo connect
- find every caller of a function and the full call chain across files
- find dead code and unexpected dependencies in a codebase
- visualize my code's call graph and class hierarchy interactively
- a code knowledge graph stored in Neo4j that I can query
Features
- indexes files, symbols, calls, inheritance and imports into a graph
- callers, callees, class hierarchies and call chain queries
- dead code analysis
- interactive HTML graph visualizations
- live file watching to update the graph
- pre-indexed .cgc bundles of popular repositories
- optional SCIP indexing
- graph backends: FalkorDB Lite, KuzuDB, LadybugDB, FalkorDB, Nornic DB or Neo4j
- MCP server and CLI
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has an MCP server | plan not known |
Alternatives
The same job
These do what CodeGraphContext does.
- codebase-memory-mcp Local code intelligence for AI agents: a persistent knowledge graph of your code over MCP
