Cette page est affichée en anglais. Une traduction française est en cours.
MCP ConfigsMay 13, 2026·2 min de lecture

lean-ctx — Context Runtime (MCP + Shell Hook)

lean-ctx is a local-first context runtime (MCP + shell hook) that compresses file reads and CLI output to cut token waste for coding agents.

MCP Hub
MCP Hub · Community
Prêt pour agents

Cet actif peut être lu et installé directement par les agents

TokRepo expose une commande CLI universelle, un contrat d'installation, le metadata JSON, un plan selon l'adaptateur et le contenu raw pour aider les agents à juger l'adaptation, le risque et les prochaines actions.

Native · 94/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Mcp
Installation
Curl
Confiance
Confiance : Established
Point d'entrée
curl -fsSL https://leanctx.com/install.sh | sh
Commande CLI universelle
npx tokrepo install a86dee69-dfc9-5674-9c1d-1c39f807e0f6
Introduction

lean-ctx is a local-first context runtime (MCP + shell hook) that compresses file reads and CLI output to cut token waste for coding agents.

Best for: Developers with shell-heavy AI sessions who want lower token burn

Works with: Rust binary, MCP clients, Cursor/Codex/Claude Code integrations

Setup time: 4-10 minutes

Key facts (verified)

  • GitHub: 1611 stars · 165 forks · pushed 2026-05-13.
  • License: Apache-2.0 · owner avatar + repo URL verified via GitHub API.
  • README-verified entrypoint: curl -fsSL https://leanctx.com/install.sh | sh.

Main

  • Start with lean-ctx setup + doctor to ensure the MCP server and shell hook are actually active for your agent/editor.

  • Use read modes intentionally: map/signatures/diff modes reduce tokens while still giving enough context for refactors.

  • If you share a repo across containers/workspaces, follow the README guidance on repo IDs (.lean-ctx-id) to avoid cache/context collisions.

Source-backed notes

  • README headline claims 60–95% token reduction (up to 99% on cached reads) and lists 59 tools and 10 read modes.
  • README provides a 60-second install flow: install → lean-ctx setuplean-ctx doctorlean-ctx gain --live.
  • README includes a compatibility matrix with agent-specific init commands like lean-ctx init --agent codex and ... --agent claude.

FAQ

  • Is this only an MCP server?: No — README describes both an MCP server and a shell hook that compresses CLI output.
  • Can I disable it quickly?: Yes — README lists an immediate disable command (lean-ctx-off) for the current shell.
  • What’s a safe first workflow?: Run gain --live while doing normal dev tasks to see token savings before changing read modes.
🙏

Source et remerciements

Source: https://github.com/yvgude/lean-ctx > License: Apache-2.0 > GitHub stars: 1611 · forks: 165

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires