models-mcp
Models MCP
AI 모델을 가격, 컨텍스트 창, 기능에 따라 검색, 비교, 조사합니다. models.dev 카탈로그(models.dev/api.json)를 기반으로 하는 MCP 서버로, 목록을 수동으로 유지하지 않아도 에이전트가 항상 최신 모델 데이터를 사용할 수 있습니다.
models.dev 자체는 MCP 서버를 제공하지 않고 JSON API와 이를 읽기 위한 TypeScript SDK만 제공합니다. 이 프로젝트가 그 공백을 메웁니다.
동일한 도구 코드로 두 가지 방식으로 실행됩니다:
stdio(
src/index.ts): 로컬 MCP 클라이언트용Cloudflare Worker(
src/worker.ts):/mcp에서 원격 Streamable HTTP 엔드포인트로 제공
도구
도구 | 기능 |
| 모든 제공업체(anthropic, openai, google 등)를 모델 수와 함께 나열 |
| 이름, 제공업체, 최소 컨텍스트 창, 최대 입력 비용 또는 기능 플래그(reasoning, tool_call, attachment)로 모델 필터링 |
|
|
| 2~6개 모델의 가격, 컨텍스트, 기능을 나란히 비교 |
| 1시간 캐시를 우회하고 강제로 다시 가져오기 |
Related MCP server: TokenLab Model Explorer
설치
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로 캐시되며 요청과 격리(isolate) 간에 공유됩니다.IP별 속도 제한: Workers rate limiting 바인딩을 통해 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 해석)와 다섯 가지 도구 전체를 인메모리 전송을 통한 실제 MCP 클라이언트 세션으로 종단 간(end-to-end) 테스트합니다.
데이터 참고 사항
카탈로그는 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를 추가.
Available Tools
8 toolscompare_modelsCompare modelsA
Diff 2-6 models side by side on pricing, context window, and capabilities. Accepts 'provider/model' ids, or bare model ids when unambiguous across providers. Ids resolving to the same model are compared once.
Inputs: ids (required).
estimate_costEstimate costA
Estimate the USD cost of a request to one model from its published per-million-token rates. Use get_model first if you need to pick an id.
Inputs: id (required), inputTokens, outputTokens, cacheReadTokens, +1 more.
find_modelsFind modelsA
Search and filter models across all providers by name, provider, capability, context window, or price. Returns a compact summary per model; use get_model for full details on one.
Inputs: limit, query, provider, minContext, +4 more.
get_modelGet modelA
Fetch full metadata for one model. Accepts 'provider/model' (preferred, e.g. 'anthropic/claude-sonnet-4-5') or a bare model id if unambiguous across providers.
Inputs: id (required).
get_providerGet providerA
Fetch metadata for one provider: display name, AI SDK package name, API base URL, docs link, and a compact list of its models. Accepts the provider id ('anthropic') or display name ('Anthropic'). Use get_model for full per-model detail.
Inputs: id (required).
list_providersList providersA
List every provider in the models.dev catalog (e.g. anthropic, openai, google) with its model count. Use this to see what's available before narrowing with find_models.
Inputs: no named parameters.
refresh_catalogRefresh catalogA
Force a fresh fetch of the models.dev catalog, bypassing the in-memory cache. Use if you suspect the data is stale. If the refetch fails, the last good catalog keeps being served and servedStale is reported as true.
Inputs: no named parameters.
top_modelsTop modelsA
Rank models by one criterion: cheapest input/output price per million tokens, largest context window, most context per input dollar, or newest release. Supports the same filters as find_models.
Inputs: sortBy (required), limit, query, provider, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct operation: listing providers, searching models, fetching details, comparing, refreshing, estimating cost, ranking, and provider metadata. Even where two tools support similar filters, their purposes are clearly differentiated by descriptions.
Tool names mostly follow a clear verb_noun pattern such as list_providers, find_models, get_model, and estimate_cost. The exception is top_models, which reads more like a noun phrase than an imperative verb action, a minor deviation from the otherwise consistent convention.
Eight tools is a well-scoped size for a model catalog server. Each tool covers a meaningful workflow without redundancy or bloat, from discovery and search to comparison and cost estimation.
The surface covers the full read-only lifecycle of interacting with the models.dev catalog: list, search, detail, compare, rank, and cost estimation, plus provider-level metadata and cache refresh. No obvious dead ends or missing core operations are present.
Related MCP Connectors
Live registry of AI model specs, context windows, and per-token pricing.
Compare LLM API prices, search models and providers, and access reviewed benchmark results.
Look up, compare and track AI model API prices from an AI assistant. No sign-in needed.
Search curated open-weight AI model releases, licenses, architectures, and primary sources.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides up-to-date AI model names and pricing from models.dev, solving model hallucination by fetching recently released models.1-
- AlicenseNot gradedqualityCmaintenanceEnables browsing TokenLab models, comparing pricing, and generating cURL examples for various AI endpoints.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to browse, inspect, and compare LLMs from OpenRouter's catalog with normalized per-million-token pricing, context windows, and modalities. Supports filtering by search, free-only status, minimum context, or modality.316 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables checking OpenAI, Claude, Gemini and other LLM model IDs against a live catalog to identify deprecated or unknown names and suggest newer replacements. Also lets users search current models by provider, price, context size or tool support, and scan files or folders for outdated IDs.72 npmMIT