Skip to main content
Glama

Models MCP

AIモデルの価格、コンテキストウィンドウ、機能による検索・比較・調査を行います。models.dev カタログ(models.dev/api.json)を基盤とするMCPサーバーで、エージェントが手動でリストを管理することなく、常に最新のモデルデータを利用できます。

models.dev自体はMCPサーバーを提供しておらず、JSON APIと読み取り用のTypeScript SDKのみを提供しています。このツールがそのギャップを埋めます。

同じツールコードから2つの方法で動作します:

  • stdiosrc/index.ts)— ローカルMCPクライアント用

  • Cloudflare Workersrc/worker.ts)— /mcp におけるリモートのStreamable HTTPエンドポイントとして

ツール

ツール

機能

list_providers

すべてのプロバイダー(anthropic、openai、google、...)をモデル数とともに一覧表示します

find_models

名前、プロバイダー、最小コンテキストウィンドウ、最大入力コスト、または機能フラグ(reasoning、tool_call、attachment)でモデルをフィルタリングします

get_model

provider/model IDによる1つのモデルの完全なメタデータを取得します

compare_models

2〜6個のモデルを価格、コンテキスト、機能について横並びで比較します

refresh_catalog

1時間のキャッシュをバイパスして再取得を強制します

インストール

npm install
npm run build

stdioでスタンドアロン実行(テスト用)

npm start

stdio上でMCPを話すため、直接はあまり表示されません。MCP Inspector を使用して操作してください:

npx @modelcontextprotocol/inspector node dist/index.js

Cloudflare 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-5get_modelcompare_models は、プロバイダー間で曖昧でない場合、モデルIDのみの指定も受け付けます。

考えられる拡張機能

  • 他のモデルカタログMCPが公開しているような list_facets ツール(モダリティ、トークナイザー)。

  • 設定済みのプロバイダーキーを通じてライブ呼び出しを行い、レイテンシー/コストの健全性チェックを行う test_model ツール。

  • Workerの前面にOAuthまたはCloudflare Accessを配置して、プライベートにしたい場合。

-
license - not tested
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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…

View all MCP Connectors

Latest Blog Posts

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