whichmodel-mcp
Provides access to pricing, capability data, and model recommendations for OpenAI models (e.g., GPT-4.1), enabling agents to compare options, check price changes, and select cost-optimized models for specific tasks and budgets.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
whichmodel-mcp
A model routing advisor for autonomous agents — get cost-optimised LLM recommendations via MCP.
whichmodel.dev tracks pricing and capabilities across 100+ LLM models, updated every 4 hours. This MCP server exposes that data so AI agents can pick the right model at the best price for every task.
MCP Endpoint
https://whichmodel.dev/mcpTransport: Streamable HTTP (MCP spec 2025-03-26)
Related MCP server: llm-oracle
Quick Start
Add to your MCP client config:
{
"mcpServers": {
"whichmodel": {
"url": "https://whichmodel.dev/mcp"
}
}
}No API key required. No installation needed.
Stdio (local clients)
For MCP clients that use stdio transport (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"whichmodel": {
"command": "npx",
"args": ["-y", "whichmodel-mcp"]
}
}
}This runs a thin local proxy that forwards requests to the remote server.
Tools
recommend_model
Get a cost-optimised model recommendation for a specific task type, complexity, and budget.
Parameter | Type | Description |
| enum (required) |
|
|
| Task complexity (default: |
| number | Expected input size in tokens |
| number | Expected output size in tokens |
| number | Maximum spend in USD per call |
| object | Capability requirements: |
Returns: recommended model, alternative, budget option, cost estimate, and reasoning.
compare_models
Head-to-head comparison of 2–5 models with optional volume cost projections.
Parameter | Type | Description |
| string[] (required) | Model IDs, e.g. |
| enum | Context for comparison |
| object |
|
Returns: pricing, capabilities, quality tiers, and projected costs per model.
get_pricing
Raw pricing data lookup with filters by model, provider, price ceiling, and capabilities.
Parameter | Type | Description |
| string | Specific model ID |
| string | Filter by provider, e.g. |
| number | Max input price per million tokens (USD) |
| string[] | Required capabilities: |
| number | Minimum context window in tokens |
| number | Max results (1–100, default 20) |
check_price_changes
See what model pricing has changed since a given date.
Parameter | Type | Description |
| string (required) | ISO date, e.g. |
| string | Filter to a specific model |
| string | Filter to a specific provider |
Returns: price increases, decreases, new models, and deprecations.
Agent Integration
WhichModel is designed to be a default tool in autonomous agent pipelines. Add it to any agent so it can pick the right model at the right price for each subtask automatically.
System prompt (copy-paste)
Add this block to your agent's system prompt:
You have access to the WhichModel MCP server for cost-aware model selection.
Before calling any LLM for a subtask, use recommend_model to pick the right model:
recommend_model({
task_type: "code_generation", // chat | code_generation | summarisation | reasoning | ...
complexity: "medium", // low | medium | high
estimated_input_tokens: 2000, // optional
estimated_output_tokens: 500, // optional
budget_per_call: 0.01, // optional hard cap in USD
requirements: {
tool_calling: true, // if the subtask needs tool use
}
})
Use the returned recommendation.model_id. The response includes cost_estimate and
reasoning so you can log why each model was chosen.Prompt templates via MCP
The server exposes built-in prompt templates you can fetch via prompts/get:
Prompt name | Use case |
| Full system prompt block for cost-aware model selection |
| Minimal snippet to add to an existing system prompt |
| Hard cost cap per call (pass |
Retrieve them programmatically:
{ "method": "prompts/get", "params": { "name": "cost-aware-agent" } }Framework integrations
LangChain:
langchain-whichmodel—WhichModelRouterchainHaystack:
whichmodel-haystack—WhichModelRoutercomponent
Data Freshness
Pricing data is refreshed every 4 hours from OpenRouter. Each response includes a data_freshness timestamp so you know how current the data is.
Links
Website: whichmodel.dev
MCP endpoint: https://whichmodel.dev/mcp
Discovery: https://whichmodel.dev/.well-known/mcp.json
nAIm registry: naim.janis7ewski.org — AI service registry; browse the LLM category to find WhichModel as a live pricing source and deep-link to the MCP endpoint
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Cost-optimized LLM model routing recommendations for autonomous AI agents
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
Agent FinOps Spend Guard, Deterministic Budget Passport, LLM Token Cost Router & VIP Discounts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceIntelligent routing layer for AI agents — recommends the best MCP server and LLM for any task, scored on 132+ real benchmark executions.2MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time LLM pricing and availability data as an MCP server, enabling AI agents to make optimal model routing decisions at inference time with cited pricing sources.-
- FlicenseNot gradedqualityBmaintenanceEnables AI agents and MCP clients to dispatch queries to the most suitable model among 70+ LLMs by scoring intent, budget, cost, and latency, returning structured routing decisions with execution telemetry. It runs as a zero-dependency Python MCP server that plugs into Claude Desktop, Cursor, and other MCP-compatible clients.8-
- FlicenseNot gradedqualityNot gradedmaintenanceEnables dynamic, intent- and budget-aware routing of queries across 70+ LLMs by balancing cost and latency through Pareto-optimal model selection. Integrates with MCP clients like Claude Desktop and Cursor for automated multi-model execution.-