models-mcp
Models MCP
AIモデルの価格、コンテキストウィンドウ、機能による検索・比較・調査を行います。models.dev カタログ(models.dev/api.json)を基盤とするMCPサーバーで、エージェントが手動でリストを管理することなく、常に最新のモデルデータを利用できます。
models.dev自体はMCPサーバーを提供しておらず、JSON APIと読み取り用のTypeScript SDKのみを提供しています。このツールがそのギャップを埋めます。
同じツールコードから2つの方法で動作します:
stdio(
src/index.ts)— ローカルMCPクライアント用Cloudflare Worker(
src/worker.ts)—/mcpにおけるリモートのStreamable HTTPエンドポイントとして
ツール
ツール | 機能 |
| すべてのプロバイダー(anthropic、openai、google、...)をモデル数とともに一覧表示します |
| 名前、プロバイダー、最小コンテキストウィンドウ、最大入力コスト、または機能フラグ(reasoning、tool_call、attachment)でモデルをフィルタリングします |
|
|
| 2〜6個のモデルを価格、コンテキスト、機能について横並びで比較します |
| 1時間のキャッシュをバイパスして再取得を強制します |
インストール
npm install
npm run buildstdioでスタンドアロン実行(テスト用)
npm startstdio上でMCPを話すため、直接はあまり表示されません。MCP Inspector を使用して操作してください:
npx @modelcontextprotocol/inspector node dist/index.jsCloudflare Workersでのホスティング
Workerエントリ(src/worker.ts)は、同じツールを /mcp のStreamable HTTPで提供し、以下の機能を備えています:
カタログキャッシュ — Workers Cache API(
caches.default)に1時間のTTLで保存され、リクエストとアイソレート間で共有されます。IPごとのレート制限 — Workersレート制限バインディングによるIPごとの制限:IPあたり毎分60リクエスト、Cloudflareのロケーションごとに適用されます。超過リクエストには
Retry-After: 60付きの429が返されます。
# local dev at http://localhost:8787/mcp
npm run dev:worker
# deploy
npm run deployデプロイ後、エンドポイントは https://models-mcp.<your-subdomain>.workers.dev/mcp になります。
MCPクライアントをそこに向けます:
Claude Code:
claude mcp add --transport http models-mcp https://models-mcp.<your-subdomain>.workers.dev/mcp汎用クライアント設定(Streamable HTTPを話すもの):
{
"mcpServers": {
"models-mcp": {
"url": "https://models-mcp.<your-subdomain>.workers.dev/mcp"
}
}
}stdio専用クライアント(Claude Desktop)の場合は、mcp-remote でブリッジします:
{
"mcpServers": {
"models-mcp": {
"command": "npx",
"args": ["mcp-remote", "https://models-mcp.<your-subdomain>.workers.dev/mcp"]
}
}
}どこでもAPIキーは不要です。すべてのデータは公開の models.dev/api.json エンドポイントから取得されます。
テスト
npm testカタログクライアント(フラット化、TTLキャッシュ、強制リフレッシュ、失敗時の古いデータへのフォールバック、ID解決)と、5つのツールすべてを、インメモリトランスポート上の実際のMCPクライアントセッションを通じてエンドツーエンドでカバーします。
データに関する注意事項
カタログは1時間キャッシュされます:ホスト時はWorkers Cache API、stdioではプロセスメモリ内です。
refresh_catalogを呼び出すと強制的に更新されます。再取得に失敗した場合、最後に正常に取得されたカタログが提供され続けます。models.devはコンシューマー向けのバージョン管理されたスキーマを公開していないため、
src/types.tsの型は意図的に緩めになっています(インデックスシグネチャが明示的に型付けされていないフィールドを保持します)。モデルIDはAI SDKとOpenCodeで使用される
provider/modelの規則に従います。例:anthropic/claude-sonnet-4-5。get_modelとcompare_modelsは、プロバイダー間で曖昧でない場合、モデルIDのみの指定も受け付けます。
考えられる拡張機能
他のモデルカタログMCPが公開しているような
list_facetsツール(モダリティ、トークナイザー)。設定済みのプロバイダーキーを通じてライブ呼び出しを行い、レイテンシー/コストの健全性チェックを行う
test_modelツール。Workerの前面にOAuthまたはCloudflare Accessを配置して、プライベートにしたい場合。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search 200+ UnoRouter models (most free), check pricing, and chat through one key
Search, compare, and find alternatives across a curated catalog of 1,100+ AI tools.
@latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singl…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/QAInsights/models-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server