OpenRouter MCP Server
OpenRouter MCP 서버
OpenRouter에서 제공하는 300개 이상의 AI 모델을 검색하고 쿼리하기 위한 MCP(Model Context Protocol) 서버입니다.
기능
모델 나열 — 가격, 컨텍스트 제한, 기능이 포함된 모든 사용 가능한 모델 탐색
검색 및 필터링 — 제공자, 가격, 컨텍스트 길이, 기능(도구, 비전 등)별로 모델 찾기
모델 비교 — 여러 모델을 나란히 비교
상세 정보 조회 — 특정 모델에 대한 전체 메타데이터 확인
응답 캐싱 — API 호출을 줄이기 위한 5분 캐시
Related MCP server: NanoBanana MCP Server
설치
pip install openrouter-mcp사용법
OpenClaw 사용 시
openclaw.json MCP 서버 설정에 추가하세요:
{
"mcp": {
"servers": {
"openrouter-models": {
"command": "openrouter-mcp",
"env": {
"OPENROUTER_API_KEY": "your-api-key"
}
}
}
}
}그런 다음 게이트웨이를 재시작합니다. 이제 에이전트가 MCP 도구를 사용하여 OpenRouter 모델을 쿼리할 수 있습니다.
참고:
OPENROUTER_API_KEY는 선택 사항이지만 더 높은 속도 제한(분당 200회 요청 vs 분당 20회 요청)을 위해 권장됩니다. 키 발급: https://openrouter.ai/keys
에이전트 사용 예시:
# Agent can now call MCP tools like:
list_models(sort_by="context_length")
search_models(query="claude", max_input_price=5.0)
get_model(model_id="anthropic/claude-sonnet-4.6")
compare_models(model_ids="qwen/qwen3.6-plus,anthropic/claude-sonnet-4.6")독립 실행형 (stdio)
export OPENROUTER_API_KEY=your-key
python -m openrouter_mcp.server사용 가능한 도구
도구 | 설명 |
| 모달리티 필터 및 정렬 옵션을 사용하여 모든 모델 나열 |
| ID를 통해 특정 모델의 상세 정보 조회 |
| 쿼리, 제공자, 가격, 컨텍스트, 기능별로 모델 검색 및 필터링 |
| 여러 모델을 나란히 비교 |
| OpenRouter API에서 모델 캐시 강제 새로고침 |
예시
컨텍스트 길이별로 정렬된 모델 목록
{
"name": "list_models",
"arguments": {
"modality": "text",
"sort_by": "context_length"
}
}100만 토큰당 $5 미만의 Claude 모델 검색
{
"name": "search_models",
"arguments": {
"query": "claude",
"provider": "anthropic",
"max_input_price": 5.0,
"requires_tools": true
}
}3개 모델 비교
{
"name": "compare_models",
"arguments": {
"model_ids": "anthropic/claude-sonnet-4.6,qwen/qwen3.6-plus,openai/gpt-5.4"
}
}모델 상세 정보 조회
{
"name": "get_model",
"arguments": {
"model_id": "anthropic/claude-sonnet-4.6"
}
}API 참조
list_models(modality, sort_by)
modality(str, 기본값: "text"): 출력 유형별 필터링. 옵션:text,image,audio,embeddings,allsort_by(str, 기본값: "name"): 정렬 기준:name,created,price,context_length
get_model(model_id)
model_id(str, 필수): 모델 슬러그, 예:anthropic/claude-sonnet-4.6
search_models(query, provider, max_input_price, min_context, requires_tools, requires_vision, free_only)
query(str): 모델 이름/ID/설명 내 자유 텍스트 검색provider(str): 제공자별 필터링 (예:anthropic,google,openai)max_input_price(float): 100만 토큰당 최대 입력 가격 (0 = 제한 없음)min_context(int): 최소 컨텍스트 윈도우 크기requires_tools(bool): 도구 호출을 지원하는 모델만 표시requires_vision(bool): 비전/이미지 입력이 가능한 모델만 표시free_only(bool): 무료 모델만 표시
compare_models(model_ids)
model_ids(str, 필수): 쉼표로 구분된 모델 ID 목록
refresh_cache()
OpenRouter API에서 모델 캐시를 강제로 새로고침합니다.
속도 제한
API 키 미사용 시: 분당 20회 요청
API 키 사용 시: 분당 200회 요청
모델 데이터는 5분 동안 캐시됩니다
API 키 발급: https://openrouter.ai/keys
라이선스
MIT
기여
기여를 환영합니다! GitHub에서 이슈를 열거나 PR을 보내주세요.
Available Tools
5 toolscompare_modelsB
Compare multiple models side by side.
Args: model_ids: Comma-separated model IDs
Inputs: model_ids (required). Returns: result
get_modelA
Get detailed info for one model.
Args: model_id: Model slug, e.g. 'anthropic/claude-sonnet-4.6'
Inputs: model_id (required). Returns: result
list_modelsB
List models available on OpenRouter.
Args: modality: Filter by output type. Options: text, image, audio, embeddings, all sort_by: Sort by: name, created, price, context_length
Inputs: modality, sort_by. Returns: result
refresh_cacheA
Force refresh the model cache from OpenRouter.
Inputs: no named parameters. Returns: result
search_modelsA
Search and filter OpenRouter models.
Args: query: Free-text search in model name/id/description provider: Filter by provider (anthropic, google, openai, etc.) max_input_price: Max input price per 1M tokens, 0 = no limit min_context: Minimum context window size requires_tools: Only models supporting tool calling requires_vision: Only models with vision/image input free_only: Only free models
Inputs: query, provider, max_input_price, min_context, +3 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct purpose: get single model details, list with basic filters, search with advanced filters, compare multiple, and cache refresh. No overlapping functionality; descriptions clearly differentiate them.
All tool names follow a consistent verb_noun pattern using lowercase with underscores: list_models, search_models, get_model, compare_models, refresh_cache. No mixing of conventions.
With 5 tools, the server provides a focused set for model discovery and management. This is neither too few nor too many for the domain of querying model information from OpenRouter.
The tool set covers all essential operations for interacting with OpenRouter models: listing, searching, getting details, comparing, and cache management. No obvious gaps like missing model capability queries, as search covers those.
Maintenance
Related MCP Connectors
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that retrieves and provides AI model information from OpenAI, Anthropic, and Google through a unified interface.384 npmMIT
- FlicenseNot gradedqualityNot gradedmaintenanceAn MCP server that wraps the OpenRouter API, enabling users to access diverse language models like Google Gemini 3 Pro for chat and image tasks. It provides tools for generating completions and listing available models within MCP-compatible clients.-
- AlicenseAqualityDmaintenanceAn MCP server that provides access to 400+ AI models via OpenRouter, enabling chat, comparison, and document analysis through Claude.5MIT
- AlicenseNot gradedqualityCmaintenanceMCP server that helps AI assistants automatically find, filter, and rank the best AI models for a specific task using the OpenRouter API.1MIT