Skip to main content
AI Tool Radar
OSI-openCoding agents and context efficiency

LeanCTX

yvgude

Local Rust 'context layer' that compresses file reads and shell output for coding agents over MCP.

3.0k stars(as of 2026-06-26)View on GitHubHomepage

What is LeanCTX?

A single local Rust binary that acts as a context layer between AI coding agents and their environment: it compresses file reads and shell output, caches results, keeps persistent session memory, enforces file-access limits and secret/injection defence, and tracks token budgets on a dashboard. It exposes dozens of MCP tools and connects to 30+ agents over MCP.

Pros & Cons

Pros

  • A single dependency-free Rust binary with broad install and SDK coverage and 30+ MCP-agent compatibility
  • Local-first with explicit security controls (path jail, secret/injection defence, zero telemetry)
  • Very active development (200+ releases) on an Apache-2.0 core

Cons

  • Token-savings percentages and install counts are unverified project claims; the 'provable savings' ledger is self-reported
  • Open-core: some value sits behind paid tiers, so 'open source' needs the local-use asterisk
  • Dozens of tools and read modes are real configuration surface to learn

License

Apache-2.0 (OSI-open)

Apache-2.0 and free for local use forever; some features sit behind paid Builders/Teams/Enterprise tiers (open-core).

When it is interesting

An agent burns context on large file reads and noisy shell output and you want a local, MCP-drop-in compression layer.

When it is too early

If you need independently verified token-reduction numbers, or want everything OSI-open with no commercial tier.

This repo featured in the 2026-07 edition of the Open-Source AI Radar.