Context7
Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.
Description from the maker (original English)
Knowledge-graph RAG for multi-language codebases: index, query and edit code in natural language.
These three are never merged into one score: opinions, measurements and popularity are different things.
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
Pick the AI app you use, then copy the settings.
ORCHESTRATOR_PROVIDER, ORCHESTRATOR_MODEL, ORCHESTRATOR_API_KEY, CYPHER_PROVIDER, CYPHER_MODEL, CYPHER_API_KEY, MEMGRAPH_HOST, MEMGRAPH_PORT, TARGET_REPO_PATHValues marked secret are keys to your account. Never share them or paste them into a chat.
You need
Which app do you use?
Pick your app above. We remember it, so next time the button says “Install in …”.
Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json
{
"mcpServers": {
"code-graph-rag": {
"command": "uvx",
"args": [
"code-graph-rag",
"mcp-server"
],
"env": {
"ORCHESTRATOR_PROVIDER": "your-value",
"ORCHESTRATOR_MODEL": "your-value",
"ORCHESTRATOR_API_KEY": "your-value",
"CYPHER_PROVIDER": "your-value",
"CYPHER_MODEL": "your-value",
"CYPHER_API_KEY": "your-value",
"MEMGRAPH_HOST": "your-value",
"MEMGRAPH_PORT": "your-value",
"TARGET_REPO_PATH": "your-value"
}
}
}
}Run this in your terminal
claude mcp add code-graph-rag --env ORCHESTRATOR_PROVIDER=your-value --env ORCHESTRATOR_MODEL=your-value --env ORCHESTRATOR_API_KEY=your-value --env CYPHER_PROVIDER=your-value --env CYPHER_MODEL=your-value --env CYPHER_API_KEY=your-value --env MEMGRAPH_HOST=your-value --env MEMGRAPH_PORT=your-value --env TARGET_REPO_PATH=your-value -- uvx code-graph-rag mcp-serverFill in the empty values before running it.
Paste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json
{
"mcpServers": {
"code-graph-rag": {
"command": "uvx",
"args": [
"code-graph-rag",
"mcp-server"
],
"env": {
"ORCHESTRATOR_PROVIDER": "your-value",
"ORCHESTRATOR_MODEL": "your-value",
"ORCHESTRATOR_API_KEY": "your-value",
"CYPHER_PROVIDER": "your-value",
"CYPHER_MODEL": "your-value",
"CYPHER_API_KEY": "your-value",
"MEMGRAPH_HOST": "your-value",
"MEMGRAPH_PORT": "your-value",
"TARGET_REPO_PATH": "your-value"
}
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
Paste into .vscode/mcp.json in your project
{
"servers": {
"code-graph-rag": {
"type": "stdio",
"command": "uvx",
"args": [
"code-graph-rag",
"mcp-server"
],
"env": {
"ORCHESTRATOR_PROVIDER": "your-value",
"ORCHESTRATOR_MODEL": "your-value",
"ORCHESTRATOR_API_KEY": "your-value",
"CYPHER_PROVIDER": "your-value",
"CYPHER_MODEL": "your-value",
"CYPHER_API_KEY": "your-value",
"MEMGRAPH_HOST": "your-value",
"MEMGRAPH_PORT": "your-value",
"TARGET_REPO_PATH": "your-value"
}
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.
Your choice stays on this device in a cookie; no account needed.
ORCHESTRATOR_PROVIDER envORCHESTRATOR_MODEL envCYPHER_PROVIDER envCYPHER_MODEL envMEMGRAPH_HOST envMEMGRAPH_PORT envTARGET_REPO_PATH envThese settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 6, 2026
The registry name was verified with the GitHub account vitali87, which owns the repo
We have not read this repo from GitHub yet
We have not read this repo from GitHub yet
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
You need to fill in: ORCHESTRATOR_API_KEY, CYPHER_API_KEY
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed –, and the latest version (0.5.0) reached the registry 3 days ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.
In the same category: Context7, Codebase Memory, Exa
Servers in the same category from other makers, sorted by stars.
Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
Feeds AI the latest docs for libraries and frameworks before it answers, so code it writes does not use outdated, removed functions.
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
Code-Graph-RAG parses a multi-language codebase with Tree-sitter, sharpened by compiler-grade frontends and runtime traces where available, builds a knowledge graph of its structure in an embedded graph database that needs no server, and lets you query, edit, and optimise that code in plain English. It works across a monorepo of mixed languages under one unified graph schema.
See NEWS.md for the full history.
Point Code-Graph-RAG at a repository and it reads every source file, extracts functions, classes, methods, modules, and the relationships between them, and stores the result as an interconnected graph. Once the graph exists you can:
cgr trace and merge the calls that actually happened into the graph, exposing dispatch that static analysis cannot see.The system has two components:
go/types for Go, and opt-in Roslyn, javac and Jedi for C#, Java and Python), and dynamic tracing merges calls observed at runtime. Tree-sitter stays the backbone: a trace only sees code that ran, and a compiler frontend only covers what its toolchain can build.codebase_rag/). An interactive CLI that turns natural language into Cypher queries, retrieves matching code, and drives AI-powered editing and optimisation.Source Code -> Tree-sitter Parser -> AST Analysis -> Knowledge Graph
| User Query -> AI Model (Cypher Gen) -> Cypher Query -> Graph Results -> Response
The graph is stored in an embedded SQLite file by default. Memgraph and Neo4j are opt-in backends that run the same Cypher; Graph Backends compares them.
See the Architecture Overview and Graph Schema for the full picture.
Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, Dart, and Julia are fully supported. Scala is in development, and Ruby, Kotlin, Swift, Elixir, Haskell, Solidity, Bash, and Nix have structural support (modules, functions, classes where the language has them, and imports) through the pluggable ast-grep tier. See the Language Support matrix for per-language capabilities.
cgr is published to PyPI. Install it system-wide with the treesitter-full (tree-sitter grammars), ast-grep (Ruby, Kotlin, Swift, Elixir, Haskell, Solidity, Bash, Nix) and semantic (vector search) extras:
# with uv (recommended)
uv tool install "code-graph-rag[treesitter-full,ast-grep,semantic]"
pipx install "code-graph-rag[treesitter-full,ast-grep,semantic]"
Three version lines exist and they intentionally differ:
| where | what it tracks |
|---|---|
| git tags | every version, one per merge |
| GitHub Releases (binaries, signatures) | every 50th version, plus any security fix, breaking change or merge labelled release now |
| PyPI | every 50th version, plus any security fix, breaking change or merge labelled release now |
So the newest tag on main usually runs ahead of the newest release, often by tens of patch versions; they coincide only just after a release. Nothing is stuck, the cadences differ by design. A security fix, a breaking change or a merge a maintainer labels release now does NOT wait for the cadence: each ships a release and a PyPI upload immediately.
uv tool install and pipx install give you the newest PyPI version, which is the newest RELEASE, not the newest tag. Interim tags exist so every merge is addressable; binaries and PyPI uploads follow the cadence above.
To run code newer than the latest release, install from git:
uv tool install "code-graph-rag[treesitter-full,ast-grep,semantic] @ git+https://github.com/vitali87/code-graph-rag@main"
To upgrade an existing install, run uv tool upgrade code-graph-rag (with pipx, pipx upgrade code-graph-rag, or pipx reinstall code-graph-rag for a git install). Upgrade covers the other install methods.
You also need Python 3.12+ and ripgrep. The graph lives in an embedded SQLite file by default, so there is no database server to run: no Docker and no cmake. Memgraph and Neo4j remain available as opt-in backends (Graph Backends). Full prerequisites, source installs, and environment setup are in the Installation guide.
[!NOTE]
The wheel is pure Python (
py3-none-any), so it installs on any platform with Python 3.12 or newer. Older system interpreters (Debian Bookworm ships 3.11) need the interpreter pinned explicitly; see Installation for the commands.
# Parse a repository into the graph, then query it
cgr start --repo-path /path/to/repo --update-graph cgr start --repo-path /path/to/repo
The graph is written to ~/.cgr/graph.sqlite (set SQLITE_GRAPH_PATH to move it). To use Memgraph instead, install the driver with the memgraph extra, set GRAPH_BACKEND=memgraph, and start the packaged Memgraph + Qdrant stack with cgr daemon up.
Repeat the first command for each repository you want indexed; the graph is shared, and syncing one project leaves the others alone. To start over from an empty graph, add --clean — it deletes every project in the shared graph, not just this one, and asks for confirmation first when other projects would be destroyed.
A default index leaves out the opt-in capture groups; add them with --capture or CGR_CAPTURE.
The Quick Start guide walks through parsing, querying, and exporting in five minutes.
Code-Graph-RAG runs as an MCP server so Claude Code and other MCP clients can query and edit your codebase directly. See the MCP Server guide for setup.
Getting Started
User Guide
Architecture
Python SDK
Advanced
Code-Graph-RAG is open source and free to use. For organisations that need more, we offer fully managed cloud-hosted solutions and on-premise deployments:
-
Only the beginning is shown; read the rest in the repo