Token-optimizer-mcp Server

Providers cache the prompt prefix: cached tokens re-read at 0.1x, rewritten ones bill at 1.25x. Most compressors optimise bytes removed and ignore that multiplier. This one optimises the bill.

Local serverstdioMIT

What is the Token-optimizer-mcp Server?

Token-optimizer-mcp source profile. From the maintainer documentation: “Providers cache the prompt prefix: cached tokens re-read at 0.1x, rewritten ones bill at 1.25x. Most compressors optimise bytes removed and ignore that multiplier. This one optimises the bill.”

Installation

The documented npm package is @ooples/token-optimizer-mcp. The configuration below comes from the maintainer’s example; adapt its paths and account values to your environment.

Source

Project documentation · Repository · Discovery listing. This profile records the public documentation checked on 2026-10-08.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
optimize_textCompress and cache text (primary tool for token reduction)
get_cachedRetrieve previously cached text
compress_textCompress text using Brotli
decompress_textDecompress Brotli-compressed text
count_tokensCount tokens using tiktoken (GPT-4 tokenizer)
analyze_optimizationAnalyze text and get optimization recommendations
get_cache_statsView cache hit rates and compression ratios
clear_cacheClear all cached data
smart_readRead files with 80% token reduction through caching and diffs
smart_writeWrite files with verification and change tracking
smart_editLine-based file editing with diff-only output (90% reduction)
smart_grepSearch file contents with match-only output (80% reduction)
smart_globFile pattern matching with path-only results (75% reduction)
smart_diffGit diffs with diff-only output (85% reduction)
smart_branchGit branch listing with structured JSON (60% reduction)
smart_logGit commit history with smart filtering (75% reduction)
smart_mergeGit merge management with conflict analysis (80% reduction)
smart_statusGit status with status-only output (70% reduction)
smart_api_fetchHTTP requests with caching and retry logic (83% reduction on cache hits)
smart-cache-apiAPI response caching with TTL/ETag/event-based strategies
smart_databaseDatabase queries with connection pooling and caching (83% reduction)
smart_sqlSQL query analysis with optimization suggestions (83% reduction)
smart_schemaDatabase schema analysis with intelligent caching
smart_graphqlGraphQL query optimization with complexity analysis (83% reduction)
smart_restREST API analysis with endpoint discovery (83% reduction)
smart_ormORM query optimization with N+1 detection (83% reduction)
smart_migrationDatabase migration tracking (83% reduction)
smart_websocketWebSocket connection management with message tracking
smart_buildTypeScript builds with diff-based change detection
smart_testTest execution with incremental test selection
smart_lintESLint with incremental analysis and auto-fix
smart_typecheckTypeScript type checking with caching
smart_installPackage installation with dependency analysis
smart_dockerDocker operations with layer analysis
smart_logsLog aggregation with pattern filtering
smart_networkNetwork diagnostics with anomaly detection
smart_processesProcess monitoring with resource tracking
smart_system_metricsSystem resource monitoring with performance recommendations
smart_cacheMulti-tier cache (L1/L2/L3) with 6 eviction strategies (90% reduction)
cache_warmupIntelligent cache pre-warming with schedule support (87% reduction)
cache_analyticsReal-time dashboards and trend analysis (88% reduction)
cache-benchmarkPerformance testing and strategy comparison (89% reduction)
cache_compression6 compression algorithms with adaptive selection (89% reduction)
cache_invalidationDependency tracking and pattern-based invalidation (88% reduction)
cache_optimizerML-based recommendations and bottleneck detection (89% reduction)
cache_partitionSharding and consistent hashing (87% reduction)
cache_replicationDistributed replication with conflict resolution (88% reduction)
predictive_cacheML-based predictive caching with ARIMA/LSTM (91% reduction)
alert_managerMulti-channel alerting (email, Slack, webhook) with routing (89% reduction)
metric_collectorTime-series metrics with multi-source support (88% reduction)
monitoring_integrationExternal platform integration (Prometheus, Grafana, Datadog) (87% reduction)
custom_widgetDashboard widgets with template caching (88% reduction)
data_visualizerInteractive visualizations with SVG optimization (92% reduction)
health_monitorSystem health checks with state compression (91% reduction)
log_dashboardLog analysis with pattern detection (90% reduction)
smart_cronScheduled task management (cron/Windows Task Scheduler) (85% reduction)
smart_userUser and permission management across platforms (86% reduction)
smart_ast_grepStructural code search with AST indexing (83% reduction)
get_session_statsSession-level token usage statistics
analyze_project_tokensProject-wide token analysis and cost estimation
optimize_sessionCompress large file operations from current session
intelligent-assistantContext-aware assistance with compact recommendations
natural-language-queryNatural-language querying over structured data
pattern-recognitionPattern discovery with summarized findings
predictive-analyticsPredictive analysis with concise results
recommendation-engineRanked, context-aware recommendations
smart-summarizationToken-aware summarization for large content
get_optimization_reportComplete savings report with totals and breakdowns
get_action_analyticsSavings aggregated by action or tool
get_hook_analyticsSavings aggregated by hook phase
get_mcp_server_analyticsSavings aggregated by MCP server
export_analyticsExport recorded analytics for external analysis
optimization_storagePersist and retrieve optimized content
context_deltaTrack compact context changes between states

How to install the Token-optimizer-mcp Server

{
  "mcpServers": {
    "token-optimizer": {
      "type": "local",
      "command": "npx",
      "args": [
        "-y",
        "@ooples/token-optimizer-mcp@latest"
      ],
      "tools": [
        "*"
      ]
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.