Knowledge-graph RAG for multi-language codebases: index, query and edit code in natural language.
MCPpedia last refreshed this data
Code Graph RAG is an MCP server that knowledge-graph RAG for multi-language codebases: index, query and edit code in natural language. Its tool list has not been published yet over stdio and sse, requires no API key, and scores 82/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"code-graph-rag": {
"args": [
"code-graph-rag"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Knowledge-graph RAG for multi-language codebases: index, query and edit code in natural language.
This server supports HTTP transport. Be the first to test it - help the community know if it works.
Five weighted categories - click any category to see the underlying evidence.
Code Graph RAG structural tools follow out-of-root symlinks
A remote/local attacker who can get a symbolic link included in a source-code repository that code-graph-rag analyzes can cause the `structural_search` and `structural_replace` tools (backed by `AstGrepService`, exposed both as MCP tools and as agentic AI tools) to read and -- via `structural_replace` with `dry_run=False` -- overwrite arbitrary files outside the configured project root, because the tool's path-containment check (`should_skip_path`/`_classify_file`) is performed lexically on the
Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read
### Summary The `read_file` MCP tool in `codebase_rag/mcp/tools.py` contains a path traversal vulnerability in its paginated branch (when `offset` or `limit` is supplied). The handler constructs a file path using `Path(self.project_root) / file_path` without subsequently validating that the resolved path remains within the configured project root. Python's `pathlib` silently discards the left-hand component when the right-hand argument is an absolute path, allowing an attacker to read any UTF-8
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in developer-tools
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
MCP server for using the GitLab API
Manage Supabase projects — databases, auth, storage, and edge functions
An open-source AI agent that brings the power of Gemini directly into your terminal.
MCP Security Weekly
Get CVE alerts and security updates for Code Graph Rag and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
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.
1. Index: cgr start --update-graph parses a repository into a knowledge graph (sped up)
2. Ask: cgr start answers questions and edits code, grounded in that graph
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: