morluto/leantoken
Code intelligence for agents: find the code that matters and keep your context window and tokens lean.
LeanToken gives agents focused code intelligence so they find the code that matters while keeping context and tokens lean. In a controlled 60-run study it used 20.1% fewer model input tokens than built-in tools with limited exploration and 37.6% fewer with broad exploration. Agents start with leantoken.context while keeping their normal tools, and npx leantoken doctor verifies the connection and first retrieval.
Install
npx leantoken setupLeanToken is an MCP code-intelligence server (MCP registry name io.github.morluto/leantoken) that sets up for Claude Code, Cursor, OpenCode, Codex, Gemini CLI, and Antigravity; in DSH, wire it as an MCP server. The setup wizard detects supported clients, shows exact config paths, and requires a separate final confirmation; verify with npx leantoken doctor. Newer releases refuse stale local installs and point to npx leantoken@latest setup.
Compatibility
MCP-based code intelligence usable from any MCP host including DeepSeek Harness. Setup never stores the repository path globally, uses workspace-relative working directories, and refuses to index home-directory or filesystem-root starts by default.
Details
- Repo: morluto/leantoken
- Category: Coding & Development
- Stars: 21
- Version: npm leantoken; Rust 1.95+
- Last push: 2026-09-21
- First seen: 2026-07-15
Recent updates
The current README documents the interactive setup wizard with detection and confirmation, version-pinned npx setup, doctor verification, broad-root refusal, and the measurement methodology behind the token-savings numbers.
FAQ
- Which clients does LeanToken support?
- The README lists Claude Code, Cursor, OpenCode, Codex, Gemini CLI, and Antigravity; it is an MCP server, so any MCP host such as DSH can wire it in.
- How do I verify the setup?
- Restart the configured clients and run npx leantoken doctor, which checks the connection and a first retrieval from the repository.
- Does setup index my whole machine?
- No. Global setup never stores the setup repository, workspaces are workspace-relative, and starting from the home directory or a filesystem root is refused by default.
Alternatives
SepineTam/mcp-for-stata · zh667/TokenLedger · Han-1413141/dsh-cost-meter