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.

ToolRiskSide effectsApproval
optimize_text
Compress and cache text to reduce token usage. Returns compressed version and saves to cache for future use.
readfalseunknown
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).
readfalseunknown
decompress_text
Decompress base64-encoded Brotli-compressed text.
unknownunknownunknown
clear_cache
Clear all cached data. Use with caution.
unknownunknownunknown
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.
readfalseunknown
get_cache_stats
Get cache statistics including hit rate, compression ratio, and token savings.
readfalseunknown
analyze_optimization
Analyze text and provide recommendations for optimization including compression benefits and token savings.
unknownunknownunknown
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.
readfalseunknown
cache_analytics
Comprehensive cache analytics with 88%+ token reduction. Real-time dashboards, trend analysis, alerting, heatmaps, bottleneck detection, and cost optimization.
unknownunknownunknown
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
readfalseunknown
cache_invalidation
Comprehensive cache invalidation with 88%+ token reduction, dependency tracking, pattern matching, scheduled invalidation, and distributed coordination
unknownunknownunknown
cache_partition
Advanced cache partitioning and sharding with 87%+ token reduction through consistent hashing, automatic rebalancing, and partition isolation
unknownunknownunknown
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.
unknownunknownunknown
smart_cache
Advanced multi-tier cache with 90%+ token reduction, 6 eviction strategies, stampede prevention, and automatic tier management
unknownunknownunknown
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
readfalseunknown
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.
readfalseunknown
monitoring_integration
External monitoring platform integration with 87% token reduction through data compression and intelligent caching
unknownunknownunknown
custom_widget
Create and manage custom dashboard widgets with 88% token reduction through template caching and configuration compression
unknownunknownunknown
data_visualizer
Create and manage interactive data visualizations with 92% token reduction through SVG/Canvas optimization and configuration caching
unknownunknownunknown
pattern-recognition
Pattern detection and analysis in logs, metrics, and events
unknownunknownunknown
smart_processes
Monitor and analyze system processes with anomaly detection and resource tracking
unknownunknownunknown
intelligent-assistant
Provides intelligent assistance including contextual help, suggestions, explanations, and troubleshooting
unknownunknownunknown
recommendation-engine
Intelligent recommendations for optimization and resource allocation
unknownunknownunknown
natural-language-query
Natural language query translation and optimization
readfalseunknown
smart-summarization
Intelligent content summarization and digest generation
unknownunknownunknown
predictive-analytics
Predictive modeling and forecasting for system metrics
unknownunknownunknown
smart_system_metrics
System resource monitoring with CPU, memory, disk usage tracking, anomaly detection, and performance recommendations
unknownunknownunknown
smart_typecheck
Run TypeScript type checking with intelligent caching and categorized error reporting
unknownunknownunknown
smart_build
Run TypeScript build with intelligent caching, diff-based change detection, and token-optimized output
unknownunknownunknown
smart_diff
Get git diffs with 85% token reduction through diff-only output and smart filtering
readfalseunknown
smart_status
Get git status with 70% token reduction through status-only output and smart filtering
readfalseunknown
smart_read
Read files with 80% token reduction through intelligent caching, diff-based updates, and syntax-aware optimization
readfalseunknown
smart_write
Write files with 85% token reduction through verification, atomic operations, and change tracking
writetrueunknown
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.
readfalseunknown
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.
readfalseunknown
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.
readfalseunknown
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.
readfalseunknown
optimization_storage
Persist and retrieve brotli-compressed optimization results keyed by text hash. Operations: store, retrieve.
unknownunknownunknown
get_cached
Retrieve previously cached and optimized text. Returns the original text if found in cache.
readfalseunknown
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.
unknownunknownunknown
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.
unknownunknownunknown
predictive_cache
ML-based predictive caching with 91%+ token reduction using ARIMA, exponential smoothing, LSTM, and collaborative filtering
unknownunknownunknown
cache_warmup
Intelligent cache pre-warming with 87%+ token reduction, featuring schedule-based warming, pattern analysis, dependency resolution, and progressive warming strategies
unknownunknownunknown
smart_ast_grep
Perform structural code search with 83% token reduction through AST indexing and caching
readfalseunknown
smart_sql
SQL query analyzer with optimization suggestions and execution plan analysis (83% token reduction)
readfalseunknown
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.
unknownunknownunknown
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.
readfalseunknown
cache_optimizer
Advanced cache optimization with 89%+ token reduction. Analyzes performance, benchmarks strategies, provides ML-based recommendations, detects bottlenecks, and performs cost-benefit analysis.
unknownunknownunknown
smart_orm
ORM query optimizer with N+1 detection (83% token reduction)
readfalseunknown
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
readfalseunknown
smart_graphql
GraphQL query optimizer with complexity analysis and caching (83% token reduction)
readfalseunknown
smart_websocket
WebSocket connection manager with message tracking (83% token reduction)
unknownunknownunknown
smart_logs
System log aggregation and analysis with multi-source support, pattern filtering, error detection, and insights
unknownunknownunknown
smart_migration
Database migration tracker with status monitoring and 83% token reduction. Supports listing migrations, checking status, viewing history, rollback operations, and migration generation.
readfalseunknown
smart_rest
REST API analyzer with endpoint discovery and health scoring (83% token reduction)
readfalseunknown
alert_manager
Comprehensive alerting system with multi-channel notifications, intelligent routing, and 89% token reduction through aggressive caching and history aggregation
unknownunknownunknown
metric_collector
Comprehensive metrics collection and aggregation with multi-source support, time-series compression, and 88% token reduction through delta encoding and intelligent caching
unknownunknownunknown
health_monitor
Monitor system and application health with 91% token reduction through health state compression and metric aggregation
readfalseunknown
log_dashboard
Interactive log analysis dashboard with filtering, searching, pattern detection, and 90% token reduction through intelligent caching and compression
unknownunknownunknown
smart_network
Network diagnostics and monitoring with connectivity testing, port scanning, DNS resolution, and anomaly detection
unknownunknownunknown
smart_lint
Run ESLint with intelligent caching, incremental analysis, and auto-fix suggestions
unknownunknownunknown
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.
unknownunknownunknown
smart_install
Package installation with dependency analysis, conflict detection, and smart caching for npm/yarn/pnpm
unknownunknownunknown
smart_docker
Docker operations with build/run/stop/logs support, image layer analysis, and optimization suggestions
unknownunknownunknown
smart_test
Run tests with intelligent caching, coverage tracking, and incremental test execution
unknownunknownunknown
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.
unknownunknownunknown
smart_merge
Manage git merges with 80% token reduction through structured status and conflict management
writetrueunknown
smart_branch
List and manage git branches with 60% token reduction through structured JSON output and smart filtering
readfalseunknown
smart_log
Get git commit history with 75% token reduction through structured JSON output and smart filtering
readfalseunknown
smart_edit
Edit files with 90% token reduction through line-based operations and diff-only output
writetrueunknown
smart_glob
Search files with glob patterns and 75% token reduction through path-only results and smart filtering
readfalseunknown
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.
unknownunknownunknown
smart_grep
Search file contents with 80% token reduction through match-only output and smart filtering
readfalseunknown
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.
unknownunknownunknown

02Install & source
npx -y @ooples/token-optimizer-mcp@latest
npx

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_statusindex8 unique facts >= 5

06Badge

Add the “as seen on MCPExplorer” badge to your README. token-optimizer-mcp MCP — as seen on mcpexplorer.com

[![token-optimizer-mcp MCP — as seen on mcpexplorer.com](https://mcpexplorer.com/badge/token-optimizer-mcp.svg)](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 →