etuki-finops-mcp
This MCP server provides local, deterministic LLM FinOps calculations for model pricing, caching, routing, budget endurance, and usage-log auditing without API keys.
Detect relay downgrade risk, session burn rate, and remaining coding turns.
Simulate 6-turn quality-tier task routing and estimate savings vs. flagship execution.
Discover eligible account model tiers and zero-cost credit/grant pools.
Compress verbose build or terminal logs while preserving errors, stack traces, head, and tail.
Project 10-turn prompt-prefix cache savings for a target model.
Reconcile billed usage receipts against official 1x rate cards and flag overcharges.
Optimize prompt cache layout by moving volatile tokens after static prefixes.
Check prompts against long-context surcharge cliffs and get alternative model recommendations.
Query the embedded UMCE rate-card registry by vendor for pricing, context windows, and model IDs.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Etuki AI FinOps MCP Server & Offline .jsonl / CSV Prompt-Cache Auditor (etuki-finops-mcp)
Open-source local stdio Model Context Protocol (MCP) server and CLI calculator for checking LLM API rate cards (452 verified OpenRouter & LiteLLM production models), 10-turn prompt-cache breakeven turns, two-bucket retry cost attribution, and local .jsonl/CSV cache-break diagnostics.
Web Dashboard & Visual Multi-Cloud Bill X-Ray: https://www.etuki.com
VS Code Extension: etuki.etuki-finops
npm Package:
npx -y etuki-finops-mcp
Included Local Stdio MCP Tools (6 Tools)
list_supported_models: Search the 452 live-synced OpenRouter/LiteLLM model rate cards (input, output, cache read, and cache write rates per 1M tokens).pin_single_model_prefix_cache: Compute 10-turn warm prompt-cache breakeven turns, enterprise contracted rate discounts (contract_discount_multiplier), and two-bucket retry cost attribution (provider_infra_retry_ratevs.model_prompt_retry_rate).auto_route_task_by_quality_tier: Estimate 6-turn coding task savings when offloading 4 initial repository scan turns to a fast model while keeping 2 synthesis turns on a flagship model with warm cache.compress_and_fold_context: Fold repetitive middle lines of terminal/compiler logs while preserving head, tail, and error/exception lines.reconcile_usage_receipt: Compare an actual billed dollar amount against official 1x model rate cards.audit_local_usage_log: Parse JSONL usage objects in memory to flag mid-session prompt-cache breaks (>5m TTLexpirations or prefix shifts).
Related MCP server: ai-cost-calculator-api
Local Stdio MCP Configuration
{
"mcpServers": {
"etuki-finops": {
"command": "npx",
"args": ["-y", "etuki-finops-mcp"]
}
}
}Offline CLI Usage
# Audit a local .jsonl or .csv usage log offline:
node etuki-saver.mjs ./sample-usage.jsonl --model anthropic/claude-3.7-sonnet
# Run CI/CD Pull Request cost-regression check:
node etuki-saver.mjs --ci-gate --baseline baseline.json --current current.jsonLicense
MIT
Available Tools
9 toolsauto_route_task_by_quality_tierARead-onlyIdempotentInspect
Simulates a 6-turn coding workflow cost projection comparing unrouted flagship execution against tiered routing across grant pools and warm-cached GA models. Stateless in-memory calculation requiring no authentication and mutating no router settings. Scales per-turn cost linearly with context_tokens relative to current_model; when has_custom_router_config is true, reports a non-intrusive shadow comparison rather than active target IDs. Returns JSON with custom_router_mutex_check, six_turn_cost_breakdown (1 cold write turn + 5 warm read turns), and net_saved_usd (positive USD saved vs unrouted baseline). Use this tool when planning multi-turn task allocation; use check_context_cliff for single-turn length checks or reconcile_usage_receipt for post-hoc invoice auditing.
Inputs: current_model, context_tokens, task_instruction, has_custom_router_config.
check_context_cliffARead-onlyIdempotentInspect
Evaluates whether a prompt token count crosses vendor long-context surcharge thresholds (100K on Claude Haiku 5.5, 128K on GPT-4o, 200K on Gemini 2.5 Pro, or 272K on GPT-6.1 Sol) and returns the surcharge multiplier and recommended flat-context alternative. Deterministic threshold lookup against the embedded 563-entity UMCE registry requiring no API keys. Returns JSON with crosses_cliff_boolean, active_surcharge_multiplier (1.0x below cliff vs 2.0x-5.0x above cliff), and recommended_flat_context_model. Compares prompt_tokens directly against model's specific cliff boundary in the UMCE catalog. Use this tool before sending large prompts (>90K tokens) to avoid 2x-5x cliff surcharges; use compress_and_fold_context instead to shrink the prompt below the cliff.
Inputs: model, prompt_tokens.
compress_and_fold_contextARead-onlyIdempotentInspect
Compresses verbose terminal or build logs by folding repetitive middle progress lines while preserving 100% of head lines, tail lines, compiler errors, stack traces, and file paths. Deterministic in-memory string transformation that mutates no files and requires no authentication. Returns JSON containing line_accounting_reconciliation (where raw_total_lines equals kept_original_lines_total plus omitted_repetitive_lines), byte_and_token_reconciliation (pricing saved tokens against model's input rate), and folded_context_payload. When raw_text is empty or under 50 lines, returns the diagnostic benchmark or unmodified input without truncation. Use this tool when build or test output exceeds 50 lines before appending to agent context; use pin_single_model_prefix_cache instead when optimizing static system prompt prefixes.
Inputs: model, raw_text.
detect_model_downgrade_and_substitutionARead-onlyIdempotentInspect
Evaluates LLM rate-card tiers to quantify relay downgrade risk, cost ratios, and remaining coding session turns. Deterministic in-memory calculation requiring no API keys; unknown model IDs safely fall back to the flagship baseline without error. Sums burned_usd and remaining_usd into the total session pool and projects remaining turns against a $137.45 reference budget, returning cost ratios, an endurance matrix, and a recommended production model ID. Use this tool when comparing session burn rates or suspected relay throttling; use reconcile_usage_receipt for single invoice lines, check_context_cliff for prompt-length surcharges, or optimize_prompt_cache_layout for mid-prompt cache breakpoint fixes.
Inputs: model, burned_usd, remaining_usd.
discover_and_probe_account_modelsARead-onlyIdempotentInspect
Retrieves verified production GA models and eligible zero-cost grant tiers (Google Cloud Tier 1, AWS Activate Bedrock, OpenRouter :free) from the embedded UMCE registry. Deterministic local snapshot lookup that issues zero network probes, requires no API keys, and consumes zero user quota. Returns JSON listing zero-cost workhorse models, flagship reasoning models, and recommended role assignments benchmarked against current_model (formatted as 'vendor/model-slug', defaulting to 'openai/gpt-6.1-sol'). Use this tool at session startup to inspect available model tiers before calling auto_route_task_by_quality_tier; use list_supported_models instead when filtering the full 563-entity Merkle registry by vendor.
Inputs: current_model.
list_supported_modelsARead-onlyIdempotentInspect
Queries the embedded UMCE rate-card registry by vendor namespace to retrieve canonical model IDs, input/output/cache USD prices per 1M tokens, context windows, and Merkle leaf hashes. Deterministic local lookup requiring no API keys; unknown vendor slugs safely return total_matched_entities: 0 and an empty models array without error. Passing provider='all' returns the multi-vendor catalog summary, while a specific vendor slug filters strictly by namespace prefix. Use this tool when filtering the full rate-card catalog by vendor; use discover_and_probe_account_models instead at session startup to select zero-cost grant pools and flagship routing tiers.
Inputs: provider.
optimize_prompt_cache_layoutARead-onlyIdempotentInspect
Reorders a single prompt's dynamic mid-turn tokens after static prefix tokens to prevent 1.25x cold-cache invalidation and restore 0.1x warm cache reads. Advisory in-memory simulation that mutates no live prompts and requires no authentication; zero-token inputs return 0 USD cost without error. Sums static_prefix_tokens and dynamic_mid_tokens to compare before_layout_cost_usd against after_layout_cost_usd and net_savings_pct (0-100). Use this tool when diagnosing mid-prompt timestamps or tool outputs that break cache breakpoints; use pin_single_model_prefix_cache instead to project 10-turn session economics for a target model ID.
Inputs: completion_tokens, dynamic_mid_tokens, static_prefix_tokens.
pin_single_model_prefix_cacheARead-onlyIdempotentInspect
Projects 10-turn session caching costs for a target model under Case A (100% static prefix) and Case B (90% static prefix + 10% dynamic tail) and outputs provider cache-control templates. In-memory actuarial lookup requiring no API keys; unknown model IDs default to 'openai/gpt-6.1-sol' and prompts under 1,024 tokens bypass warm discounts. Resolves model's warm multiplier (0.05x-0.25x) from the UMCE registry to return provider_cache_protocol_mechanism, ten_turn_cost_comparison_on_same_model, and two_vector_actuarial_reference_table (benchmarking 150K and 200K token reference vectors). Use this tool to quantify 10-turn caching ROI on a specific model; use optimize_prompt_cache_layout instead when fixing mid-prompt token ordering.
Inputs: model, prompt_tokens.
reconcile_usage_receiptARead-onlyIdempotentInspect
Audits a single API usage receipt against official 1x manufacturer rate cards from the 563-entity UMCE registry to quantify relay multiplier markups and unutilized prefix cache waste. Deterministic mathematical audit in memory requiring no authentication. Returns JSON with expected_theoretical_cost_usd, billing_variance_usd, variance_status ('OVERCHARGED_BY_RELAY_OR_MARKUP' when variance > $0.001 else 'EXACT_RATE_CARD_MATCH'), same_model_unutilized_cache_waste_usd, and net_recoverable_savings_usd. Enforces cached_tokens <= prompt_tokens, pricing (prompt_tokens - cached_tokens) at uncached input rates and cached_tokens at warm cache rates before comparing against actual_billed_usd. Use this tool when verifying an invoice line item; use detect_model_downgrade_and_substitution instead for session-level budget endurance projections.
Inputs: model, cached_tokens, prompt_tokens, actual_billed_usd, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a genuinely distinct analytical purpose and the descriptions proactively name sibling tools to steer away from misselection (e.g. 'use check_context_cliff instead'). The main residual risk is the two registry lookups (discover_and_probe_account_models vs list_supported_models) and the three cache-related tools, which an agent can only separate by reading the long descriptions rather than from the names alone.
All nine names are snake_case and verb-first imperative (list_, compress_, reconcile_, optimize_, check_, pin_, auto_route_), giving a predictable pattern. Minor deviations: two names are compound 'and' phrases (discover_and_probe_, detect_model_downgrade_and_substitution) and name lengths vary from two to five words, making a few names hard to scan.
Nine tools is well within the ideal range and each maps to a distinct finops workflow: catalog discovery, routing simulation, session endurance, receipt audit, prefix caching, cache layout, context cliffs, and log compression. No tool feels like filler or a duplicate of another.
The advisory surface is broad: model/rate-card lookup, routing ROI, budget endurance, invoice reconciliation, cache strategy, and context surcharges are all covered. Gaps remain in write/apply operations (everything is simulation-only, so an agent cannot persist a routing or cache config) and in aggregate reporting across multiple receipts or sessions.
Maintenance
Related MCP Connectors
Live LLM API pricing, prompt caching discounts, benchmarks, and AI agent cost calculator.
41LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
Live LLM API pricing: token prices, comparisons, cheapest-model lookups. No key required.
Find AI model pricing, estimate token costs and compare offers. No API key required.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time token pricing for AI models, model comparison, cost calculation, and token usage tracking for agents and developers.-
- AlicenseNot gradedqualityDmaintenanceEnables AI cost calculation, comparison, and optimization across major providers like Anthropic, OpenAI, Google, Meta, and Mistral. Supports cost estimation, budget-aware model finding, and token estimation through a simple API and MCP integration.MIT
- AlicenseAqualityAmaintenanceProvides real-time AI compute pricing and cost analysis across LLM providers, enabling session cost tracking, model price comparisons, and historical data queries.2296 npmMIT

OptimToken MCPofficial
AlicenseNot gradedqualityBmaintenanceEnables AI assistants to fetch live, dated prices for LLM models and cloud compute instances across providers, compare and recommend models, and estimate monthly costs based on workload-specific token shapes and constraints.MIT