Code-Graph-RAG turns a multi-language codebase into a knowledge graph so you can search, understand, query, and edit code in natural language.
Code-Graph-RAG is a Python-based tool for indexing monorepos and mixed-language repositories into a graph database. It reads source code, extracts structural elements such as functions, classes, methods, and modules, and makes them available for querying, editing, optimisation, and source retrieval through an AI-driven interface.
It addresses the difficulty of understanding and working with large, multi-language codebases, especially monorepos where relationships between files and symbols are hard to track. Instead of relying only on text search, it aims to give developers a structured way to ask questions, locate code by intent, trace dependencies, and find dead code.
Conceptually, the system has two parts. First, a Tree-sitter-based parser analyzes the repository and stores code structure and relationships in Memgraph under a shared schema; second, an interactive RAG layer converts natural-language requests into Cypher queries, retrieves relevant graph results, and supports AI-assisted editing and optimisation. The README also says it can expose this workflow through an MCP server and supports structural search-and-replace using AST patterns.
It is drawing attention because it combines several current developer trends: AI-assisted code understanding, knowledge graphs, semantic search, MCP integration, and multi-language repository tooling. The README highlights recent additions such as Ruby support via a pluggable AST-grep tier, structural search and replace, and expanded data-flow tracing across more languages, which suggests active development and broadening capability.
The README does not name direct competitors, but the closest alternatives are general code search tools, AST-based refactoring tools, and other RAG systems for codebases. In practical terms, it sits at the intersection of semantic code search, graph databases, and AI-assisted developer agents rather than replacing any single traditional tool.
AI-explained · grounded in each repo's README