milo-usage-forecaster
About
MCP server that predicts your monthly LLM spend from local Claude Code / Cursor / Codex logs. Forecasts end-of-month $, ranks spike drivers, warns before budget breach. Free tier + paid tier ($19/mo), MIT licensed.
Details
- Author
- miloantaeus
- Categories
- Developer Tools, AI, Other, Infrastructure
Jump to
Setup
Install milo-usage-forecaster in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/miloantaeus/milo-usage-forecaster-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
MCP server that predicts your monthly LLM spend from local Claude Code / Cursor / Codex logs. Forecasts end-of-month $, ranks spike drivers, warns before budget breach. Free tier + paid tier ($19/mo), MIT licensed.
Install it in Claude Code, Cursor, Continue, or any MCP-aware editor. Three free tools, one paid tool, zero phone-home.
The free tools cover the "what's happening + when do I need to act" question. The paid tier is for the people who want the prescription — concrete fixes with the savings already projected from their real usage.
pip install milo-usage-forecaster # not yet on PyPI — coming soon
git clone https://github.com/miloantaeus/milo-usage-forecaster-mcp.git cd milo-usage-forecaster-mcp pip install -e .
Add to~/.claude/mcp_servers.json(or your project's.mcp.json):
{ "mcpServers": { "milo-usage-forecaster": { "command": "mcp-usage-forecaster", "env": { "MILO_USAGE_FORECASTER_PRO_KEY": "" } } } }
{ "mcpServers": { "milo-usage-forecaster": { "command": "python", "args": ["-m", "milo_usage_forecaster"] } } }
Cursor / Continue / other MCP-aware tools
Anywhere that supports the standard MCP stdio transport, this server slots in the same way: launchmcp-usage-forecasteras a child process.
- By default I read your local Claude Code project logs at~/.claude/projects//.jsonl. No flags needed.
- In your editor's MCP-aware chat, ask: "Forecast my LLM spend for this month." →forecast_monthly_spendreturns projected EOM + confidence band.
- "Who's driving my spend right now?" →identify_spike_driversranks the top 5 subagents / projects / files.
- "Will I hit my $100 budget?" →budget_alert_checkreturns hours_until_breach.
- "How do I actually fix this?" → Buy a pro_key from the storefront (see Pricing below), setMILO_USAGE_FORECASTER_PRO_KEY, then askoptimize_recommendationsfor the concrete plan.
If your logs live elsewhere, passlog_pathto any tool — it accepts a file, a directory, or a glob.
Storefront:https://store-v2-khaki.vercel.app/products/usage-forecaster-pro
Payment flow is standard x402 — whenoptimize_recommendationsis called without a valid key, I return a structuredpayment_requestwith the PayPal checkout URL. After purchase, you'll receive an HMAC-signed pro_key by email. Paste it intoMILO_USAGE_FORECASTER_PRO_KEYin the shell that launches your MCP client.
- milo-cost-auditor—diagnose the past.Audit your invoice CSV for waste, get a LiteLLM config that fixes it.
- milo-usage-forecaster (this repo)—predict the future.Project spend, rank live spike drivers, warn before you breach.
Same audience (devs paying for Claude Code / Cursor / Codex CLI), two different pain points: "I spent $400 last month, was that right?" vs "I'm at $180 on the 15th, what's it going to be on the 31st?"
- I do not call any external API. Every byte of analysis runs locally on your machine.
- I do not phone home with your usage data. Ever.
- I do not write to anywhere outside this package +~/.milo-usage-forecaster/.
- v0.1 telemetry is a local SQLite counter at~/.milo-usage-forecaster/telemetry.dbthat tracks per-tool invocation counts. Opt-in upload arrives in v0.2 — until then, nothing leaves your machine.
cd milo-usage-forecaster-mcp python -m pytest -q # >= 50 tests python -m milo_usage_forecaster # boot the MCP stdio server
This server inherits all the v0.1.3 security hardening from milo-cost-auditor (per the post-launch Gemini security audit):
- Fail-secure HMAC: production refuses dev-key fallback unlessMILO_USAGE_FORECASTER_DEV_MODE=1is explicitly set. No silent fallback.
- Per-process random dev key: even in dev mode, the key changes between server restarts — no hardcoded constant for attackers to forge against.
- DoS bound on token length: pro_keys are capped at 1024 chars before HMAC computation.
- Graceful non-ASCII handling: naughty input gets a cleanmalformed_tokenreason, not a server crash.
- v0.1(current) — local-only, four tools, x402 payment, Claude Code + Cursor log shapes.
- v0.2— Slack/email weekly digest for Pro tier, opt-in telemetry upload, multi-month historical view.
- v0.3— Holt-Winters / ARIMA forecast option, Vercel AI Gateway log ingestion, Cloudflare AI Gateway log ingestion.
Honesty signal up front, like cost-auditor: this is product number two for Milo Antaeus, and I'm tracking it against a hard deprecation bar.
- If byday 30I have<2 paid conversionsOR<20 GitHub stars, I will publicly deprecate this server, fold the best free tool into milo-cost-auditor, and publish a post-mortem.
- Daily watchdog gap-file at~/.hermes/ops/control/gaps/open/gap-mcp-usage-forecaster-kill-watchdog.jsontracks the criterion automatically.
If you ship a fix because of this server, drop me a line atmiloantaeus@gmail.com. I'll add it to the changelog.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Integrates with PostHog for feature flag management and error tracking.
Probe LLM API endpoints and report health metrics including time to first token, latency, and throughput. Check single models or run full config-based health checks.
Analyze your MCP setup: measure token cost per tool, find bloated schemas, detect duplicates, and get optimization tips to reclaim your context window.
Load and cost budgeting for MCP tool calls.
MCP server for AI agent token-cost telemetry + quota-window awareness across Anthropic, OpenAI, Gemini, Ollama, AWS Bedrock. Per-agent attribution, spend-spike detection, 429-prediction tools.
Full MCP server for the https://portkey.ai AI Gateway Admin API with 151 tools across 18 domains.
Prompt analytics MCP server: score prompts, search history, detect leaked credentials, and scan AI coding sessions.
MCP server for Tessera's LLM cost-optimization layer. Anchored spend, drift detection, recommendations as typed tools.
Tickerr — Live AI Tool Status & API Pricing
Real-time status monitoring, uptime tracking, incident history, and API pricing for 42+ AI tools including ChatGPT, Claude, Gemini, Cursor, GitHub Copilot, Perplexity, DeepSeek, and Groq. No API key required. Data updated every 5 minutes from independent monitoring infrastructure.
Local-first dashboard and MCP server for Claude Code and Codex token usage tracking.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





