Skip to main content
Glama
lumishoang

OpenRouter MCP Server

by lumishoang

OpenRouter MCP 서버

OpenRouter에서 제공하는 300개 이상의 AI 모델을 검색하고 쿼리하기 위한 MCP(Model Context Protocol) 서버입니다.

기능

  • 모델 나열 — 가격, 컨텍스트 제한, 기능이 포함된 모든 사용 가능한 모델 탐색

  • 검색 및 필터링 — 제공자, 가격, 컨텍스트 길이, 기능(도구, 비전 등)별로 모델 찾기

  • 모델 비교 — 여러 모델을 나란히 비교

  • 상세 정보 조회 — 특정 모델에 대한 전체 메타데이터 확인

  • 응답 캐싱 — API 호출을 줄이기 위한 5분 캐시

설치

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

사용 가능한 도구

도구

설명

list_models

모달리티 필터 및 정렬 옵션을 사용하여 모든 모델 나열

get_model

ID를 통해 특정 모델의 상세 정보 조회

search_models

쿼리, 제공자, 가격, 컨텍스트, 기능별로 모델 검색 및 필터링

compare_models

여러 모델을 나란히 비교

refresh_cache

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, all

  • sort_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을 보내주세요.

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - A tier

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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/lumishoang/openrouter-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server