codebase-memory-mcp vs mex
codebase-memory-mcp: codebase-memory-mcp is a structural analysis backend that indexes codebases into a persistent knowledge graph, drastically reducing token usage for code exploration by providing precise structural results. It integrates with AI assistants like Claude Code, offering advanced capabilities such as call graph tracing, architecture overviews, and dead code detection.; mex: mex provides persistent, navigable project memory for AI coding agents, allowing every session to start with the right context instead of a cold prompt. It structures agent memory through a markdown scaffold, offers CLI tools for drift detection against the real codebase, and synchronizes context to keep agents aligned and reduce token usage.
mex is hand-curated, human-readable project knowledge such as decisions and conventions. Codebase Memory builds a code graph automatically from your source. They answer different questions and can be combined.
TL;DR
- Your agent burns tokens searching a medium or large codebase: one graph query replaces many grep and read steps, according to the README.
- You want everything local: a single static binary with no runtime dependencies or API keys.
- You work in many languages and with several coding agents, which the installer configures automatically.
- You do not want an installer to edit your agents' config files and add hooks; the README offers --skip-config to install only the binary.
- You need project decisions and conventions rather than code structure; a scaffold such as mex is closer.
- You are cautious about unsigned binaries: some antivirus engines have flagged the release, which the project documents as a false positive.
- Your AGENTS.md or CLAUDE.md has grown too big and you want a small anchor plus routed context files.
- You want memory as plain markdown in the repo, reviewable in pull requests and diffable.
- You want drift checks that run without AI tokens and flag missing paths, stale files and broken scripts.
- You want recall across unrelated projects or conversations; mex lives inside one repository.
- You have a small project: another set of files to maintain may cost more than it saves.
- You expect the AST code-graph feature today: the README marks it as an unreleased preview.
Side-by-Side Comparison
Features
Use Cases
Best For
FAQ
Deploy on DigitalOcean
Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.