Skip to content

Codebase Memory vs Compartment

Codebase Memory is an open-source MCP server for knowledge and memory. Compartment is a free MCP server for knowledge and memory.

  • Codebase Memory is best for find callers of a function.
  • Compartment is best for keep decisions and preferences across sessions and projects.
What it is
Codebase Memory is an open-source MCP server for knowledge and memory.
Compartment is a free MCP server for knowledge and memory.
Best for
Find callers of a function
Keep decisions and preferences across sessions and projects
Kind
MCP server
MCP server
Pricing
Open source
Free
Platforms
CLI, macOS, Linux, Windows, self-hosted
macOS, Windows, Linux, CLI, self-hosted
Runs
Locally
Locally
GitHub stars
48.7K
Last commit
Nov 2026
License
MIT
Open source
Good for
Find callers of a function; Assess the impact of a diff; Link documentation to code
Keep decisions and preferences across sessions and projects; Share one memory between several coding agents on the same machine; Store sensitive context without sending it to a cloud service

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.

What Compartment does

  • Encrypted vault

    One encrypted file on your machine, with embedding vectors encrypted too.

  • Offline by design

    No API key, account, network use or telemetry; the project says this is enforced in CI.

  • Hybrid recall

    Vector and keyword search over an in-memory index.

  • One claim per memory

    Length and format limits keep memories short and searchable.

  • Expiry and replacement

    Memories can expire, and a new preference supersedes the old one.

  • Agent integration

    Commands wire Claude Code, Claude Desktop, Hermes Agent, OpenClaw, AntiGravity and Codex.

Codebase Memory vs Compartment: questions

Is Codebase Memory or Compartment cheaper?

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

What is the difference between Codebase Memory and Compartment?

Codebase Memory is an open-source MCP server for knowledge and memory. Compartment is a free MCP server for knowledge and memory.