A new open-source tool called CodeGraphContext takes a different approach to giving AI coding assistants context about your codebase. Instead of feeding raw files to a language model, it indexes your code into a graph database - mapping every function, class, import, and call relationship into a queryable network.
The project works as an MCP server (Model Context Protocol - Anthropic's standard for connecting AI assistants to external tools and data sources). Once running, any MCP-compatible assistant like Claude can query the graph to understand how code connects across files and modules.
What it supports:
- 14 programming languages including TypeScript, Python, Java, Go, and Rust
- Multiple graph database backends: KuzuDB (zero-config default), FalkorDB, and Neo4j
- Live file watching that updates the graph in real-time as you edit code
- Complex queries like "show me every function that calls this method" or "trace the full call chain from this endpoint"
Setup is minimal:
pip install codegraphcontext
cgc mcp start
cgc mcp setup # auto-detects your AI tools
The practical benefit: instead of an AI assistant grepping through files and hoping it finds the right context, it can query structured relationships. Ask it to refactor a function and it already knows every caller, every downstream dependency, and every class that inherits from it.
With roughly 1,400 GitHub stars, the project has gained traction in the developer tools space. It fills a real gap - most AI coding assistants still treat codebases as bags of text files rather than structured, interconnected systems. For large codebases where context matters most, a graph-based approach could meaningfully reduce the "AI doesn't understand my project" problem that plagues current tools.