Token Optimizer Mcp
Token-cost savings and cache controls for MCP clients, backed by a prompt-compression proxy and usage billing.
- CCM score
- 78 of 100
- GitHub stars
- 595
- tools
- 7
- transport
- STDIO
- env var
- 1
- last updated
- Nov 14, 2026
Own this MCP server? Claim it
What it does
- Routes chat through the proxy with
proxy_chat, applying semantic caching, LLMLingua 2 prompt compression, and model routing automatically - Estimates savings before any paid call with
proxy_predict, and reportsusage_summary,usage_recent, andbilling_statusfor tokens saved and quota - Manages billing and cache with
billing_start_trial(7-day free Pro trial, then $4.99 first month and $11.99 monthly) andcache_flushto force fresh responses - Designed for teams tracking LLM spend, or for anyone who wants to cut token use before calling a model
Tools
7 toolsPublic tool metadata for what this MCP can expose to an agent.
proxy_chatSend a chat completion request through PromptThin's cost-saving proxy. Five optimization routes are applied automatically: (A) semantic cache, (B) prompt compression via LLMLingua 2, (C) model routing to cheaper models, (D) context pruning at 8K tokens, (E) thinking budget cap...4 params
Send a chat completion request through PromptThin's cost-saving proxy. Five optimization routes are applied automatically: (A) semantic cache, (B) prompt compression via LLMLingua 2, (C) model routing to cheaper models, (D) context pruning at 8K tokens, (E) thinking budget cap...
max_tokensintegermessagesarraymodelstringtemperaturenumberproxy_predictEstimate cost savings BEFORE making a real LLM call — completely free, no tokens consumed. Returns original token count, estimated tokens after savings, cost comparison, saving percentage, applicable methods, and a recommendation.3 params
Estimate cost savings BEFORE making a real LLM call — completely free, no tokens consumed. Returns original token count, estimated tokens after savings, cost comparison, saving percentage, applicable methods, and a recommendation.
messagesarraymodelstringproviderstringopenai · anthropic · gemini · groqbilling_start_trialStart a 7-day free Pro trial. Returns a Stripe checkout URL. No charge for 7 days. Pro plan: $4.99 first month, then $11.99/month. 10,000 requests/month. Cancel anytime.1 params
Start a 7-day free Pro trial. Returns a Stripe checkout URL. No charge for 7 days. Pro plan: $4.99 first month, then $11.99/month. 10,000 requests/month. Cancel anytime.
formatstringtext · jsondefault: textusage_summaryRetrieve complete usage summary: total requests, cache hit rate, total tokens saved, estimated cost saved in USD, and requests routed to cheaper models.1 params
Retrieve complete usage summary: total requests, cache hit rate, total tokens saved, estimated cost saved in USD, and requests routed to cheaper models.
formatstringtext · jsondefault: textbilling_statusRetrieve current plan, monthly request limit, requests used this month, remaining requests, and usage percentage. Warns when usage exceeds 80%.1 params
Retrieve current plan, monthly request limit, requests used this month, remaining requests, and usage percentage. Warns when usage exceeds 80%.
formatstringtext · jsondefault: textcache_flushMark all cached responses as stale, forcing fresh LLM calls. Use after updating a knowledge base or changing system prompts.1 params
Mark all cached responses as stale, forcing fresh LLM calls. Use after updating a knowledge base or changing system prompts.
confirmbooleanusage_recentRetrieve recent proxied API requests with timestamp, provider, model, token counts, cache hit status, routing info, and tokens saved.1 params
Retrieve recent proxied API requests with timestamp, provider, model, token counts, cache hit status, routing info, and tokens saved.
limitintegerConfiguration
TOKEN_OPTIMIZER_CACHE_DIRDirectory path for cache storage (optional, defaults to ~/.token-optimizer-cache)
Readme
Token Optimizer
Token Optimizer MCP
Cut what your AI coding agent costs without cutting what it gets done.
Hooks, a proxy, and an MCP server for Claude Code, Codex, Copilot, Gemini and 12 more clients.
Details
- Repository
- github.com/ooples/token-optimizer-mcp
- Categories
- Memory & Context, AI Agents & LLM Apps
- Package
@ooples/token-optimizer-mcp- Transport
- STDIO
- Registry
- MCP registry, active
Questions
What does the Token Optimizer MCP server do for an agent?
It optimizes the context window through caching, prompt compression and smart file tools, which the listing says can cut tokens by 60-90%. Its proxy_chat tool sends chat completion requests through a cost-saving proxy that applies a semantic cache, LLMLingua 2 prompt compression and model routing automatically.
Which tools does the Token Optimizer MCP server provide?
The server exposes 7 tools: proxy_chat, proxy_predict, billing_start_trial, usage_summary, billing_status, cache_flush and usage_recent. proxy_predict estimates cost savings before a real LLM call and consumes no tokens, while cache_flush marks cached responses as stale after a knowledge base or system prompt changes.
How do I install the Token Optimizer MCP server in Claude Code?
The repository recommends installing the plugin rather than the bare MCP server, using the commands /plugin marketplace add ooples/token-optimizer-mcp, then /plugin install token-optimizer@token-optimizer, then /reload-plugins. The plugin's hooks do the saving, while the server alone only offers tools the model can ignore.
Does the Token Optimizer MCP server need an account or API key?
The README says everything runs locally with no account and no hosted service. The only environment variable listed is TOKEN_OPTIMIZER_CACHE_DIR, which is optional and sets the cache storage directory. The billing tools mention a paid Pro plan through a Stripe checkout for the proxy features.
Where does the Token Optimizer MCP server rank in its category?
It is in the Memory & Context category on Claude Marketplaces and ranks in the top 25 there. Other servers listed alongside it in that category include Headroom, Basic Memory, obsidian-wiki and Deja Vu, and it differs from them by focusing on cutting token cost through caching and compression.
More from ooples
All 2Similar to Token Optimizer Mcp
More Memory & Contextllm-cost-optimizerPluginalirezarezvani/claude-skills30.7K starsCut LLM API spend via model routing, prompt caching, prompt compression, and per-feature cost observability. Use when AI costs are too high, choosing between mo
cost-latency-optimizerSkillpatricio0312rev/skills337 installsPractical code patterns for cutting LLM spend and response times through caching, model routing, batching, and streaming.
llmtrimMCP serverfkiene277 starsLocal proxy and MCP server that compresses LLM prompts, tool output, and replies to cut token cost.
token-optimizerSkillasif2bd/openclaw-token-optimizer397 installsCost-control toolkit that trims OpenClaw agent token spend through lazy loading, model routing, and budgets.
McpspendMCP serverandreisirbu91-lab59 starsCost and usage data from MCPSpend: today's spend, monthly limits, top tools, and sessions.
HeadroomMCP serverchopratejas81.1K starsCompresses tool outputs, logs, files, and RAG chunks to cut LLM input tokens while keeping answers.