token-optimizer
Intelligent token optimization for Claude Code - achieving 95%+ token reduction through caching, compression, and smart tool intelligence
claude mcp add --transport stdio ooples-token-optimizer-mcp npx -y @ooples/token-optimizer-mcp \ --env TOKEN_OPTIMIZER_LOG_LEVEL="optional: set log level (e.g., info, warn, error)"
How to use
Token Optimizer MCP is a server that reduces token usage by intelligently caching, compressing, and optimizing tool outputs for Claude Code and Claude Desktop workflows. It stores content externally in a SQLite cache and provides optimized replacements for common tooling, enabling you to fit more work into a fixed context window. The server exposes 61 specialized tools across core caching, smart file operations, API/database interactions, build/test workflows, advanced caching, and monitoring to accelerate development while minimizing token consumption. Typical usage involves caching large responses, diff-based file updates, and cached API calls so that repeated operations incur significantly fewer tokens.
How to install
Prerequisites:
- Node.js and npm installed on your system
- Access to a terminal or shell
Quick install (recommended):
- Windows
- Open PowerShell as Administrator
- Run: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
- Run: npm install -g @ooples/token-optimizer-mcp
- macOS / Linux
- Run: npm install -g @ooples/token-optimizer-mcp
What the installer does:
- Installs token-optimizer-mcp globally via npm
- Auto-detects and configures installed AI tools (Claude Desktop, Cursor, Cline, etc.)
- Sets up automatic token optimization on tool calls
- Configures workspace trust and execution permissions
If automatic installation is skipped (e.g., CI):
- Windows: powershell -ExecutionPolicy Bypass -File install-hooks.ps1
- macOS/Linux: bash install-hooks.sh
Manual configuration (if you need to customize):
- See docs/HOOKS-INSTALLATION.md for detailed platform-specific steps.
Additional notes
Tips and notes:
- The MCP uses Brotli compression and a SQLite cache to persist optimizations across sessions. Expect substantial token reductions, particularly on repetitive content and large payloads.
- Environment variables can customize logging, cache behavior, and tool selection. Start with the default config and enable verbose logs if troubleshooting.
- If you upgrade the MCP, review release notes for breaking changes in tool names or API surfaces.
- The npm package name for reference: @ooples/token-optimizer-mcp
Related MCP Servers
mcp-graphql
Model Context Protocol server for GraphQL
Remote
A type-safe solution to remote MCP communication, enabling effortless integration for centralized management of Model Context.
rohlik
MCP server that lets you shop groceries across the Rohlik Group platforms (Rohlik.cz, Knuspr.de, Gurkerl.at, Kifli.hu, Sezamo.ro)
gtm
An MCP server for Google Tag Manager. Connect it to your LLM, authenticate once, and start managing GTM through natural language.
mcp -templates
A flexible platform that provides Docker & Kubernetes backends, a lightweight CLI (mcpt), and client utilities for seamless MCP integration. Spin up servers from templates, route requests through a single endpoint with load balancing, and support both deployed (HTTP) and local (stdio) transports — all with sensible defaults and YAML-based configs.
zip
An MCP tool that provides AI with the ability to compress and decompress local files.