Control what your AI can see. LeanCTX (Lean Context) is the context intelligence layer for AI agents — one local Rust binary that decides what they read, remembers what they learn, guards what they touch, and proves what they save. 60–90% fewer tokens as the receipt. 76 MCP tools, 30+ agents, local-first.
README
The Cognitive Context Layer for AI coding agents
Your AI coding agent wastes thousands of tokens rereading files, parsing noisy shell output, and losing context between sessions — and you have no control over any of it.
LeanCTX is the operating system for that context. One local binary that governs every token between your code and the model: it compresses what the AI reads, remembers what matters across sessions, routes each read to the right fidelity, and verifies what comes back. Zero config required. Local-first.
| Problem | With LeanCTX |
|---------|-------------|
| Repeated file reads: ~2000 tokens each | Cached re-reads: ~13 tokens |
| Raw git status: ~800 tokens | Compressed: ~120 tokens |
| Context resets every chat | Session memory persists across chats |
| No visibility into context usage | Real-time dashboard + budget control |