HO

heltonteixeira/openrouterai

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

64 stars 18 forks 품질 74 트렌드 14Apache-2.0

heltonteixeira/openrouterai는 MCP 서버 후보가 https://github.com/heltonteixeira/openrouterai.에서 수입되었습니다

개요

heltonteixeira/openrouterai는 MCP 서버 후보가 https://github.com/heltonteixeira/openrouterai.에서 수입되었습니다

개요(AI 번역)

OpenRouter.ai의 다양한 모델 생태계와 원활한 통합을 제공하는 모델 Context Protocol (MCP) 서버. 내장 캐싱, 속도 제한 및 오류 처리와 통합, 유형 안전 인터페이스를 통해 다양한 AI 모델에 액세스하십시오.

특징

  • **모델 액세스 **

  • 모든 OpenRouter.ai 모델에 직접 액세스

  • 자동 모델 검증 및 기능 검사

  • 기본 모델 설정 지원

  • **Performance 최적화 **

  • 스마트 모델 정보 캐싱 (1 시간 만료)

  • 자동 속도 제한 관리

  • 실패 요청에 대한 노출 backoff

  • Unified Response 형식

  • 일관된 ToolResult 모든 응답을 위한 구조

  • isError 플래그로 오류 식별

  • context를 가진 Structured 오류 메시지

설치

구성

# 필수품

  1. OpenRouter Keys에서 OpenRouter API 키 받기
  2. (선택) 기본 모형을 선택하십시오

환경 변수

  • OPENROUTER_API_KEY: 필수. OpenRouter API 키입니다.
  • OPENROUTER_DEFAULT_MODEL: 선택 사항. 요청에서 지정하지 않는 경우 기본 모델 (예를 들어, openrouter/auto).
  • OPENROUTER_MAX_TOKENS: 선택 사항.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

OpenRouter MCP Server

A Model Context Protocol (MCP) server providing seamless integration with OpenRouter.ai’s diverse model ecosystem. Access various AI models through a unified, type-safe interface with built-in caching, rate limiting, and error handling.

Features

  • Model Access

    • Direct access to all OpenRouter.ai models
    • Automatic model validation and capability checking
    • Default model configuration support
  • Performance Optimization

    • Smart model information caching (1-hour expiry)
    • Automatic rate limit management
    • Exponential backoff for failed requests
  • Unified Response Format

    • Consistent ToolResult structure for all responses
    • Clear error identification with isError flag
    • Structured error messages with context

Installation

pnpm install @mcpservers/openrouterai

Configuration

Prerequisites

  1. Get your OpenRouter API key from OpenRouter Keys
  2. Choose a default model (optional)

Environment Variables

  • OPENROUTER_API_KEY: Required. Your OpenRouter API key.
  • OPENROUTER_DEFAULT_MODEL: Optional. The default model to use if not specified in the request (e.g., openrouter/auto).
  • OPENROUTER_MAX_TOKENS: Optional. Default maximum number of tokens to generate if max_tokens is not provided in the request.
  • OPENROUTER_PROVIDER_QUANTIZATIONS: Optional. Comma-separated list of default quantization levels to filter by (e.g., fp16,int8) if provider.quantizations is not provided in the request. (Phase 1)
  • OPENROUTER_PROVIDER_IGNORE: Optional. Comma-separated list of default provider names to ignore (e.g., mistralai,openai) if provider.ignore is not provided in the request. (Phase 1)
  • OPENROUTER_PROVIDER_SORT: Optional. Default sort order for providers (“price”, “throughput”, or “latency”). Overridden by provider.sort argument. (Phase 2)
  • OPENROUTER_PROVIDER_ORDER: Optional. Default prioritized list of provider IDs (JSON array string, e.g., '["openai/gpt-4o", "anthropic/claude-3-opus"]'). Overridden by provider.order argument. (Phase 2)
  • OPENROUTER_PROVIDER_REQUIRE_PARAMETERS: Optional. Default boolean (true or false) to only use providers supporting all specified request parameters. Overridden by provider.require_parameters argument. (Phase 2)
GitHub에서 전체 README 보기

설치

npx @mcpservers/openrouterai
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →