</>MCP Agents Market
MCP Server

code-graph-rag

by vitali874.9kPythonUpdated 2026-09-02

The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs

Claude Code

Code-Graph-RAG is an MCP server that transforms multi-language codebases into queryable knowledge graphs using Tree-sitter parsing and Memgraph storage. It enables AI assistants to understand, query, and edit code across monorepos containing Python, TypeScript, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, Dart, and other languages through a unified graph schema. Developers can ask natural-language questions about code structure, retrieve functions and classes by intent, apply AST-based edits with diff previews, and trace runtime behavior by overlaying execution profiles onto the static graph.

Key Features

Multi-language parsing with Tree-sitter supporting 13+ languages under a single graph schema
Knowledge graph storage in Memgraph capturing functions, classes, methods, modules, and their relationships
Natural language to Cypher query conversion for code retrieval and analysis
AST-based code editing with surgical patching and diff preview before changes
Dynamic call tracing to merge runtime behavior from test runs or eBPF profiles into the graph
Dead code detection by walking call and reference edges from entry points
Duplicate code detection using AST-based analysis across repositories
Structural search and rewrite capabilities powered by ast-grep

Use Cases

  • 01Querying large monorepos with mixed programming languages to understand code structure and dependencies
  • 02Identifying and removing dead code by analyzing actual call paths from application entry points
  • 03Refactoring code across multiple languages with AI-assisted editing and validation
  • 04Detecting duplicate code patterns and structural similarities in multi-repository projects
  • 05Overlaying runtime execution traces to discover dynamic dispatch and actual call paths invisible to static analysis
  • 06Answering architectural questions about legacy codebases through natural language queries

Related MCP Servers

View more

code-graph-rag — FAQ

What is the Code-Graph-RAG MCP server?+

Code-Graph-RAG is an MCP server that parses multi-language codebases with Tree-sitter, builds a knowledge graph in Memgraph, and exposes that graph to AI assistants like Claude Code for querying and editing code through natural language.

How do I install Code-Graph-RAG?+

Install via pipx or uv with `uv tool install "code-graph-rag[treesitter-full,semantic]"`, then run `cgr daemon up` to start the Memgraph and Qdrant services. You need Python 3.12+, Docker, cmake, and ripgrep installed.

Which MCP clients work with Code-Graph-RAG?+

Claude Code and other MCP-compatible clients can connect to Code-Graph-RAG. The documentation includes a dedicated MCP Server setup guide for configuring client connections.

Does Code-Graph-RAG require API keys?+

The README does not specify external API key requirements for basic graph parsing and querying. AI-powered natural language features likely require an LLM API key, but the specific provider is not documented in the excerpt.

Is Code-Graph-RAG free to use?+

Yes, Code-Graph-RAG is open source under the MIT license and free to use. Enterprise managed cloud hosting and on-premise deployments are available as paid services.

Which programming languages does Code-Graph-RAG support?+

Fully supported languages include Python, TypeScript, TSX, JavaScript, Rust, Go, Java, C, C++, C#, PHP, Lua, and Dart. Ruby, Kotlin, Swift, Elixir, Haskell, Solidity, Bash, Nix, and Scala have varying levels of structural support.

How do I install code-graph-rag?+

Open the source repository on GitHub and follow its README. code-graph-rag is a mcp server — MCP Agents Market links you directly to the official repo.

Is code-graph-rag free?+

code-graph-rag is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.

Related searches