AgentIndex icon
AgentIndex
ToolsCategoriesTrendingNewCompare
Submit Tool
Home/
Compare/
codebase-memory-mcp vs lean-ctx
codebase-memory-mcp logo
codebase-memory-mcp
★ 2.8k
vs
lean-ctx logo
lean-ctx
★ 2.3k

codebase-memory-mcp vs lean-ctx

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.; lean-ctx: lean-ctx is an open-source MCP server designed to drastically reduce LLM token costs for AI coding tools like Claude Code, Cursor, and Copilot. It achieves this by transparently compressing CLI output and file context, offering up to 99% savings and making AI coding faster, cheaper, and more effective without changing workflows.

01

TL;DR

codebase-memory-mcp logoChoose codebase-memory-mcp if…

Code exploration and understanding: Quickly understand codebase architecture, find functions, and trace call paths without high token costs.

lean-ctx logoChoose lean-ctx if…

Reducing token costs for Claude Code, Cursor, and Copilot

02

Side-by-Side Comparison

Field
codebase-memory-mcp logocodebase-memory-mcp
lean-ctx logolean-ctx
Category
RAG / Knowledge Base
Observability
Stars
★ 2.8k
★ 2.3k
License
MIT
MIT
Updated
1d ago
1d ago
Open Source
Yes
Yes
Website
↗ Visit
↗ Visit
GitHub
↗ GitHub
↗ GitHub
Tags
knowledge-graph, codebase-analysis, AI-assistant-tools
agentic-coding, ai, ai-coding
03

Features

codebase-memory-mcp logocodebase-memory-mcp
01Supports 35 programming languages: Parses source code in a wide range of languages using tree-sitter.
02Architecture overview: Provides instant codebase orientation by returning languages, packages, entry points, routes, and clusters.
03High token efficiency: Achieves up to 99.2% token reduction for structural queries compared to file-by-file exploration.
04Auto-sync and incremental reindex: Automatically detects file changes and triggers fast, content-hash based incremental re-indexing.
05CLI mode: Allows direct invocation of any MCP tool from the command line without an MCP client.
lean-ctx logolean-ctx
01Transparent shell hook for CLI output compression
02Context server with 28 intelligent tools
03One-command integration for AI coding agents
04Adaptive LLM communication with Cognitive Efficiency Protocol
05Cross-session memory for context continuity
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.
lean-ctx logolean-ctx
↳Reducing token costs for Claude Code, Cursor, and Copilot
↳Optimizing MCP server performance
↳Saving $30-100+ per month on AI coding API costs
05

Best For

codebase-memory-mcp logocodebase-memory-mcp
Hidden GemRAG / Knowledge BaseCode Assistant
lean-ctx logolean-ctx
Hidden GemDev ToolingMemory & Context
FAQ

FAQ

What is the difference between codebase-memory-mcp and lean-ctx?
Both codebase-memory-mcp and lean-ctx are in the RAG / Knowledge Base category. codebase-memory-mcp has 2.8k stars, while lean-ctx has 2.3k stars.
Which is better, codebase-memory-mcp or lean-ctx?
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 lean-ctx if Reducing token costs for Claude Code, Cursor, and Copilot.
Is codebase-memory-mcp free or open source?
Yes, codebase-memory-mcp is open source on GitHub (MIT).
Is lean-ctx free or open source?
Yes, lean-ctx is open source on GitHub (MIT).
→

Related

Alternatives to codebase-memory-mcp →Alternatives to lean-ctx →codebase-memory-mcp details →lean-ctx details →
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
QYSGitHubBuy me a coffee ☕

Browse by Category

Code AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.