code-graph-rag
An MCP server and CLI that build a knowledge graph of a monorepo and let an agent query, understand and edit multi-language code
Medium risk
We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.
Why this level
- Reads and indexes the entire repository code
- Can propose code edits
- Sends code content to a language model
Install
Manual install
uv tool install "code-graph-rag[treesitter-full,semantic]"Installs the tool with language parsing and semantic search. A Memgraph database is required.
This is third-party code. Review the repository files before installing.
What it does
code-graph-rag parses a monorepo with a syntax tree and builds a knowledge graph: files, modules, functions, classes and the relations between them. Over that graph the agent answers architecture questions, finds implementations and proposes edits across several languages at once. It works as an MCP server and as a CLI, with the graph stored in a Memgraph database. Many languages are supported through tree-sitter, with semantic search over the graph.
Who it is for. For developers and architects working with large multi-language monorepos.
Good fit when
- You need to understand a large repository's architecture through an agent
- You need to trace relations between modules and functions across the code
- You want to query code over a knowledge graph, not just text search
Not a fit when
- The project is small and a knowledge graph is overkill
- You cannot run a Memgraph database
- The model the RAG relies on is unavailable
Example request
Explain how the payment module and the task queue are connected in this monorepoLimitations
Requires a Memgraph database for the graph and a language model for queries. Installation goes through uv or pipx with the treesitter and semantic extras. Availability depends on the chosen model provider, so it is marked unknown.
How to disable. Remove the server from the MCP config, uninstall the tool with uv tool uninstall code-graph-rag and stop the Memgraph database.
MCP
- Transport
- stdio
- Authentication
- not required
Security check
- Reads and indexes the entire repository code
- Can propose code edits
- Sends code content to a language model
README in short
code-graph-rag is a RAG system for a monorepo: it builds a code knowledge graph and lets an agent query, understand and edit multi-language projects. It runs as an MCP server and a CLI, uses tree-sitter for parsing and a Memgraph database for the graph. It installs through uv or pipx with extras for language parsing and semantic search. MIT licensed.
FAQ
Why is Memgraph needed?
It stores the code knowledge graph the agent uses to trace relations and answer questions.
Which languages are supported?
Many languages via tree-sitter; the set installs through the treesitter-full and semantic extras.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
GitHub toolkit for spec-driven development: the specify CLI adds agent commands and skills to a project, from principles to implementation
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything