Skip to content

Code-Graph-RAG vs rag-rat

Code-Graph-RAG is an open-source MCP server for knowledge and memory. rag-rat is an open-source MCP server for knowledge and memory.

  • Code-Graph-RAG is best for ask how a function is reached in an unfamiliar monorepo.
  • rag-rat is best for see what a change to a function will break.
What it is
Code-Graph-RAG is an open-source MCP server for knowledge and memory.
rag-rat is an open-source MCP server for knowledge and memory.
Best for
Ask how a function is reached in an unfamiliar monorepo
See what a change to a function will break
Kind
MCP server
MCP server
Pricing
Open source
Open source
Platforms
CLI, self-hosted
CLI, vscode, self-hosted
Runs
Locally
Locally
Open source
Good for
Ask how a function is reached in an unfamiliar monorepo; Find unreachable functions before a cleanup; Apply a pattern-based rewrite across a whole codebase
See what a change to a function will break; Find why a piece of code was written this way; Stop an agent re-implementing an existing helper

What Code-Graph-RAG does

  • Tree-sitter graph index

    Parses 14 languages into one graph schema of functions, classes, modules and dependencies.

  • Natural-language queries

    Translates plain-English questions into Cypher queries over the code graph.

  • AST-based editing

    Replaces specific functions with a diff preview shown before anything changes.

  • Dead code detection

    Walks call and reference edges from entry points to find unreachable functions.

  • Structural search and replace

    Uses ast-grep patterns to match and rewrite code by structure, not text.

  • Runtime trace overlay

    Merges calls observed in a test run into the graph with the cgr trace command.

What rag-rat does

  • Labelled code graph

    Every edge says how it was resolved.

  • Impact surface

    Shows callers, tests and notes around a symbol before a change.

  • Papertrail history

    Mirrors issue, PR and review rationale locally.

  • Source-anchored memory

    Notes attach to symbols and outlive refactors.

  • Clone warnings

    A hook flags near-duplicates of existing code.

  • Shared worktree index

    Parallel agents reuse one index and memory store.

Code-Graph-RAG vs rag-rat: questions

Is Code-Graph-RAG or rag-rat cheaper?

Both are open source. Compare current plans on each official site.

What is the difference between Code-Graph-RAG and rag-rat?

Code-Graph-RAG is an open-source MCP server for knowledge and memory. rag-rat is an open-source MCP server for knowledge and memory.

Keep comparing