codebase-memory-mcp logo
codebase-memory-mcp
★ 47.7k
vs
context-mode logo
context-mode
★ 32.5k

codebase-memory-mcp vs context-mode

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.; context-mode: Every tool call in an MCP (Model-Controller-Program) environment dumps raw data into the context window, quickly consuming space and causing the agent to lose track of ongoing tasks. Context Mode is an MCP server that tackles this by sandboxing tool outputs to significantly reduce context usage, tracking session events in SQLite for continuity, and promoting 'think in code' to minimize data processing within the LLM.

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.
context-mode logo
context-modeMemory & Context · ★ 32.5k
When to choose:
  • Your sessions fill up with tool output such as Playwright snapshots, GitHub issue lists or logs.
  • You want work state (edits, git operations, tasks, decisions) to survive context compaction without being dumped back into the window.
  • You use a hook-capable agent, where tool routing happens automatically.
When to skip:
  • You need an OSI open-source licence: it uses the Elastic License 2.0, which restricts uses such as offering it as a managed service.
  • Your sessions are short and rarely hit the context limit.
  • You do not want hooks changing how your agent's tools behave.
02

Side-by-Side Comparison

Field
codebase-memory-mcp logocodebase-memory-mcp
context-mode logocontext-mode
Category
Memory & Context
Memory & Context
Stars
★ 47.7k
★ 32.5k
License
MIT
Elastic License 2.0
Install Command
curl -fsSL https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh | bash
npm install -g context-mode
Updated
1d ago
1d ago
Open Source
Yes
Yes
Tags
knowledge-graph, codebase-analysis, AI-assistant-tools
antigravity, claude, claude-code
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
context-mode logocontext-mode
01Context Saving: Sandbox tools keep raw data out of the context window, achieving up to 98% reduction.
02Session Continuity: Tracks every file edit, git operation, task, and user decision in SQLite for seamless session resume.
03Think in Code: Promotes LLMs to program analysis, not compute it, saving 100x context by logging only results.
04Batch Execution & Search: Run multiple commands/queries in one call with tools like `ctx_batch_execute`.
05Advanced Knowledge Base: Uses SQLite FTS5 with BM25 ranking, smart snippets, and TTL cache for efficient information retrieval.
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.
context-mode logocontext-mode
↳Deep repository research and analysis (e.g., architecture, contributors, issues)
↳Analyze Git history to identify top contributors, commit frequency, and most changed files
↳Efficiently process large JSON APIs, web pages, or logs without flooding the context window
05

Best For

codebase-memory-mcp logocodebase-memory-mcp
Most Popular
context-mode logocontext-mode
Most PopularTrending
FAQ

FAQ

What is the difference between codebase-memory-mcp and context-mode?
Both codebase-memory-mcp and context-mode are in the Memory & Context category. codebase-memory-mcp has 47.7k stars, while context-mode has 32.5k stars.
Which is better, codebase-memory-mcp or context-mode?
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 context-mode if Deep repository research and analysis (e.g., architecture, contributors, issues).
Is codebase-memory-mcp free or open source?
Yes, codebase-memory-mcp is open source on GitHub (MIT).
Is context-mode free or open source?
Yes, context-mode is open source on GitHub (Elastic License 2.0).
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