Code-Graph-RAG indexes multi-language repositories into a queryable graph and answers natural-language questions with grounded retrieval. It supports edits, dead-code detection, tracing, and MCP access.
Overview
Code-Graph-RAG parses repositories with Tree-sitter and optional compiler frontends, then stores functions, classes, imports, and relationships in an embedded graph database. A shared SQLite file is the default; Memgraph or Neo4j backends are optional.
The cgr CLI lets developers ask questions in plain language, fetch definitions, run AST-based edits with previews, and search by structure with ast-grep. Runtime traces can merge observed calls into the graph beyond static analysis.
Supported languages span Python, TypeScript, JavaScript, Go, Rust, Java, C-family languages, PHP, and more, with additional languages handled through ast-grep tiers. Installation is via PyPI or git, requiring Python 3.12+ and ripgrep.
An MCP server exposes the same capabilities to Claude Code and other MCP clients for agent-driven navigation and refactoring workflows.
Key features
- Multi-language Tree-sitter indexing
- Natural-language graph queries
- AST-based code edits
- Dead code detection
- Dynamic call tracing
- MCP server integration
- Embedded SQLite graph
- Semantic search extras
Use cases
- Large monorepo onboarding
- AI agent codebase context
- Impact analysis before refactors
- Finding unused code paths
Does the same job as
Code-Graph-RAG doesn't name these products itself, but its own description shows it does the same job.