etuki-finops-mcp
# 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](https://www.etuki.com)
- **VS Code Extension**: [etuki.etuki-finops](https://marketplace.visualstudio.com/items?itemName=etuki.etuki-finops)
- **npm Package**: `npx -y etuki-finops-mcp`
## Included Local Stdio MCP Tools (6 Tools)
1. **`list_supported_models`**: Search the 452 live-synced OpenRouter/LiteLLM model rate cards (input, output, cache read, and cache write rates per 1M tokens).
2. **`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_rate` vs. `model_prompt_retry_rate`).
3. **`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.
4. **`compress_and_fold_context`**: Fold repetitive middle lines of terminal/compiler logs while preserving head, tail, and error/exception lines.
5. **`reconcile_usage_receipt`**: Compare an actual billed dollar amount against official 1x model rate cards.
6. **`audit_local_usage_log`**: Parse JSONL usage objects in memory to flag mid-session prompt-cache breaks (`>5m TTL` expirations or prefix shifts).
## Local Stdio MCP Configuration
```json
{
"mcpServers": {
"etuki-finops": {
"command": "npx",
"args": ["-y", "etuki-finops-mcp"]
}
}
}
```
## Offline CLI Usage
```bash
# 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.json
```
## License
MIT
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.