token-optimizer-mcp

91.5% fewer tokens on tool output on Headroom's own benchmark, where Headroom removes 61.4%. Separately, the same SWE-bench tasks resolved at 0.71x the cost of

What is token-optimizer-mcp?

91.5% fewer tokens on tool output on Headroom's own benchmark, where Headroom removes 61.4%. Separately, the same SWE-bench tasks resolved at 0.71x the cost of plain Claude Code. Plus memory across sessions and subscription quota pacing. Claude Code, Codex, Copilot, Gemini and 12 more. Local, MIT.

Overview of token-optimizer-mcp

What it is

Token Optimizer MCP is an open-source tool that reduces token usage from AI coding agents by up to 91.5% on tool output. It works as a plugin, proxy, and MCP server for 16 clients including Claude Code, Codex, Copilot, Gemini, and Cursor. Everything runs locally with no account or hosted service required; telemetry is off unless explicitly opted in twice. On SWE-bench Verified, Claude Code with the plugin in default mode solved the same tasks at 0.71× the cost (7 of 7 resolved in both arms; across nine runs, 84 tasks resolved without the plugin and 83 with it). The project is licensed under MIT.

Key features

  • Stops expensive calls before they happen by routing oversized reads, greps, or searches to cached, bounded replacements or refusing them in enforce mode.
  • Remembers agent findings across sessions via a per-project knowledge graph that collects decisions and dead ends as a side effect of normal work.
  • Compresses unavoidable tool output, logs, JSON, and search results with prompt cache optimization (providers bill cached prefix at 0.1× and rewritten at 1.25×).
  • Measures its own savings and reports when it is losing, with savings recorded before and after and attributed per client and per operation.
  • Works across 16 clients: ten can have wasteful calls refused; six get always-on routing rules.
  • Provides a local dashboard with one ledger for every agent, every saving, and what the optimizer itself cost.

Use cases

Reducing token costs for AI coding agents in software development workflows. Suitable for teams using Claude Code, Codex, Copilot CLI, Gemini CLI, Cursor, or any of the 16 supported clients who want to lower API spending without sacrificing task completion rates. Also useful for maintaining context across sessions through the knowledge graph feature.

Getting started

Claude Code. Install the plugin rather than the bare MCP server:text/plugin marketplace add ooples/token-optimizer-mcp/plugin install token-optimizer@token-optimizer/reload-pluginsRequires Node.js 22.14 or later on Claude Code's PATH, and Claude Code 2.1.139 or later. Then check it works:bashnpx token-optimizer-doctorCodex, Copilot CLI, Gemini CLI, Cursor and the rest. Every client runs the same server:textnpx -y @ooples/token-optimizer-mcp@latestReady-made configuration for each client is in src/integrations/, and docs/INSTALLATION.md walks through all sixteen.

License and pricing

License: MIT. Pricing: open source (free).

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/ooplestoken-optimizer-mcp.svg)](https://yunodb.com/tools/ooplestoken-optimizer-mcp?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/ooplestoken-optimizer-mcp?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/ooplestoken-optimizer-mcp.svg" alt="Featured on YunoDB" height="20"></a>