# Code-Graph-RAG (MCP server)

> Code-Graph-RAG is an MCP server that adds search and knowledge tools to AI assistants such as Claude Desktop, Claude Code and Cursor. Knowledge-graph RAG for multi-language codebases: index, query and edit code in natural language. It has 5,355 GitHub stars, is released under the MIT license and runs locally with uvx code-graph-rag.

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.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/vitali87/code-graph-rag |
| GitHub stars | 5,355 |
| License | MIT |
| Language | Python |
| Transport | stdio |
| Packages | pypi: code-graph-rag |
| Remote URL | none |
| Needs API key | yes |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | AI & search |
| Latest release | v0.6.62 (Nov 15, 2026) |
| Last commit | Nov 16, 2026 |
| MCP registry name | io.github.vitali87/code-graph-rag |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "code-graph-rag": {
      "command": "uvx",
      "args": [
        "code-graph-rag"
      ],
      "env": {
        "ORCHESTRATOR_API_KEY": "your-value",
        "CYPHER_API_KEY": "your-value"
      }
    }
  }
}
```

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env ORCHESTRATOR_API_KEY=your-value --env CYPHER_API_KEY=your-value --transport stdio code-graph-rag -- uvx code-graph-rag
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "code-graph-rag": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "code-graph-rag"
      ],
      "env": {
        "ORCHESTRATOR_API_KEY": "your-value",
        "CYPHER_API_KEY": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

### VS Code (.vscode/mcp.json)

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "orchestrator_api_key",
      "description": "ORCHESTRATOR_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "cypher_api_key",
      "description": "CYPHER_API_KEY",
      "password": true
    }
  ],
  "servers": {
    "code-graph-rag": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "code-graph-rag"
      ],
      "env": {
        "ORCHESTRATOR_API_KEY": "${input:orchestrator_api_key}",
        "CYPHER_API_KEY": "${input:cypher_api_key}"
      }
    }
  }
}
```

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `ORCHESTRATOR_PROVIDER`: LLM provider for the orchestrator agent (openai, anthropic, google, azure, cohere, ollama)
- `ORCHESTRATOR_MODEL`: Model name for the orchestrator agent
- `ORCHESTRATOR_API_KEY` (secret): API key for the orchestrator LLM provider (not needed for the default local ollama provider)
- `CYPHER_PROVIDER`: LLM provider for Cypher query generation (openai, anthropic, google, azure, cohere, ollama)
- `CYPHER_MODEL`: Model name for Cypher query generation
- `CYPHER_API_KEY` (secret): API key for the Cypher LLM provider (not needed for the default local ollama provider)
- `MEMGRAPH_HOST`: Hostname of the Memgraph database
- `MEMGRAPH_PORT`: Port of the Memgraph database
- `TARGET_REPO_PATH`: Path to the repository to analyze (auto-detected from working directory if not set)

## Similar MCP servers

- [AutoRAG](https://appsgit.com/mcp-servers/autorag): Your Personal Librarian Agent. Ask anything on your computer, organize files, remember important info and files. (5,875 stars, Apache-2.0)
- [Exa](https://appsgit.com/mcp-servers/exa): Connect AI agents to Exa for web search, content fetching, and multi-step research. (5,237 stars, MIT, official)
- [Semble](https://appsgit.com/mcp-servers/semble): Fast and Accurate Code Search for Agents. (6,430 stars, MIT)
- [Hyperresearch](https://appsgit.com/mcp-servers/hyperresearch): Convert Claude Code or Codex into the most intelligent Deep Research Agent. (4,816 stars, MIT)
- [Sui Knowledge Base (kapa.ai)](https://appsgit.com/mcp-servers/sui-knowledge-base-kapa-ai): Semantic search across Sui documentation and knowledge sources, powered by kapa.ai. (7,786 stars, Apache-2.0)
- [Socraticode](https://appsgit.com/mcp-servers/socraticode): MCP server for enterprise local codebase indexing, semantic search, and code dependency graphs. (3,377 stars, AGPL-3.0, needs API key)

---

Canonical page: https://appsgit.com/mcp-servers/code-graph-rag
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed daily.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
