Token Optimizer
๐ ๐ โ๏ธ ๐ ๐ช ๐ง - Intelligent token optimization achieving 95%+ reduction through caching, compression, and 80+ smart tools for API optimization, code analysis, and real-time monitoring.
What is Token Optimizer?
Token Optimizer is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ ๐ โ๏ธ ๐ ๐ช ๐ง - intelligent token optimization achieving 95%+ reduction through caching, compression, and 80+ smart tools for api optimization, code analysis, and real-time monitoring.
๐ ๐ โ๏ธ ๐ ๐ช ๐ง - Intelligent token optimization achieving 95%+ reduction through caching, compression, and 80+ smart tools for API optimization, code analysis, and real-time monitoring.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ๐ ๐ โ๏ธ ๐ ๐ช ๐ง - Intelligent token optimization achieving 95%+
Use Cases
Maintainer
Works with
Installation
NPM
npx -y token-optimizer-mcpManual Installation
npx -y token-optimizer-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Token Optimizer
Token Optimizer MCP is a TypeScript MCP server that reduces context window usage by 60โ90% through Brotli compression, SQLite-backed persistent caching, and 65 smart tool replacements for common operations like file reads, grep, git diffs, API fetches, and database queries. It compresses and stores large content externally so that subsequent requests only transfer diffs or cached references, and it includes real-time token analytics showing exactly which tools and hook phases consume the most tokens. It works entirely offline with zero external dependencies and auto-configures itself into Claude Desktop, Cursor, Cline, and other AI tools on install.
Prerequisites
- Node.js 18+ installed
- npm package manager
- Claude Desktop, Claude Code, Cursor, or another MCP-compatible client
- No external API keys required โ the server operates fully offline
Install the package globally
Install token-optimizer-mcp globally via npm. The postinstall script automatically detects all installed AI tools on your system and configures them to use the MCP server. No manual configuration is needed on most systems.
npm install -g @ooples/token-optimizer-mcpVerify auto-configuration
After install, open Claude Desktop or your preferred client โ the token-optimizer MCP server should appear in the connected servers list. If auto-configuration was skipped (e.g., in a CI environment), run the installer manually.
# macOS/Linux:
bash install-hooks.sh
# Windows (PowerShell as Administrator):
powershell -ExecutionPolicy Bypass -File install-hooks.ps1Add to MCP client config manually if needed
If auto-configuration did not add the server, add it manually to claude_desktop_config.json. The server runs via npx so no separate start command is needed.
{
"mcpServers": {
"token-optimizer": {
"command": "npx",
"args": ["-y", "token-optimizer-mcp"]
}
}
}Start using smart tools in your AI client
Use the smart_* tool variants instead of standard file/git/API tools. For example, use smart_read instead of a plain file read โ it caches the content and on subsequent reads returns only the diff.
Check your token savings
Use the get_session_stats and get_action_analytics tools to see a breakdown of token usage by tool and hook phase. This helps identify which operations benefit most from optimization.
Token Optimizer Examples
Client configuration
Manual configuration for Claude Desktop. The npx command fetches and runs the latest published package.
{
"mcpServers": {
"token-optimizer": {
"command": "npx",
"args": ["-y", "token-optimizer-mcp"]
}
}
}Prompts to try
These prompts exercise the smart tools and analytics capabilities of Token Optimizer MCP.
- "Use smart_read to read src/index.ts and show me only what changed since last time"
- "Run smart_grep to find all usages of fetchUser across the codebase"
- "Fetch https://api.example.com/users with smart_api_fetch and cache the result for 5 minutes"
- "Show me my session token stats โ which tools used the most tokens today?"
- "Analyze the token footprint of this project with analyze_project_tokens"
- "Use smart_diff to show me what changed in the last git commit"Troubleshooting Token Optimizer
Auto-install did not configure my AI tool
Run the appropriate installer script manually: `bash install-hooks.sh` on macOS/Linux or the PowerShell script on Windows. Then restart your AI client. If your tool is not yet auto-detected, add the server manually to its MCP config using npx -y token-optimizer-mcp.
Cached data is stale or returns outdated file contents
Call the clear_cache tool to reset all cached content, or use get_cache_stats to inspect what is stored. The smart tools track file modification times and should auto-invalidate, but manual clearing is available for edge cases.
Brotli compression errors on Windows
Ensure you are running PowerShell as Administrator when installing. The package uses native Node.js Brotli (available since Node 10.16) โ verify your Node version is 18+ with `node --version`. If issues persist, run `npm rebuild` in the global npm directory.
Frequently Asked Questions about Token Optimizer
What is Token Optimizer?
Token Optimizer is a Model Context Protocol (MCP) server that ๐ ๐ โ๏ธ ๐ ๐ช ๐ง - intelligent token optimization achieving 95%+ reduction through caching, compression, and 80+ smart tools for api optimization, code analysis, and real-time monitoring. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Token Optimizer?
Install via npm with the command: npx -y token-optimizer-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Token Optimizer?
Token Optimizer works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Token Optimizer free to use?
Yes, Token Optimizer is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Token Optimizer Alternatives โ Similar Developer Tools Servers
Looking for alternatives to Token Optimizer? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
โ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
โ 155.8kJava ้ข่ฏ & ๅ็ซฏ้็จ้ข่ฏๆๅ๏ผ่ฆ็่ฎก็ฎๆบๅบ็กใๆฐๆฎๅบใๅๅธๅผใ้ซๅนถๅใ็ณป็ป่ฎพ่ฎกไธ AI ๅบ็จๅผๅ
Gemini CLI
โ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
โ 87.3kโญ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
โ 86.0kModel Context Protocol Servers
CC Switch
โ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Token Optimizer in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Token Optimizer?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.