
Ai Model Router
A lightweight router for AI model requests running on Cloudflare Workers, exposing both REST and MCP interfaces over JSON-RPC 2.0. The implementation uses streamable HTTP transport and is hosted at api.lazy-mac.com/ai-model-router. Reach for this when you need to route model requests through a serverless edge layer, though the public documentation is minimal about which specific AI providers or models it connects to. The dual REST/MCP interface means you can integrate it into existing HTTP workflows or connect it directly as an MCP server, making it flexible for different architectural patterns.
- tools
- 3
- transport
- HTTP
- last updated
- May 16, 2026
Install
From registry metadata$ npx add-mcp https://api.lazy-mac.com/ai-model-router/mcp --name ai-model-routerRun 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-model-router https://api.lazy-mac.com/ai-model-router/mcpRun in your terminal. Add --scope user to make it available in every project.
Tools
Verified live · 3 toolsVerified live against the running server on Nov 6, 2026.
route_modelSelect the optimal AI model (GPT-4, Claude, Gemini) for a task based on type, cost, and provider preferences.7 params
Select the optimal AI model (GPT-4, Claude, Gemini) for a task based on type, cost, and provider preferences.
input_tokensintegermax_cost_usdnumberoutput_tokensintegerprefer_providerstringopenai · anthropic · googleprefer_tierstringeconomy · standard · premiumpromptstringtask_typestringcode · analysis · creative · summarize · classify · reasoncompare_modelsCompare cost and task fit across all supported AI models for a given prompt or token count.4 params
Compare cost and task fit across all supported AI models for a given prompt or token count.
input_tokensintegeroutput_tokensintegerpromptstringtask_typestringlist_modelsList all supported AI models with pricing and capabilities.
List all supported AI models with pricing and capabilities.
No parameters. Call it with no arguments.
Sponsors
Readme
ai-model-router-api
Cloudflare Workers MCP server: ai-model-router. REST + MCP (JSON-RPC 2.0). Live: api.lazy-mac.com/ai-model-router
Details
- Repository
- github.com/lazymac2x/ai-model-router-api
- Category
- Cloud & Infrastructure
- Transport
- HTTP
- Registry
- MCP registry, active
- Tools verified
- Nov 6, 2026
More from lazymac2x
- 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
- Cron Monitor
- Cron Parser
- Crypto Signal