claude-mem logo
claude-mem
★ 119.6k
vs
lean-ctx logo
lean-ctx
★ 4.0k

claude-mem vs lean-ctx

claude-mem: Claude-Mem captures supported agent activity through hooks and summarizes it with an observer. Local SQLite records and semantic search supply a compact project index to later sessions, with capture support varying by agent.; 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

claude-mem logo
claude-memMemory & Context · ★ 119.6k

Recover project context in a later coding session.

lean-ctx logo
lean-ctxMemory & Context · ★ 4.0k

Reducing token costs for Claude Code, Cursor, and Copilot

02

Side-by-Side Comparison

Field
claude-mem logoclaude-mem
lean-ctx logolean-ctx
Category
Memory & Context
Memory & Context
Stars
★ 119.6k
★ 4.0k
License
Apache-2.0
MIT
Install Command
npx claude-mem install
curl -fsSL https://leanctx.com/install.sh | sh && lean-ctx setup && lean-ctx doctor
Updated
1d ago
2d ago
Open Source
Yes
Yes
Tags
ai, ai-agents, ai-memory
agentic-coding, ai, ai-coding
03

Features

claude-mem logoclaude-mem
01Hooks feed tool activity to a local worker.
02Observer-generated observations and summaries persist locally.
03MCP search retrieves details behind compact context indexes.
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

claude-mem logoclaude-mem
↳Recover project context in a later coding session.
↳Search past observations when a task needs details.
↳Share selected memory across supported agent integrations.
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

claude-mem logoclaude-mem
Most Popular
lean-ctx logolean-ctx
—
FAQ

FAQ

What is the difference between claude-mem and lean-ctx?
Both claude-mem and lean-ctx are in the Memory & Context category. claude-mem has 119.6k stars, while lean-ctx has 4.0k stars.
Which is better, claude-mem or lean-ctx?
The best choice depends on your use case. Choose claude-mem if Recover project context in a later coding session., and lean-ctx if Reducing token costs for Claude Code, Cursor, and Copilot.
Is claude-mem free or open source?
Yes, claude-mem is open source on GitHub (Apache-2.0).
Is lean-ctx free or open source?
Yes, lean-ctx 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