Token Optimizer MCP is an open-source tool on GitHub, with the repository at https://github.com/ooples/token-optimizer-mcp。其定位是面向 Token optimization for AI coding agents, with the core claim that "what gets compressed is your bill, not the byte count," and it comes with reproducible benchmarks for verification.
Regarding main capabilities and uses, the material describes the tool as focusing on four directions. First, make expensive calls impossible: after installing the plugin, a Read operation that reads a 200 KB file will be rejected, and the rejection message will point to cached, diffed alternative content; the same handling is applied to Grep, Glob, Edit, Write, and cat / head / grep -r executed through the shell. Repeatedly reading a file already read in this session returns only the diff, which is usually the biggest saving point, and no setting needs to be enabled. Second, remember conclusions derived by the agent: maintain a knowledge graph per project, accumulating findings, decisions, and dead ends as a byproduct of work, and feed it back to the agent when it touches related files; carrying one finding costs about 150 tokens, while re-deriving it requires 5k to 50k tokens. Third, publicly self-measure and tell the user when performance is poor: materialized "before/actual return" measurements for MCP progressive disclosure, with subsequent extensions deducted from the same net value; modeled graph replacement and randomized controlled branches for downstream graph effects remain independent. Fourth, the material is truncated at the fourth direction and does not provide the complete content.
Regarding billing and compression mechanisms, the material explains that providers cache prompt prefixes: cached tokens are re-read at 0.1x, and rewritten ones are billed at 1.25x; most compressors optimize only the bytes removed and ignore this multiplier, whereas this tool optimizes the bill. The benchmarks compare against real implementations, on their own fixtures, and report data such as character and token percentages and the number of preserved identifiers. The tool includes two branches, v3-history and v1-frontier: the former also compresses history and matches the other byte for byte; the latter preserves the cached prefix and leads on the bill by 11%–42%.
Regarding configurable options, the material mentions the spillWholeBlockBelow parameter (example set to 0.9), used to move an entire block out of the request only when the engine cannot compress more than 90%, and it is off by default because that tradeoff is real.
Regarding usage, the material mentions using it by installing a plugin, and that the benchmark tables can be reproduced with the commands node bench/compression/proof.mjs and node bench/compression/session-replay.mjs; it involves sharing a live local knowledge graph across 16 CLI clients. The session replay benchmark targets four independent sessions, complete requests including system prompts and tool schemas, and compares against not using the agent. The end-to-end agent task benchmark THOL uses 16 real tasks and reports that 11 of the 16 tasks are cheaper, with a median cost of 0.926x, a median number of turns of 0.671x, and no loss in quality (average score 0.994 vs. 0.994).
The applicable scenario is context and token cost optimization for AI coding agents. Regarding limitations and notes, the material points out that sessions are single runs per task, the aggregate interval still crosses 1.0, and the reliable parts are the per-task statistics and the tied scores; the material also emphasizes in several places that reduced compression does not mean the content is still visible, that a marker is not the content itself, and that reading the content represented by a marker requires an additional request. In addition, the official introduction text is truncated at "4. It ", so the fourth capability and subsequent content are not yet provided; the tool's license, installation prerequisites, supported platforms, and pricing are not yet provided in the material.