
Ai Cost Optimizer
This is a Cloudflare Workers-based server that helps you optimize AI API costs, though the source doesn't reveal specific operations or integrations. It's deployed as a remote MCP server over streamable HTTP, so you connect to it at api.lazy-mac.com rather than running it locally. The dual REST and MCP interface suggests it can work both as a traditional API and through Claude's MCP protocol. You'd likely reach for this if you're managing multiple AI provider costs and want centralized optimization logic without hosting your own service. Without more documentation on what cost optimization strategies it actually implements or which AI providers it supports, you'll need to explore the API directly to see if it fits your use case.
- tools
- 5
- transport
- HTTP
- last updated
- May 16, 2026
Install
From registry metadata$ npx add-mcp https://api.lazy-mac.com/ai-cost-optimizer/mcp --name ai-cost-optimizerRun in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add --transport http ai-cost-optimizer https://api.lazy-mac.com/ai-cost-optimizer/mcpRun in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 5 toolsVerified live against the running server on Nov 6, 2026.
cost_trackerRecord and retrieve AI API call costs by team. Persists to Cloudflare KV — survives cold starts and scale-out.6 params
Record and retrieve AI API call costs by team. Persists to Cloudflare KV — survives cold starts and scale-out.
action*stringrecord · getinputTokensnumbermetadataobjectmodelstringoutputTokensnumberteamstringtoken_calculatorCalculate cost from token counts for any supported AI model. Stateless — no KV required.3 params
Calculate cost from token counts for any supported AI model. Stateless — no KV required.
inputTokens*numbermodel*stringoutputTokens*numberbudget_alertSet and check budget limits for teams. Raises a flag when a configurable spending threshold is reached.4 params
Set and check budget limits for teams. Raises a flag when a configurable spending threshold is reached.
action*stringset · checkbudgetLimitnumberteamstringthresholdnumbermodel_breakdownAnalyze costs broken down by model for a given team over a configurable time window.2 params
Analyze costs broken down by model for a given team over a configurable time window.
daysnumberteamstringcost_forecastForecast future AI spend based on historical usage patterns using daily-average linear projection.3 params
Forecast future AI spend based on historical usage patterns using daily-average linear projection.
forecastDaysnumberhistoricalDaysnumberteamstringSponsors
Readme
ai-cost-optimizer-api
Cloudflare Workers MCP server: ai-cost-optimizer. REST + MCP (JSON-RPC 2.0). Live: api.lazy-mac.com/ai-cost-optimizer
Details
- Repository
- github.com/lazymac2x/ai-cost-optimizer-api
- Category
- Cloud & Infrastructure
- Transport
- HTTP
- Registry
- MCP registry, active
- Tools verified
- Nov 6, 2026
More from lazymac2x
- Ai Eval
- Ai Guardrails
- Ai Model Router
- Ai Prompt Optimizer
- Ai Provider Status
- Ai Rate Limit Tracker
- Ai Token Counter
- Api Changelog Tracker
- Api Composition Gateway
- Api Contract Validator
- Api Diff Monitor
- Api Flow Analyzer
- Api Payload Auditor
- Api Perf Analyzer
- Api Request Deduplicator
- Api Response Cost Analyzer
- Api Schema Drift Detector
- Blog
- Citation Verifier
- Claude Skill Validator
- Code Explainer
- Code Pattern Risk Scanner
- Color Palette
- Cron Collision Detector