etuki-finops-mcp
Etuki FinOps MCP provides deterministic, read-only tools to optimize and audit LLM API costs, routing, caching, and billing across 563+ models.
Discover eligible zero-cost/GA model tiers and credit pools for a session.
Simulate 6-turn quality-tier routing to compare unrouted vs tiered costs.
Calculate 10-turn prefix-cache savings and generate cache-control templates.
Compress repetitive build/terminal logs while preserving errors and stack traces.
Detect relay downgrade/substitution risk and project remaining session budget/turns.
Audit usage receipts against official 1x rate cards for overcharges and cache waste.
Optimize prompt cache layout by moving volatile tokens after static prefixes.
Check prompts for context-window surcharge cliffs and get flat-context alternatives.
Query the 563-entity model rate-card registry with pricing, context windows, and hashes.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
🛡️ Etuki AI FinOps (etuki-gate & etuki-finops-mcp)
If your AI agent bill went up and nothing errored, a prompt cache broke.
Works on Windows, macOS & Linux (pure MIT License) — 100% browser-local.jsonltranscript & CSV bill auditor (etuki.com/audit), live auto-calibrated pricing across 563+ models, pre-flight MCP router, and native Claude Code Plugin (.claude-plugin/).

Install from Official Microsoft VS Code Marketplace (VS Code / Cursor / Windsurf)
Search Etuki AI FinOps in your Extensions sidebar, visit VS Code Marketplace, or run:
code --install-extension etuki.etuki-finopsQuick Install as Native Claude Code Plugin
/plugin marketplace add cooyun/etuki-gate
/plugin install etuki-finops@etuki-finops-marketplaceetuki-finops-mcp is an official Model Context Protocol (MCP) Server built on the @modelcontextprotocol/sdk standard (supporting both STDIO and Streamable HTTP / SSE transports at https://www.etuki.com/api/v1/mcp).
It equips MCP clients (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, ZCode, and Gemini CLI) with 9 deterministic MCP Tools, 2 MCP Resources, and 2 MCP Prompts for real-time LLM API pricing lookup across 563+ models, 0.1x/0.025x prompt-cache breakpoint locking, relay downgrade detection, and SHA-256 billing receipt reconciliation.
🏗️ MCP Server Implementation in This Repository
Root STDIO & HTTP MCP Server Entrypoint:
./index.mjs&./etuki-finops-mcp/index.mjsPackage & MCP SDK Dependency (
@modelcontextprotocol/sdk):./package.jsonGlama Server Manifest:
./glama.jsonOfficial MCP Registry Manifest:
./server.jsonContainer Sandbox:
./DockerfileRemote Streamable-HTTP MCP Endpoint:
https://www.etuki.com/api/v1/mcp
Related MCP server: ai-cost-calculator-api
🛠️ Exposed MCP Tools (tools/list — 9 Read-Only Deterministic Tools)
All 9 MCP tools implement strict JSON Schema inputSchema, outputSchema, and MCP security annotations (readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false):
# | MCP Tool Name | Description | Required Parameters |
1 |
| Probes available & free-tier models in the user's connected API account to offload non-architectural file scans. |
|
2 |
| Computes a 6-turn Pareto routing plan (4 scan turns + 2 flagship synthesis turns) with dual cash vs full-economic accounting. |
|
3 |
| Calculates 10-turn prompt cache savings and places 4 |
|
4 |
| Folds repetitive build/terminal logs by up to 90% while preserving 100% of AST/compiler error lines. |
|
5 |
| Evaluates channel risk for silent model downgrade or quantization on third-party API relays. |
|
6 |
| Audits an LLM API usage receipt against official 1x vendor rate cards to detect relay markups and unpinned cache waste. |
|
7 |
| Detects >128K / >200K context window surcharge cliffs and recommends optimal sliding-window truncation. |
|
8 |
| Queries the 563-entity Merkle-verified LLM & cloud rate card catalog ( |
|
9 |
| Retrieves the RS256 cryptographic signature envelope, 12-field Merkle inclusion proofs, and double-entry ledger state. |
|
📚 Exposed MCP Resources (resources/list)
etuki://catalog/leaves-563(application/json): 563-Entity 12-Field Merkle Rate Card & Model Compatibility Registry.etuki://ledger/zcode-152-audit(application/json): SHA-256 Reconciled Production Billing Audit Ledger.
💬 Exposed MCP Prompts (prompts/list)
pre_flight_cost_saver_workflow: Pre-flight cost optimization workflow combining model discovery, 6-turn routing, and prefix cache pinning.sha256_bill_forensic_audit: Forensic audit prompt for verifying API usage receipts against official 1x vendor pricing.
⚡ Quick Start & MCP Client Configuration
Option A: Claude Desktop (claude_desktop_config.json) or Cursor (.cursor/mcp.json) — Remote Streamable HTTP
{
"mcpServers": {
"etuki-finops-mcp": {
"url": "https://www.etuki.com/api/v1/mcp"
}
}
}Option B: Local STDIO Execution via Node.js (index.mjs)
{
"mcpServers": {
"etuki-finops-mcp": {
"command": "node",
"args": ["/path/to/etuki-gate/index.mjs"]
}
}
}# Run STDIO MCP Server locally:
npm install
node index.mjsAvailable 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
LLM 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.
LLM API prices and AI agent cost estimates, verified daily. Read-only cost lookup tools.
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
- AlicenseAqualityBmaintenanceLive LLM API pricing: current token prices, model comparisons, cheapest-model lookups, and The LLM Price Index for 150+ models across 20+ providers, re-verified daily. No API key required.41MIT
- AlicenseAqualityAmaintenanceProvides real-time AI compute pricing and cost analysis across LLM providers, enabling session cost tracking, model price comparisons, and historical data queries.22182 npmMIT