Context Slashing
Transforms megabytes of repetitive compiler errors, lint warnings, and test logs into high-signal summaries, slashing context token consumption by up to 90%.
Project Spotlight
An intelligent Model Context Protocol (MCP) server that runs build, lint, and test suites and compresses massive, noisy diagnostic output into compact, actionable verdicts for AI coding agents.
Transforms megabytes of repetitive compiler errors, lint warnings, and test logs into high-signal summaries, slashing context token consumption by up to 90%.
Isolates root-cause failure excerpts, stack traces, and affected files on disk while keeping raw terminal output out of the agent's context window.
Ships with an automated npx installer supporting Claude Code, Cursor, Codex, Antigravity, and OpenCode across Gateway, OpenRouter, and local LLM backends.
I created Token Optimizer to solve one of the most expensive friction points in agentic coding: context bloat from verbose build and test logs. By acting as an MCP-compliant execution proxy, Token Optimizer intercepts diagnostic commands, stores raw logs locally in the workspace, and returns concise verdicts, regression checks, or failure triage summaries directly to the AI agent.
90%+
Context token savings
5 clients
IDE & agent support
1-cmd
Transactional installer
Token Optimizer is built as a TypeScript Model Context Protocol (MCP) server communicating via JSON-RPC over stdio. Commands execute inside managed child process sandboxes where stdout and stderr streams are buffered and parsed by heuristic pattern matchers. If diagnostic summarization requires deeper semantic reasoning, the server routes condensed excerpts through an LLM triage layer via OpenRouter or local models.
TypeScript, Node.js, Model Context Protocol (MCP) SDK
child_process streaming, Regex diagnostic parsers, Workspace caching
Claude Code, Antigravity, Cursor, Codex, OpenCode, OpenRouter, Local LLMs
The project includes a robust installer package with doctor, repair, and uninstall lifecycle commands that detect installed developer tools and safely write MCP configuration files. Strict TypeScript typing across MCP tool schemas ensures reliable tool calling and seamless integration with modern agent runtimes.
Token Optimizer significantly reduces API token costs and prevents model context saturation during complex pair-programming workflows. By keeping terminal logs off the model's wire and presenting structured verdicts, coding agents resolve bugs faster and with greater accuracy.
Install Token Optimizer in your coding agent, explore the tools, or check out the open-source GitHub repository. https://github.com/lefos13/token-optimizer.