lean-ctx
LeanCTX is the Context Gateway for AI Systems. Select task-relevant context, apply supported controls, connect local knowledge and inspect recorded evidence. Open-source Engine: CLI, MCP, hooks and supported proxy paths.
- 3.9k stars
- 357 forks
- 16 open issues
- Language: Rust
- License: Apache-2.0
- updated
Install
git clone https://github.com/yvgude/lean-ctx{
"mcpServers": {
"lean-ctx": {
"command": "lean-ctx"
}
}
}{
"mcpServers": {
"lean-ctx": {
"command": "lean-ctx"
}
}
}- Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
- Replace any <placeholder> values with your API keys or paths.
- Restart Claude. The MCP server and its tools appear automatically.
Install the binary first: cargo install lean-ctx (or build from https://github.com/yvgude/lean-ctx).
Editor's note
LeanCTX is a Rust-based MCP server that sits between AI coding agents and a codebase to compress, cache, and govern the tokens flowing into the model's context window. It exposes over 30 tools covering file reads in a "map mode" that strips noise to roughly 13 tokens per cached re-read (compared to around 2,000 for a raw read), shell output compression that shrinks a typical `git status` from about 800 tokens to 120, cross-session memory that persists context between chats, and a real-time `lean-ctx gain` dashboard showing token and dollar savings live. The binary installs via a single `lean-ctx setup` command and connects to Claude Code as well as Cursor, Copilot, Windsurf, and Gemini CLI with no additional configuration. Developers paying Claude API costs directly, or teams running long agentic coding sessions where repeated file reads and verbose shell output erode the usable context window, are the primary audience. The project claims 60 to 90 percent fewer tokens consumed overall, backed by reproducible benchmark reports generated from VHS tapes included in the repository.
MCP Servers overview
What people ask about lean-ctx
What is yvgude/lean-ctx?
yvgude/lean-ctx is mcp servers for the Claude AI ecosystem. LeanCTX is the Context Gateway for AI Systems. Select task-relevant context, apply supported controls, connect local knowledge and inspect recorded evidence. Open-source Engine: CLI, MCP, hooks and supported proxy paths. It has 3.9k GitHub stars and its last recorded update is dated 2026-10-23.
How do I install lean-ctx?
You can install lean-ctx by cloning the repository (https://github.com/yvgude/lean-ctx) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is yvgude/lean-ctx safe to use?
Our security agent has analyzed yvgude/lean-ctx and assigned a Trust Score of 97/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.
Who maintains yvgude/lean-ctx?
yvgude/lean-ctx is maintained by yvgude. The last recorded GitHub activity is dated 2026-10-23, with 16 open issues.
Are there alternatives to lean-ctx?
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.