Skip to content

Code-Graph-RAG vs Codebase Memory

Code-Graph-RAG is an open-source MCP server for knowledge and memory. Codebase Memory 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.
  • Codebase Memory is best for find callers of a function.
What it is
Code-Graph-RAG is an open-source MCP server for knowledge and memory.
Codebase Memory is an open-source MCP server for knowledge and memory.
Best for
Ask how a function is reached in an unfamiliar monorepo
Find callers of a function
Kind
MCP server
MCP server
Pricing
Open source
Open source
Platforms
CLI, self-hosted
CLI, macOS, Linux, Windows, self-hosted
Runs
Locally
Locally
GitHub stars
48.7K
Last commit
Nov 2026
License
MIT
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
Find callers of a function; Assess the impact of a diff; Link documentation to code

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 Codebase Memory does

  • Code knowledge graph

    Persistent graph of symbols, calls and dependencies.

  • Multiple search modes

    Structural, full-text and local semantic search.

  • Documentation links

    Indexes Markdown, reStructuredText, AsciiDoc and ADRs.

  • Infrastructure tracing

    Connects Docker, Kubernetes, Terraform and CI to source.

  • Change impact

    Maps a diff to affected symbols and related tests.

  • Native CLI

    Query the same graph from the command line.

Code-Graph-RAG vs Codebase Memory: questions

Is Code-Graph-RAG or Codebase Memory cheaper?

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

What is the difference between Code-Graph-RAG and Codebase Memory?

Code-Graph-RAG is an open-source MCP server for knowledge and memory. Codebase Memory is an open-source MCP server for knowledge and memory.