L

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.

  • UnverifiedWe have not yet confirmed this server installs or runs.
  • Health: Not checked yetWe have not completed a health check for this listing yet.No health check has run yet.
  • Developer Tools
  • 3.9kstars
  • No ratings User RatingsBe the first to rate and review this MCP server!
  • UpdatedOct 29, 2026
  • Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.

Install Lean Ctx

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself β€” its README, its docs, or a verified owner. We haven’t found those for lean-ctx, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

Security & health

What it can reach and how reliably it runs β€” from our own checks, not the maintainer’s claims.

Not checked yetNo health check has run yet.

We have not completed a health check for this listing yet.

From the project README

β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘        β–ˆβ–ˆβ•‘    β•šβ–ˆβ–ˆβ–ˆβ•”β•
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•‘        β–ˆβ–ˆβ•‘    β–ˆβ–ˆβ•”β–ˆβ–ˆβ•—
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘    β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•—
β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•  β•šβ•β•β•β•     β•šβ•β•β•β•β•β•   β•šβ•β•   β•šβ•β•  β•šβ•β•

LeanCTX

Context Gateway for AI Systems.

Control what your AI can see.

LeanCTX sits between AI tools and the information they read. It selects task-relevant context, applies supported access and content controls before delivery, and records the context operations and delivery evidence it can observe. Your application, agent loop and model stay yours.

The open-source LeanCTX Engine runs locally through CLI, MCP, hooks and proxy paths. The LeanCTX SDK embeds supported Engine capabilities in your application.


GitHub StarsΒ Β  CI Security crates.io Downloads npm AUR Mixed license Discord X/Twitter Configurable telemetry

WebsiteΒ Β Β·Β Β DocsΒ Β Β·Β Β InstallΒ Β Β·Β Β ScenariosΒ Β Β·Β Β DemoΒ Β Β·Β Β BenchmarksΒ Β Β·Β Β CookbookΒ Β Β·Β Β SecurityΒ Β Β·Β Β Changelog


Where it sits

text
Files Β· repositories Β· tool results Β· configured providers
                          β”‚
                          β–Ό
                LeanCTX Context Gateway
             Select Β· Control Β· Learn Β· Prove
                          β”‚
                          β–Ό
                Your AI application / agent
                          β”‚
                          β–Ό
                     Your model
  • Select: give AI the context the task needs, with search, structural views, compression and reuse.
  • Control: apply configured path permissions, content filters and context budgets to supported calls.
  • Learn: retain local task records and connect code and knowledge across sessions, within the configured access and retention rules.
  • Prove: inspect source references, policy decisions and usage evidence. A context-only integration records its prepared result; the host owns the subsequent model call.

For coding workflows, start with Claude Code, Cursor or Codex. The installation matrix distinguishes first-class paths from other compatibility references.

Your workStart here
Improve the context path of existing AI toolsCommunity setup
Apply shared context controls across an organizationEnterprise β€” licensed controls and deployment scope
Build context control into your applicationLeanCTX SDK β€” stable interfaces and separate SDK/OEM terms

What is LeanCTX? Β· Where LeanCTX fits Β· Architecture

See it in action:

Map-mode file read + compressed git output demo
Read + Shell
Map-mode reads + compressed CLI output
lean-ctx gain terminal summary demo
Gain (terminal)
Token usage + estimated cost differences
lean-ctx benchmark report demo
Benchmark measurement
Measure compression by language + mode

All GIFs are generated from reproducible VHS tapes in demo/.

Why developers use LeanCTX

  • Focused input β€” use less of the context window for repeated reads and noisy output.
  • Configured controls β€” bound file access and filter supported results before delivery.
  • Continuity β€” retain local task, finding and decision records across sessions.
  • Existing tools β€” configure a supported integration with lean-ctx setup.
  • Inspectable usage β€” separate token estimates, provider observations and calculated costs.
  • Model choice β€” keep your own model calls and application workflow.

Find LeanCTX useful? Give it a star β€” it helps others find the Context Gateway for AI systems.


Inside the LeanCTX Engine

The Engine puts Select, Control, Learn and Prove into the context paths of your existing AI tools. Your host keeps control of the task, agent loop and model.

1. Select β€” the context each task needs

Search and structural views help an agent find relevant information before reading entire files. Supported read and shell paths can return focused views of files and command output, with references for recovering detail.

  • File reads: 16 read modes (full, map, signatures, diff, lines:N-M, density:X, …) β€” eligible cached re-reads return a compact reference instead of repeating content
  • Target density (density:0.4): SDE-style budget compression β€” keeps the highest-entropy lines until ~40% of the original tokens remain, deterministic
  • JIT disclosure: signatures carries line spans and points at lines:N-M for targeted expansion β€” outline first, bodies on demand
  • Shell output: 85+ shell-output patterns compress git, npm, cargo, docker, kubectl, terraform and more (250+ passthrough rules)
  • Tree-sitter AST: structural understanding for 27 languages β€” not just text compression
  • Source recovery (CCR): supported compact views retain source or archive references for expansion through ctx_expand or the reference API. Recovery depends on permissions, retention and the source remaining available. Read modes and detail β†’

2. Control β€” configured rules on supported paths

  • PathJail and roles: constrain tool filesystem access to the configured scope.
  • Content filters: configured detectors can warn, redact or block on supported paths. Detection coverage and enforcement depend on the integration and settings.
  • Context budgets: bound selected input and supported tool output.
  • Host-owned model choice: the host chooses the model and performs any model calls outside the Engine's observed path.

Review the security policy for defaults, supported controls and coverage limits. A filesystem boundary is not an operating-system sandbox.

3. Learn β€” connect work across sessions

Keep useful task records and discover relationships between code and local knowledge. Learning here means context continuity; it does not train your model.

  • Session memory (CCP): persist task/facts/decisions across chats β€” structured recovery queries survive compaction
  • Knowledge graph: temporal facts with validity windows, episodic + procedural memory
  • Property Graph: multi-edge code graph (imports, calls, exports, type_ref) powers impact analysis and search ranking
  • Permission-bound reuse: access and retention rules still apply when stored context is retrieved. Experimental .ctxpkg export is described under Research below.

4. Prove β€” inspect what the Engine recorded

Inspect source references, recorded policy decisions and delivery evidence from supported paths. lean-ctx inspect explains observed context operations. A context-only integration records its prepared result; it cannot prove a later model call made by the host.

Reviews

No reviews yet β€” be the first to share how it worked for you.

Frequently Asked Questions about Lean Ctx

We don't have a confirmed install command for lean-ctx yet, so we don't publish a generated one β€” a guessed package name would point at the wrong package or none at all. Follow the project's own README or setup instructions (https://github.com/yvgude/lean-ctx) for the current steps.

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.

We don't have confirmed pricing for lean-ctx. Listing it on AllMCPs is free, but that says nothing about what the server itself costs β€” check the project's own site for current pricing.

Related MCP servers

Add a badge to your READMEShow it’s listed β€” live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLean Ctx AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/lean-ctx?style=directory)](https://allmcps.com/mcp/lean-ctx)
HTML Embed
<a href="https://allmcps.com/mcp/lean-ctx"><img src="https://allmcps.com/api/badge/lean-ctx?style=directory" alt="Lean Ctx on AllMCPs" /></a>