codebase-memory-mcp logo
codebase-memory-mcp
★ 47.7k
vs
mex logo
mex
★ 1.8k

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.

Editorial Head-to-Head Analysis

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.

01

TL;DR

codebase-memory-mcp logo
codebase-memory-mcpMemory & Context · ★ 47.7k
When to choose:
  • 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.
When to skip:
  • 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.
mex logo
mexMemory & Context · ★ 1.8k
When to choose:
  • 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.
When to skip:
  • 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.
02

Side-by-Side Comparison

Field
codebase-memory-mcp logocodebase-memory-mcp
mex logomex
Category
Memory & Context
Memory & Context
Stars
★ 47.7k
★ 1.8k
License
MIT
MIT
Install Command
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
npx mex-agent setup
Updated
1d ago
1d ago
Open Source
Yes
Yes
Tags
knowledge-graph, codebase-analysis, AI-assistant-tools
AI Agents, Persistent Memory, Context Management
03

Features

codebase-memory-mcp logocodebase-memory-mcp
01Indexes a codebase into a persistent knowledge graph using tree-sitter, with semantic type resolution for several major languages
02Supports 150+ languages with grammars compiled into a single static binary
0317 MCP tools: search, call tracing, architecture overview, impact analysis, dead code detection, Cypher queries and more
04Indexes infrastructure-as-code such as Dockerfiles and Kubernetes manifests
05Built-in 3D graph visualisation served locally
mex logomex
01Creates a structured markdown scaffold for AI agent memory (e.g., AGENTS.md, ROUTER.md, context/, patterns/).
02CLI tools for drift detection, validating scaffold against the actual codebase without using AI tokens.
03Automatically generates targeted prompts for AI agents to fix stale or broken context.
04Supports task-specific context routing, loading only relevant files for the current task.
05Includes an append-only event log to store decisions, notes, risks, and todos.
04

Use Cases

codebase-memory-mcp logocodebase-memory-mcp
↳Code exploration and understanding: Quickly understand codebase architecture, find functions, and trace call paths without high token costs.
↳Impact analysis and refactoring: Map git diffs to affected symbols, detect dead code, and analyze function fan-out to aid refactoring efforts.
↳AI assistant integration: Enhance AI assistants like Claude Code with precise structural queries for more effective code-related questions.
↳Architecture Decision Records management: Store, update, and retrieve architectural decisions directly within the codebase context.
↳Automated scripting and CI/CD: Utilize CLI mode for single-shot graph operations in scripts or CI/CD pipelines.
mex logomex
↳Maintaining consistent project context for AI coding agents across multiple sessions.
↳Significantly reducing token consumption in LLM interactions by providing only relevant context.
↳Onboarding new AI agents or developers to complex codebases with structured, up-to-date project knowledge.
↳Developing persistent AI agents for operational environments (homelab scenarios, system administration) with structured memory.
↳Automating the detection and correction of documentation or contextual drift from the actual codebase.
05

Best For

codebase-memory-mcp logocodebase-memory-mcp
Most Popular
mex logomex
EssentialTrending
FAQ

FAQ

What is the difference between codebase-memory-mcp and mex?
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.
Which is better, codebase-memory-mcp or mex?
The best choice depends on your use case. Choose codebase-memory-mcp if Code exploration and understanding: Quickly understand codebase architecture, find functions, and trace call paths without high token costs., and mex if Maintaining consistent project context for AI coding agents across multiple sessions..
Is codebase-memory-mcp free or open source?
Yes, codebase-memory-mcp is open source on GitHub (MIT).
Is mex free or open source?
Yes, mex is open source on GitHub (MIT).
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
→

Related