code-graph-rag
View on GitHubThe ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
Code-Graph-RAG parses a multi-language monorepo with Tree-sitter, stores functions, classes and relationships in a Memgraph knowledge graph, and answers natural-language queries that generate Cypher. It also edits code via AST patches, finds dead code, merges runtime traces, and runs as an MCP server for Claude Code.
Use Cases
Ask natural-language questions about a multi-language monorepoRetrieve exact source of a function/class/method by name or intentAI-driven code editing with AST-based patches and diff previewDetect dead code by walking call and reference edgesOptimize code against language best practicesOverlay runtime traces/eBPF profiles onto the static graphServe codebase query/edit capabilities to Claude Code via MCPIndex many languages into one unified graph schemaStructural search and rewrite with ast-grep patternsExport or audit the code knowledge graph
Built With
- Language
- Python
- Frameworks
- pydantic-ai · tree-sitter · ast-grep · MCP · memgraph · neo4j · qdrant · typer · watchdog · docker · loguru · pydantic-settings
Tags
rag · knowledge-graph · code-analysis · tree-sitter · mcp-server · memgraph · monorepo · semantic-search · ast · code-editing · dead-code-detection · multi-language · cypher · codebase-search · graph-database