<< Home | Work
60-80% reduction in API token costs
| Area | Work |
| AI used | LeanCTX |
| Source | r/AIToolsPromptWorkflow |
| Posted | 2026-05-03 |
The move
Install a local MCP server to cache file content and compress tool outputs before they reach your AI editor.Steps
- Install LeanCTX via curl or cargo.
- Run the 'lean-ctx setup' command to configure your editor.
- Connect your editor to the local MCP server.
- Monitor token savings via the live dashboard.
Prompt for your AI
Analyze my current project structure and identify redundant file reads or overly verbose command outputs that I can optimize for my AI coding assistant.
What happened
The user noticed their AI coding tools were wasting tokens by repeatedly reading the same files and verbose git diffs. They built LeanCTX, a local MCP server that caches file fingerprints and compresses command outputs. This tool reduced their daily token usage by 60-80% while maintaining context across coding sessions.Watch out
Requires local installation of a binary and manual configuration of your editor's MCP settings.Give it to your agent
Read https://howtheyuse.ai/p/60-80-reduction-in-api-token-costs.md and help me do this.