A local binary that compresses, remembers, routes, and verifies every token between your code and AI models, saving up to 99% of tokens.
lean-ctx is easy to set up with strong trust signals. Check agent compatibility and use-case fit before adding it to your workflow.
gh repo view yvgude/lean-ctx --webOpen the official README and confirm the supported install method.
Add the server entry to your MCP client config.
Restart your agent and verify that the server tools appear.
LeanCTX is a tool that sits between your code and an AI coding assistant. It reduces the amount of text the AI needs to read by caching and compressing file contents, remembers important context across chat sessions, and gives you control over how much context is used. It works with popular AI coding tools like Cursor, Claude Code, and GitHub Copilot.
LeanCTX is a local-first, zero-configuration binary that acts as a cognitive context layer for AI development. It addresses the problem of wasted tokens in AI coding workflows by compressing repeated file reads (from ~2000 tokens to ~13), compressing noisy shell output (e.g., git status from ~800 to ~120 tokens), and persisting session memory across chats. It provides 63 MCP tools, 10 read modes, a real-time dashboard, and budget control. It integrates seamlessly with Cursor, Claude Code, GitHub Copilot, Windsurf, Codex, and Gemini CLI. The tool is written in Rust, is open-source under Apache-2.0, and has over 2,400 stars on GitHub.
Strong trust signals; still review the README and permissions before production use.
Last commit was about 1 days ago.
2494 GitHub stars indicate community interest.
2 open issues signal maintenance load.
Apache-2.0 license detected.
Reduce token costs when using AI coding assistants by compressing file reads and shell output.
Maintain context across multiple chat sessions with persistent session memory.
Monitor and control context usage with a real-time dashboard and budget limits.
Route different types of queries to appropriate read modes for optimal fidelity and cost.
Integrate with multiple AI coding tools (Cursor, Claude Code, Copilot, etc.) through a single MCP server.
The tool runs locally and does not send data to external servers by default, but opt-in telemetry is available.
As with any MCP server, granting file system access could expose sensitive files if misconfigured.
2,494
Stars
255
Forks
2
Issues
Apache-2.0
License
Local codebase intelligence CLI and MCP server for AI coding agents with change-safety gates and audit evidence.
An offline MCP server that indexes your codebase for semantic search, code search, and git history retrieval.
Official MCP reference servers from Anthropic. Includes servers for filesystem, GitHub, Postgres, Slack, and more.
2 security/trust notes recorded.
Setup difficulty is 2/5.