AgentIndex icon
AgentIndex
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Submit Tool
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Home/
RAG / Knowledge Base/
code-graph-rag
code-graph-rag logo

code-graph-rag

Active·★ 5.3k·MIT·Updated 2026-10-22

Code-Graph-RAG is a graph-based retrieval-augmented generation system for codebases. It analyses multi-language code with Tree-sitter, builds a knowledge graph of the structure, stores it in Memgraph and lets you query and edit the codebase in natural language. The README's news highlights an MCP server integration with Claude Code and, from October 2025, semantic code search with UniXcoder embeddings, so you can find functions by what they do (for example error handling or authentication code) instead of by name.

A language table lists fully supported languages such as C++, Java, JavaScript, Lua and Python, with details like templates and C++20 modules for C++ or type inference for Python. Natural-language questions are turned into Cypher queries by a model of your choice: Google Gemini in the cloud, local models through Ollama, or OpenAI models. Prerequisites are Python 3.12+, Docker and Docker Compose for Memgraph, cmake (to build the pymgclient dependency), ripgrep and the uv package manager. The code is MIT licensed.

This write-up is based on the project's README and public repository data. We have not hand-tested the tool. Data as of 2026-10-17.

License
MIT
Latest release
v0.2.0 · 2026-10-15
Last commit
2026-10-16
Contributors
73
Forks
702
Open issues and PRs
588
First published
2025-06-16

Source: GitHub, npm and PyPI public APIs.

#ai#ast#claude-code#code-analysis#code-understanding#codebase-search#developer-tools#graph-database
$ Install
$ git clone https://github.com/vitali87/code-graph-rag.git && cd code-graph-rag && uv sync --extra treesitter-full && cp .env.example .env && docker-compose up -d
↗ Visit site★ GitHub
01

Features

01Multi-Language Support
02Tree-sitter Parsing
03Knowledge Graph Storage
04Natural Language Querying
05Advanced File Editing
02

Why choose it

+Turns a multi-language codebase into a queryable knowledge graph of functions, classes and modules.
+Works as an MCP server with Claude Code, and supports semantic search by intent using UniXcoder embeddings.
+Natural-language questions become Cypher queries using Gemini, OpenAI or local Ollama models.
+Tree-sitter parsing covers C++, Java, JavaScript, Lua, Python and more; MIT licensed.
03

Trade-offs

!Setup is heavy: Python 3.12+, Docker for Memgraph, cmake, ripgrep and uv are all required.
!Cloud use needs a model API key (such as Google Gemini), or a local Ollama setup for fully local operation.
!The README is very long (over 35,000 characters), and the system can also edit code, so review changes it proposes.
05

Maintenance check

ActiveChecked: 2026-10-22
Last commit
2026-10-21
Commits, last 90 days
100+
Releases, last 90 days
18
Latest release
v0.2.10 (2026-10-18)
Open issues
543
Recent issues with at least one comment
0/4
Commits per week, last 12 weeks
Commits per week, last 12 weeks: 280, 390, 281, 613, 566, 458, 444, 432, 1282, 808, 504, 109

Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.

Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.

04

Who it fits

Pick it if
  • You want to parse a multi-language monorepo with Tree-sitter into a Memgraph knowledge graph and query or edit it via natural language or Claude Code MCP.
  • You want semantic code search using UniXcoder embeddings paired with Cypher graph queries.
Look elsewhere if
  • You want RAG over PDFs, Word files, and slides rather than source code repositories; use RAGFlow or MaxKB.
  • You want a zero-dependency code context MCP server without running Docker and Memgraph; jCodeMunch or Context7 are much lighter.
06

How it differs

jcodemunch-mcp logovs jcodemunch-mcp★ 2.8k

code-graph-rag builds a full graph database in Memgraph (via Docker) and translates questions into Cypher queries. jCodeMunch indexes symbols locally with Tree-sitter without requiring a graph database container.

Full comparison →
07

Compatibility

C++
C++
Verified via docs
Java
Java
Verified via docs
JavaScript
JavaScript
Verified via docs
Lua
Lua
Verified via docs
Python
Python
Verified via docs
Rust
Rust
Verified via docs
08

Quick start

1
$ git clone https://github.com/vitali87/code-graph-rag.git
2
$ cd code-graph-rag
3
$ uv sync --extra treesitter-full
4
$ cp .env.example .env
5
$ docker-compose up -d
09

Use cases

↳Analyze and ingest multi-language codebases into a knowledge graph.
↳Query codebase structure and relationships using natural language.
↳Receive AI-powered optimization suggestions and perform surgical code edits.
10

Alternatives

⚡Top VS:
VSjcodemunch-mcp★2.8k→VSarbor★160→VSclaude-historian-mcp★179→VSKaimon.jl★56→
jcodemunch-mcp logo
jcodemunch-mcp★ 2.8k
Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.
VSCompare→
arbor logo
arbor★ 160
Graph-native code intelligence that replaces embedding-based RAG with deterministic program understanding.
VSCompare→
claude-historian-mcp logo
claude-historian-mcp★ 179
📜 An MCP server for conversation history search and retrieval in Claude Code
VSCompare→
Kaimon.jl logo
Kaimon.jl★ 56
MCP server giving AI agents full access to Julia's runtime via a live Gate — code execution, introspection, debugging, testing, and semantic search
VSCompare→
code-graph-context logo
code-graph-context★ 17
A Model Context Protocol (MCP) server that builds rich code graphs to provide deep contextual understanding of TypeScript codebases to Large Language Models.
VSCompare→
subcog logo
subcog★ 29
Persistent memory system for AI coding assistants. Captures decisions, learnings, and context from coding sessions. Features hybrid search (semantic + BM25), MCP server integration, SQLite persistence with knowledge graph, and proactive memory surfacing. Written in Rust.
VSCompare→
codeTree logo
codeTree★ 30
MCP server with 23 tools for structured code understanding via tree-sitter. 10 languages. 999 tests. One-command install.
VSCompare→
TrueMemory logo
TrueMemory★ 381
A living memory system that ingests long-horizon data to infer insights, enabling more decisive action, all while running on a single SQLite file locally.
VSCompare→
See all alternatives →

Featured in these lists

  • Open-Source RAG Platforms & Deep Research Agents: RAGFlow, MaxKB, GPT Researcher, DeerFlow & More

Comments

Log in to leave a comment

No comments yet. Be the first!

On this page
01Features02Why choose it03Trade-offs05Maintenance check04Who it fits06How it differs07Compatibility08Quick start09Use cases10Alternatives
vitali87 /
code-graph-rag
↗

Builds a graph of your codebase with Tree-sitter and lets you query it in natural language

5.3k702MIT
Last commit1d ago
StatusActive
CategoryRAG / Knowledge Base
Contributors73
Latest releasev0.2.0
Links
Documentation↗Discussion↗Issues↗Releases↗
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
Best by use caseAboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

MCP ServersCode AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.