Debuly
LeanCTX logo

LeanCTX

Open-source context gateway that trims what AI coding tools read, caches repeat reads and logs what each agent was given.

Freemium

What is LeanCTX?

LeanCTX is a context gateway for AI systems that sits between your coding agents and the files, commands and search results they consume. The Apache-licensed Engine runs locally and exposes ten MCP tools plus a command-line interface, so an agent can read files in several compressed modes, list project structure compactly, run shell commands with trimmed output and search code without loading whole files. Session-aware caching means a file already sent is not sent again, and the Engine also keeps memory, usage receipts and recovery data. A hosted tier adds personal sync, and a team server shares one index, role-based tokens, per-role budgets and an audit log across developers and CI agents. Enterprise adds identity, policy and reporting, and an SDK is offered for embedding. The Community plan is free, Pro costs $9 per month, and Team costs $29 per month per seat.

Use cases

  • Cut token use in AI coding sessions
  • Compress shell output before it reaches a model
  • Share one code index across a dev team
  • Cap AI spend with per-role token budgets
  • Audit what agents read in your repos
  • Search a codebase without reading whole files

Who it's for

  • Developers using AI agents
  • Engineering teams
  • Platform and security teams
  • Enterprise IT

Why use LeanCTX

  • Re-reading a file that is already cached costs about 13 tokens, which keeps long agent sessions from paying for the same code twice.
  • The Community plan works locally with no account, so you can try it before paying for sync or team features.
  • A shared team server lets every developer and CI agent query one index instead of each rebuilding its own.
  • Role-based tokens, budgets and an append-only audit log make AI spend and file access something you can show to others.
  • Your own models and tools stay in place, since it only manages the context between them.

LeanCTX features

  • ctx_read with six read modes and line ranges
  • Cache hits for files already read in a session
  • Tree-sitter signature extraction for 14 languages
  • Shell output compression with 75+ patterns
  • Compact directory trees and token-light code search
  • Context checkpoints for long conversations
  • Benchmarking and entropy analysis of files
  • Terminal dashboard of lifetime token savings
  • Team server with role-scoped tokens and audit log
  • Per-role token budgets

LeanCTX integrations

  • MCP
  • Git
  • Docker
  • npm
  • Cargo
  • Terraform
  • OIDC
  • SCIM

How to get started with LeanCTX

  1. Install LeanCTX and run the init command, with the global option if you want shell aliases for tools such as git, npm and docker.
  2. Point your MCP client at LeanCTX so the agent calls its read, search, tree and shell tools instead of raw file and command access.
  3. Choose a read mode per task, from full content with caching to signatures, maps or changed lines only.
  4. Check savings with the metrics and gain commands, then add Pro sync or a Team server if you need shared context.

LeanCTX limitations

  • Team plan is for 1 to 25 seats
  • Model and infrastructure costs are billed separately from LeanCTX
  • SDK embedding and OEM use need a separate signed agreement
  • Enterprise scope depends on the licensed release and a written agreement

LeanCTX pricing

Yes, LeanCTX has a free plan. Paid plans start at $9 per month, according to the official pricing page on .

LeanCTX plans

  • Community

    $0

    Free, forever

    • Sources, search and every read mode
    • Local safety, reference routing and budgets
    • Cache, memory, receipts and recovery
  • Pro

    $9/month

    or $90 per year

    • Personal Cloud sync and backup
    • 1 GB hosted index
    • All Community features
  • Team

    $29/month per seat

    or $290 per year per seat

    • Hosted team server, shared workspace
    • Role-based access, OIDC single sign-on, audit log
    • 20 GB shared hosted index
    • 1 to 25 seats
  • Enterprise

    Custom

    Annual agreement

    • Organization identity, roles and access controls
    • Shared policy, approvals, audit and reporting
    • Deployment, recovery and operating support

Plans as listed on the official pricing page on . Prices can change and may vary by country or exclude tax. Check the official pricing page.

LeanCTX alternatives

The main LeanCTX alternatives listed on Debuly are Headroom, Helicone, Bifrost, LiteLLM, Portkey and Source Trace. The table compares pricing and platforms; order is A–Z.

LeanCTX compared with its alternatives
ToolPricingStarting pricePlatforms
LeanCTXFreemium$9/moCLI, Self-hosted, API
BifrostOpen source—Self-hosted, CLI, API
HeadroomOpen source—Python, TypeScript, CLI, Docker
HeliconeFreemium$79/moWeb, API, Self-hosted
LiteLLMOpen source—Python, API, Self-hosted, CLI
PortkeyFreemium$49/moWeb, API, Self-hosted
Source TraceFree—VS Code extension, Web
  1. Bifrost

    Open-source AI gateway from Maxim with one OpenAI-compatible API across providers, failover, budgets and an MCP gateway.

  2. Headroom

    Open-source context compression for LLM apps and coding agents that trims tool output, logs, files and RAG results before the model reads them.

  3. Helicone

    Open-source LLM observability and AI gateway that logs requests, tracks cost and latency, and routes to 100+ models through one API.

  4. LiteLLM

    Open-source AI gateway and Python SDK that gives one OpenAI-format API to 100+ LLM providers, with keys, budgets and cost tracking.

  5. Portkey

    AI gateway with observability, guardrails, caching and prompt management for teams running LLM apps in production.

  6. Source Trace

    VS Code extension and team dashboard that measure how much code your AI coding tools write, how much survives to commit, and which models earn their cost.

LeanCTX FAQ

How much does LeanCTX cost?

Community is free forever at $0. Pro costs $9 per month or $90 per year. Team costs $29 monthly or $290 yearly for each seat. Enterprise is sold on an annual agreement. Prices are in USD.

Is there a free LeanCTX plan?

Yes. Community runs the open-source Context Gateway locally with sources, search, every read mode, safety rules, budgets, cache, memory and recovery. No account is needed.

What does the LeanCTX Team plan include?

Team is for 1 to 25 seats. It brings a 20 GB shared hosted index, an audit log, OIDC single sign-on, role-based access, a shared workspace and a hosted team server.

Is LeanCTX open source?

The Engine is Apache-licensed and can run locally. The SDK and Engine artefacts carry separate licences, and embedding or redistribution requires a signed commercial agreement.

Does LeanCTX work with MCP?

Yes. It provides 10 MCP tools along with a command-line interface, so MCP-capable coding agents can call it for reads, search, shell commands and metrics.

What are alternatives to LeanCTX?

Related tools for trimming or governing LLM context and traffic include Headroom, Helicone, Bifrost and LiteLLM.

Sources & verification

Facts on this page come from the official sources below, each with the date we read it. Written by Debuly; the vendor did not review this page.

SourceTypeAccessed
leanctx.comofficial
github.com/yvgude/lean-ctxrepository
leanctx.com/pricing/pricing
leanctx.com/features/official
leanctx.com/teams/official
leanctx.com/enterprise/official

Image credits

  • Logo: from leanctx.com · fetched · Vendor trademark, used only to identify the product; removed on request
  • Cover: none collected yet, so a generated tile is shown.

Spot an error? Report an issue with this listing. We also remove a logo or image on the owner's request.