See what your prompts cost across GPT, Claude, and Gemini — then cut it. Free calculator below, plus an MCP server that does it automatically inside Claude & Cursor.
mcp-token-optimizer · works with any MCP client · MIT
Add this to your MCP config (claude_desktop_config.json or .cursor/mcp.json):
{
"mcpServers": {
"token-optimizer": {
"command": "npx",
"args": ["-y", "mcp-token-optimizer"]
}
}
}
Then ask: "slim this system prompt and show what I'd save at 50k calls a month" or "which model is cheapest for this prompt?"
Exact token count + cost across models.
Per-call + monthly/yearly spend.
Compress prompts, measure $ saved.
Find the cheapest capable model.
Token Optimizer is a free, open-source MCP server and cost calculator that cuts LLM token costs for developers on OpenAI, Anthropic, and Gemini. Published June 2026 · MIT license · prices 9 models.
Token Optimizer is a free, open-source MCP server (npm package mcp-token-optimizer) and web tool that cuts LLM token costs for developers building on OpenAI, Anthropic, and Google Gemini. It counts tokens, estimates cost, compresses prompts, and finds the cheapest capable model inside Claude, Cursor, or any MCP client.
Most teams overspend 60-80% on tokens. Rule-based prompt slimming typically saves 20-40%, and AI compression has cut sample prompts by up to 69%. Routing a task to a cheaper but capable model can save 100x or more versus a frontier model.
Yes. Add it to claude_desktop_config.json or .cursor/mcp.json using the command: npx -y mcp-token-optimizer. It works with any MCP-compatible client.
Yes. The MCP server and the web calculator are free and open-source under the MIT license, published June 2026. A Pro tier adds AI-powered prompt compression for deeper savings.
It uses the gpt-tokenizer library for exact OpenAI token counts and close estimates for Claude and Gemini, then prices them against a current cost table covering 9 models.