lazymac2x avatar

Ai Model Router

lazymac2x/ai-model-router-api

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-router

Run 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/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 3 tools

Verified 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.

Parameters* required
input_tokensinteger
max_cost_usdnumber
Max budget in USD per call
output_tokensinteger
prefer_providerstring
one of openai · anthropic · google
prefer_tierstring
one of economy · standard · premium
promptstring
Task description for auto-classification
task_typestring
one of code · analysis · creative · summarize · classify · reason
compare_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.

Parameters* required
input_tokensinteger
output_tokensinteger
promptstring
task_typestring
list_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

Related Cloud & Infrastructure MCP servers

View all
1lazymac2x avatarAi Prompt Optimizerlazymac2x/ai-prompt-optimizer-apiCloudflare Workers MCP server: ai-prompt-optimizer0stars
2lazymac2x avatarAi Provider Statuslazymac2x/ai-provider-status-apiCloudflare Workers MCP server: ai-provider-status0stars
3lazymac2x avatarAi Rate Limit Trackerlazymac2x/ai-rate-limit-tracker-apiCloudflare Workers MCP server: ai-rate-limit-tracker0stars
4lazymac2x avatarApi Changelog Trackerlazymac2x/api-changelog-tracker-apiCloudflare Workers MCP server: api-changelog-tracker0stars
5lazymac2x avatarApi Composition Gatewaylazymac2x/api-composition-gateway-apiCloudflare Workers MCP server: api-composition-gateway0stars
6lazymac2x avatarApi Contract Validatorlazymac2x/api-contract-validator-apiCloudflare Workers MCP server: api-contract-validator0stars