whichmodel-mcp
whichmodel-mcp
自律型エージェントのためのモデルルーティングアドバイザー — MCP経由でコスト最適化されたLLMの推奨を取得します。
whichmodel.dev は100以上のLLMモデルの価格と機能を追跡し、4時間ごとに更新しています。このMCPサーバーはそのデータを公開し、AIエージェントがあらゆるタスクに対して最適な価格で適切なモデルを選択できるようにします。
MCPエンドポイント
https://whichmodel.dev/mcpトランスポート: Streamable HTTP (MCP spec 2025-03-26)
Related MCP server: ToolRoute
クイックスタート
MCPクライアントの設定に追加してください:
{
"mcpServers": {
"whichmodel": {
"url": "https://whichmodel.dev/mcp"
}
}
}APIキーは不要です。インストールも必要ありません。
Stdio (ローカルクライアント)
stdioトランスポートを使用するMCPクライアント(Claude Desktop、Cursorなど)の場合:
{
"mcpServers": {
"whichmodel": {
"command": "npx",
"args": ["-y", "whichmodel-mcp"]
}
}
}これは、リモートサーバーにリクエストを転送する軽量なローカルプロキシを実行します。
ツール
recommend_model
特定のタスクタイプ、複雑さ、予算に対して、コスト最適化されたモデルの推奨を取得します。
パラメータ | 型 | 説明 | ||
| enum (必須) |
| ||
|
|
|
| タスクの複雑さ (デフォルト: |
| number | トークン単位の予想入力サイズ | ||
| number | トークン単位の予想出力サイズ | ||
| number | 1回のリクエストあたりの最大予算 (USD) | ||
| object | 機能要件: |
戻り値: 推奨モデル、代替案、予算オプション、コスト見積もり、およびその理由。
compare_models
2〜5つのモデルの直接比較(オプションでボリュームコスト予測付き)。
パラメータ | 型 | 説明 |
| string[] (必須) | モデルID、例: |
| enum | 比較のコンテキスト |
| object | 日次/月次のコスト予測のための |
戻り値: 価格、機能、品質ティア、およびモデルごとの予測コスト。
get_pricing
モデル、プロバイダー、価格上限、機能でフィルタリングされた生の価格データ検索。
パラメータ | 型 | 説明 |
| string | 特定のモデルID |
| string | プロバイダーによるフィルタリング、例: |
| number | 100万トークンあたりの最大入力価格 (USD) |
| string[] | 必要な機能: |
| number | 最小コンテキストウィンドウ (トークン数) |
| number | 最大結果数 (1〜100、デフォルト 20) |
check_price_changes
指定した日付以降に変更されたモデル価格を確認します。
パラメータ | 型 | 説明 |
| string (必須) | ISO日付、例: |
| string | 特定のモデルにフィルタリング |
| string | 特定のプロバイダーにフィルタリング |
戻り値: 価格の上昇、下落、新しいモデル、および廃止されたモデル。
エージェント統合
WhichModelは、自律型エージェントパイプラインのデフォルトツールとして設計されています。あらゆるエージェントに追加することで、各サブタスクに対して適切な価格で適切なモデルを自動的に選択できるようになります。
システムプロンプト (コピー&ペースト)
このブロックをエージェントのシステムプロンプトに追加してください:
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.MCP経由のプロンプトテンプレート
サーバーは prompts/get 経由で取得できる組み込みのプロンプトテンプレートを公開しています:
プロンプト名 | ユースケース |
| コストを意識したモデル選択のための完全なシステムプロンプトブロック |
| 既存のシステムプロンプトに追加するための最小限のスニペット |
| 1回のリクエストあたりの厳格なコスト上限 ( |
プログラムで取得する方法:
{ "method": "prompts/get", "params": { "name": "cost-aware-agent" } }フレームワーク統合
LangChain:
langchain-whichmodel—WhichModelRouterチェーンHaystack:
whichmodel-haystack—WhichModelRouterコンポーネント
データの鮮度
価格データはOpenRouterから4時間ごとに更新されます。各レスポンスには data_freshness タイムスタンプが含まれており、データの鮮度を確認できます。
リンク
ウェブサイト: whichmodel.dev
MCPエンドポイント: https://whichmodel.dev/mcp
nAImレジストリ: naim.janis7ewski.org — AIサービスレジストリ。LLMカテゴリを閲覧して、WhichModelをライブ価格ソースとして見つけ、MCPエンドポイントへのディープリンクを取得できます。
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 Cost Allocator MCP — multi-tenant LLM cost attribution for chargeback billing. Companion to
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceLLM routing proxy that cuts API costs 60-90% by auto-selecting the cheapest capable model across OpenAI, Anthropic, and Google. Provides stats, config, and model comparison tools via MCP.21 npm1MIT
- AlicenseNot gradedqualityDmaintenanceIntelligent routing layer for AI agents — recommends the best MCP server and LLM for any task, scored on 132+ real benchmark executions.5 npm1MIT
- AlicenseNot gradedqualityDmaintenanceLLM cost optimization and provider usage visibility for MCP-capable agents.29 npmMIT
- 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.-