servers / token-optimizer-mcp
token-optimizer-mcp
communitystdiolocalwrite capablehealthy
Intelligent token optimization for Claude Code - achieving 95%+ token reduction through caching, compression, and smart tool intelligence
01Tools · 74
How to read this: tool names here are observed from a live tools/list handshake. The Risk label is a heuristic inferred from the tool name (write/destructive verbs), not from executing the tool — a conservative guess, not a verified capability. We never escalate risk from a description. Found one that's wrong? Tell us — we fix on report.
| Tool | Risk | Side effects | Approval |
|---|---|---|---|
| optimize_text Compress and cache text to reduce token usage. Returns compressed version and saves to cache for future use. | read | false | unknown |
| count_tokens Count tokens in text using the pluggable tokenizer framework (#124). Picks a model-specific tokenizer (tiktoken for GPT/Claude, Google AI REST for Gemini, content-aware heuristic fallback). | read | false | unknown |
| decompress_text Decompress base64-encoded Brotli-compressed text. | unknown | unknown | unknown |
| clear_cache Clear all cached data. Use with caution. | unknown | unknown | unknown |
| get_session_stats Get comprehensive statistics from the PowerShell wrapper session tracker including system reminders, tool operations, and total tokens with accurate tiktoken-based counting. | read | false | unknown |
| get_cache_stats Get cache statistics including hit rate, compression ratio, and token savings. | read | false | unknown |
| analyze_optimization Analyze text and provide recommendations for optimization including compression benefits and token savings. | unknown | unknown | unknown |
| optimize_session Analyzes operations in the current session from the session JSONL log, identifies large text blocks from file-based tools (Read, Write, Edit), compresses them, and stores them in the cache to reduce future token usage. Returns a summary of the optimization. | read | false | unknown |
| cache_analytics Comprehensive cache analytics with 88%+ token reduction. Real-time dashboards, trend analysis, alerting, heatmaps, bottleneck detection, and cost optimization. | unknown | unknown | unknown |
| cache-benchmark Cache Performance Benchmarking with 89% token reduction through comprehensive testing and analysis.
Features:
- Strategy comparison (LRU vs LFU vs FIFO vs TTL vs size vs hybrid)
- Load testing with configurable concurrency and ramp-up
- Latency profiling with percentiles (p50, p90, p95, p99, p99.9)
- Throughput testing (operations per second)
- Comprehensive reports in markdown, HTML, JSON, PDF
- Workload simulation (read-heavy, write-heavy, mixed, realistic)
Operations:
- run-benchmark: Execute complete benchmark suite
- compare: Compare multiple cache configurations
- load-test: Stress test cache under load
- latency-test: Measure latency distribution with percentiles
- throughput-test: Measure throughput limits
- report: Generate comprehensive benchmark report
Token Reduction:
- Benchmark results: ~89% (summary only)
- Comparison: ~91% (rankings + winner)
- Load test: ~88% (summary + breaking point)
- Latency test: ~87% (percentiles only)
- Throughput test: ~90% (key metrics only)
- Report: ~85% (formatted summary)
- Average: 89% reduction | read | false | unknown |
| cache_invalidation Comprehensive cache invalidation with 88%+ token reduction, dependency tracking, pattern matching, scheduled invalidation, and distributed coordination | unknown | unknown | unknown |
| cache_partition Advanced cache partitioning and sharding with 87%+ token reduction through consistent hashing, automatic rebalancing, and partition isolation | unknown | unknown | unknown |
| smart_schema Database schema analyzer with intelligent caching and 83% token reduction. Supports PostgreSQL, MySQL, and SQLite. Provides schema introspection, relationship analysis, index recommendations, and schema diff. | unknown | unknown | unknown |
| smart_cache Advanced multi-tier cache with 90%+ token reduction, 6 eviction strategies, stampede prevention, and automatic tier management | unknown | unknown | unknown |
| smart-cache-api API Response Caching with 83% token reduction through intelligent cache management.
Features:
- Multiple caching strategies (TTL, ETag, Event-based, LRU, Size-based)
- Intelligent cache key generation with query normalization
- Pattern-based and tag-based invalidation
- Stale-while-revalidate support
- Cache hit rate analysis and recommendations
- Cache warming and preloading
Actions:
- get: Retrieve cached API response
- set: Cache an API response
- invalidate: Remove cached entries (pattern/tag/manual)
- analyze: Get cache performance metrics
- warm: Pre-cache specific endpoints
Token Reduction:
- Cache hit: ~95% (summary only)
- Cache miss: 0% (full response)
- Stale cache: ~95% (stale summary)
- Invalidation: ~98% (count only)
- Analysis: ~90% (statistics only)
- Average: 83% reduction | read | false | unknown |
| smart_database Database query optimizer with connection pooling, circuit breaking, and 83% token reduction. Supports query execution, EXPLAIN analysis, performance optimization, health monitoring, slow query detection, and batch operations. | read | false | unknown |
| monitoring_integration External monitoring platform integration with 87% token reduction through data compression and intelligent caching | unknown | unknown | unknown |
| custom_widget Create and manage custom dashboard widgets with 88% token reduction through template caching and configuration compression | unknown | unknown | unknown |
| data_visualizer Create and manage interactive data visualizations with 92% token reduction through SVG/Canvas optimization and configuration caching | unknown | unknown | unknown |
| pattern-recognition Pattern detection and analysis in logs, metrics, and events | unknown | unknown | unknown |
| smart_processes Monitor and analyze system processes with anomaly detection and resource tracking | unknown | unknown | unknown |
| intelligent-assistant Provides intelligent assistance including contextual help, suggestions, explanations, and troubleshooting | unknown | unknown | unknown |
| recommendation-engine Intelligent recommendations for optimization and resource allocation | unknown | unknown | unknown |
| natural-language-query Natural language query translation and optimization | read | false | unknown |
| smart-summarization Intelligent content summarization and digest generation | unknown | unknown | unknown |
| predictive-analytics Predictive modeling and forecasting for system metrics | unknown | unknown | unknown |
| smart_system_metrics System resource monitoring with CPU, memory, disk usage tracking, anomaly detection, and performance recommendations | unknown | unknown | unknown |
| smart_typecheck Run TypeScript type checking with intelligent caching and categorized error reporting | unknown | unknown | unknown |
| smart_build Run TypeScript build with intelligent caching, diff-based change detection, and token-optimized output | unknown | unknown | unknown |
| smart_diff Get git diffs with 85% token reduction through diff-only output and smart filtering | read | false | unknown |
| smart_status Get git status with 70% token reduction through status-only output and smart filtering | read | false | unknown |
| smart_read Read files with 80% token reduction through intelligent caching, diff-based updates, and syntax-aware optimization | read | false | unknown |
| smart_write Write files with 85% token reduction through verification, atomic operations, and change tracking | write | true | unknown |
| get_hook_analytics Get detailed token usage analytics broken down by hook phase (PreToolUse, PostToolUse, SessionStart, PreCompact, UserPromptSubmit). Shows which hook phases consume the most tokens and where optimization efforts should be focused. | read | false | unknown |
| get_action_analytics Get detailed token usage analytics broken down by tool/action (Read, Write, Grep, Bash, count_tokens, etc.). Shows which tools consume the most tokens and identifies optimization opportunities for specific operations. | read | false | unknown |
| get_mcp_server_analytics Get detailed token usage analytics broken down by MCP server (token-optimizer, filesystem, github, etc.). Shows which MCP servers are contributing the most to token usage and helps identify cross-server optimization opportunities. | read | false | unknown |
| get_optimization_report Get a complete token-savings report: total tokens saved, overall savings %, and full breakdowns by action/tool, by hook phase, and by MCP server. Returns structured data plus a ready-to-display formatted text summary. Use this to show the user how much context/token budget token-optimizer has saved them. | read | false | unknown |
| optimization_storage Persist and retrieve brotli-compressed optimization results keyed by text hash. Operations: store, retrieve. | unknown | unknown | unknown |
| get_cached Retrieve previously cached and optimized text. Returns the original text if found in cache. | read | false | unknown |
| compress_text Compress text using Brotli, returned as a base64 string. Intended for AT-REST STORAGE/caching (reduces bytes ~50%). NOTE: base64 tokenizes poorly, so the output usually has MORE LLM tokens than the input — do NOT feed the result into a model context expecting savings. The response includes originalTokens/compressedTokens and a warning when the output would increase tokens. | unknown | unknown | unknown |
| analyze_project_tokens Analyze token usage and estimate costs across multiple sessions within a project. Aggregates data from all session-log-*.jsonl files, provides project-level statistics, identifies top contributing sessions and tools, and estimates monetary costs based on token usage. | unknown | unknown | unknown |
| predictive_cache ML-based predictive caching with 91%+ token reduction using ARIMA, exponential smoothing, LSTM, and collaborative filtering | unknown | unknown | unknown |
| cache_warmup Intelligent cache pre-warming with 87%+ token reduction, featuring schedule-based warming, pattern analysis, dependency resolution, and progressive warming strategies | unknown | unknown | unknown |
| smart_ast_grep Perform structural code search with 83% token reduction through AST indexing and caching | read | false | unknown |
| smart_sql SQL query analyzer with optimization suggestions and execution plan analysis (83% token reduction) | read | false | unknown |
| cache_compression Advanced compression strategies for cache optimization with 89%+ token reduction. Supports 6 algorithms (gzip, brotli, lz4, zstd, snappy, custom), adaptive selection, dictionary-based compression, and delta compression for time-series data. | unknown | unknown | unknown |
| cache_replication Distributed cache replication with 88%+ token reduction. Supports primary-replica and multi-primary modes, strong/eventual consistency, automatic conflict resolution, failover, incremental sync, and health monitoring. | read | false | unknown |
| cache_optimizer Advanced cache optimization with 89%+ token reduction. Analyzes performance, benchmarks strategies, provides ML-based recommendations, detects bottlenecks, and performs cost-benefit analysis. | unknown | unknown | unknown |
| smart_orm ORM query optimizer with N+1 detection (83% token reduction) | read | false | unknown |
| smart_api_fetch Execute HTTP requests with intelligent caching and retry logic.
Features:
- Automatic retry with exponential backoff (1s, 2s, 4s, 8s)
- Response caching with TTL-based invalidation (default: 5 minutes)
- Request deduplication for in-flight requests
- Circuit breaker pattern (opens after 5 consecutive failures)
- ETag/Cache-Control header support
- 83% average token reduction through intelligent output formatting
Token Reduction Strategy:
- Cached responses: 95% reduction (summary only)
- Error responses: 90% reduction (error details only)
- Retried requests: 85% reduction (success summary with retry info)
- First requests: 80% reduction (compact summary)
Perfect for:
- API integration and testing
- Webhook handling
- External service communication
- Data fetching with resilience | read | false | unknown |
| smart_graphql GraphQL query optimizer with complexity analysis and caching (83% token reduction) | read | false | unknown |
| smart_websocket WebSocket connection manager with message tracking (83% token reduction) | unknown | unknown | unknown |
| smart_logs System log aggregation and analysis with multi-source support, pattern filtering, error detection, and insights | unknown | unknown | unknown |
| smart_migration Database migration tracker with status monitoring and 83% token reduction. Supports listing migrations, checking status, viewing history, rollback operations, and migration generation. | read | false | unknown |
| smart_rest REST API analyzer with endpoint discovery and health scoring (83% token reduction) | read | false | unknown |
| alert_manager Comprehensive alerting system with multi-channel notifications, intelligent routing, and 89% token reduction through aggressive caching and history aggregation | unknown | unknown | unknown |
| metric_collector Comprehensive metrics collection and aggregation with multi-source support, time-series compression, and 88% token reduction through delta encoding and intelligent caching | unknown | unknown | unknown |
| health_monitor Monitor system and application health with 91% token reduction through health state compression and metric aggregation | read | false | unknown |
| log_dashboard Interactive log analysis dashboard with filtering, searching, pattern detection, and 90% token reduction through intelligent caching and compression | unknown | unknown | unknown |
| smart_network Network diagnostics and monitoring with connectivity testing, port scanning, DNS resolution, and anomaly detection | unknown | unknown | unknown |
| smart_lint Run ESLint with intelligent caching, incremental analysis, and auto-fix suggestions | unknown | unknown | unknown |
| smart_user Intelligent user and permission management with smart caching (86%+ token reduction). Manage users, groups, permissions, ACLs, and perform security audits across Windows, Linux, and macOS. | unknown | unknown | unknown |
| smart_install Package installation with dependency analysis, conflict detection, and smart caching for npm/yarn/pnpm | unknown | unknown | unknown |
| smart_docker Docker operations with build/run/stop/logs support, image layer analysis, and optimization suggestions | unknown | unknown | unknown |
| smart_test Run tests with intelligent caching, coverage tracking, and incremental test execution | unknown | unknown | unknown |
| smart_cron Intelligent scheduled task management with smart caching (85%+ token reduction). Manage cron jobs (Linux/macOS) and Windows Task Scheduler with validation, history tracking, and next run predictions. | unknown | unknown | unknown |
| smart_merge Manage git merges with 80% token reduction through structured status and conflict management | write | true | unknown |
| smart_branch List and manage git branches with 60% token reduction through structured JSON output and smart filtering | read | false | unknown |
| smart_log Get git commit history with 75% token reduction through structured JSON output and smart filtering | read | false | unknown |
| smart_edit Edit files with 90% token reduction through line-based operations and diff-only output | write | true | unknown |
| smart_glob Search files with glob patterns and 75% token reduction through path-only results and smart filtering | read | false | unknown |
| context_delta Compute a unified-diff delta for a file in a given session so the model only sees changes since the last snapshot. Operations: compute-delta, seed, clear. | unknown | unknown | unknown |
| smart_grep Search file contents with 80% token reduction through match-only output and smart filtering | read | false | unknown |
| export_analytics Export all analytics data in JSON or CSV format. Supports filtering by date range, hook phase, tool name, and MCP server. Useful for external analysis, reporting, and data integration. | unknown | unknown | unknown |
02Install & source
npx -y @ooples/token-optimizer-mcp@latest
npx- repohttps://github.com/ooples/token-optimizer-mcp
- licenseMIT
- adoption487 stars · 52 forks
05Provenance & freshness
sourcesGitHub repo search [p4]
last_checked2026-08-16 18:57Z
next_check2026-08-16 21:57Z
cadenceevery 3h
verifiedhandshake:failed metadata:passed handshake:failed metadata:passed handshake:failed metadata:passed handshake:failed metadata:passed handshake:failed metadata:passed
index_statusindex — 8 unique facts >= 5
06Badge
Add the “as seen on MCPExplorer” badge to your README.
[](https://mcpexplorer.com/servers/token-optimizer-mcp)
Next step
This is one server. A loadout combines the right servers, governance, and proven plays for a whole job — assembled deliberately, not tool-dumped.
Explore loadouts →