yvgude/lean-ctx
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. observed · 2026-08-28
Health v2 · maintenance only
77/100
- Activity 99
- Release rhythm 87
- Longevity 11
Flags: young
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 163
- days_rel: 7
- days_push: 7
- n_releases_24m: 246
Adoption not part of the score
3656 stars · 332 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
LeanCTX is a local-first Rust binary that acts as a context engineering layer for AI coding agents, providing an MCP server, shell output compression hooks, and persistent project memory. It compresses file reads and command output via tree-sitter AST analysis and caching, claiming 60-90% token savings, and works with 30+ agents like Cursor, Claude Code, and Copilot.
Use cases
- reduce token costs when using AI coding agents
- compress file reads and shell output sent to LLMs
- persist agent memory and decisions across chat sessions
- coordinate multiple AI agents with shared context
- monitor and benchmark AI agent token usage
- set up an MCP server for coding assistants
- avoid agents re-reading the same files every session
When to choose
- you use AI coding agents daily and want to cut LLM token spend
- your agent re-reads files and re-runs commands repeatedly each session
- you want local-first, offline context tooling where code never leaves your machine
- you need cross-session memory and multi-agent coordination for coding workflows
When to avoid
- you need a fully lossless view of all tool output by default (compression is lossy in aggressive modes)
- you rely on agents or tooling outside its supported 30+ agent integrations
- you want a hosted or cloud-managed context solution without self-hosting anything
- your workflow is simple enough that token costs are not a concern
Facets
cli-tool · maturity active
mcp caching compression developer-tools cli monitoring agent-framework developer-tools large-language-models windows cli rust cross-platform context-engineering token-optimization mcp-server ai-coding-agents prompt-compression local-first session-memory tree-sitter cost-reduction ai-agents command-line automation macos linux
10 sources
- readme: https://github.com/yvgude/lean-ctx · fetched 2026-08-28 · bee195f96959
- homepage: https://leanctx.com · fetched 2026-08-29 · a0f30a17c82e
- site_page: https://leanctx.com/docs/getting-started · fetched 2026-08-29 · 9812eb7f10d3
- site_page: https://leanctx.com/docs/concepts/read-modes · fetched 2026-08-29 · 01518e0c9c94
- site_page: https://leanctx.com/docs/concepts/token-savings · fetched 2026-08-29 · ffdba3fad038
- site_page: https://leanctx.com/docs/tools/memory · fetched 2026-08-29 · fbe8e52c7aeb
- site_page: https://leanctx.com/docs/tools/session · fetched 2026-08-29 · abba8fbb32c0
- site_page: https://leanctx.com/docs/changelog · fetched 2026-08-29 · 089d5957ee91
- site_page: https://leanctx.com/pricing · fetched 2026-08-29 · df9d290522ae
- site_page: https://leanctx.com/metrics · fetched 2026-08-29 · 35daa59bb79b
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| yvgude/lean-ctx | main | 77 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem