Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”“ No API keyProgramming

Token Optimizer MCP

Lets your AI agent cut token use with caching, compression and smart file tools, and measure the savings per agent.

570 stars on GitHubby ooplesLicense MITUpdated 19 days ago

How to install

This MCP is local: it runs on your computer.

It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Code…). Choose your app:

Paste in the terminal:

claude mcp add token-optimizer -- npx -y @ooples/token-optimizer-mcp

What to fill in

NameWhat it isRequired
TOKEN_OPTIMIZER_CACHE_DIRDirectory path for cache storage (optional, defaults to ~/.token-optimizer-cache)No

Ready! Now test it

Restart the app and paste one of these requests in the chat:

Show me how many tokens I saved this week per agent.
Compress this large log before you read it.

What it is

Token Optimizer MCP compresses what goes into the model's context window and measures the saving. The readme says it optimizes the bill, taking prompt caching prices into account, and ships a benchmark so you can check it. It also keeps a local knowledge graph shared across 16 command-line clients.

What it can do

  • Caching of repeated content
  • Compression of large tool output
  • Smart file tools
  • A local ledger of tokens saved per agent
  • A live local knowledge graph shared across clients
  • A proxy that moves large blocks out to files

When to use

  • β€ΊWhen you want to see how many tokens each coding agent is using and saving
  • β€ΊWhen you want to compress big logs and file reads before they reach the model
  • β€ΊWhen you want several agents to share the same local knowledge graph

What you need

Node.js and the npm package @ooples/token-optimizer-mcp.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

Frequently asked questions

Is it free and open source?

The readme shows a license badge and an npm package; no price is mentioned.

How much does it save?

The registry says 60 to 90 percent. The readme gives per-workload figures from its own benchmark.

Can I check the claims?

Yes. The readme says it ships the benchmark and commands to reproduce the tables.

Which clients does it work with?

The description names 16 CLI clients for the shared knowledge graph; the list is not in the part provided.

Does it compare itself to other tools?

Yes. The readme compares it with another compression tool, called Alternative A, on that tool's own fixtures.

Does it need an account?

The readme does not mention one.

If it does not work

  • β€ΊCheck that Node.js is installed and recent enough.
  • β€ΊRestart your MCP client fully after adding the server.
  • β€ΊCheck the npm package name is @ooples/token-optimizer-mcp.

5 new skills a week. 1 minute to read.