OpenRouter MCP Multimodal Server

by stabgan
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Offers deployment through Docker containers, with support for environment variables and seamless integration with MCP configurations.

  • Enables use of Google's Gemini models through OpenRouter for text chat and multimodal conversations, with support for vision capabilities and model customization.

  • Provides Node.js-based installation and execution options with NPX support for easy integration into MCP environments.

OpenRouter MCP マルチモーダルサーバー

OpenRouter.aiの多様なモデルエコシステムを通じて、チャットと画像分析機能を提供するMCP(Model Context Protocol)サーバー。このサーバーは、テキストチャット機能と強力な画像分析機能を組み合わせています。

特徴

  • テキストチャット:
    • OpenRouter.aiのすべてのチャットモデルに直接アクセス
    • シンプルなテキストとマルチモーダル会話のサポート
    • 設定可能な温度およびその他のパラメータ
  • 画像解析:
    • カスタムの質問で単一の画像を分析する
    • 複数の画像を同時に処理する
    • 画像の自動サイズ変更と最適化
    • さまざまな画像ソース(ローカルファイル、URL、データURL)のサポート
  • モデル選択:
    • 利用可能なモデルを検索してフィルタリングする
    • モデルIDを検証する
    • 詳細なモデル情報を取得する
    • デフォルトのモデル構成のサポート
  • パフォーマンスの最適化:
    • スマートモデル情報キャッシュ
    • 再試行のための指数バックオフ
    • 自動レート制限処理

1.5.0の新機能

  • OS互換性の向上:
    • Windows、macOS、Linux 向けの強化されたパス処理
    • ドライブ文字を使用した Windows スタイルのパスのサポートが向上
    • プラットフォーム間で一貫した動作を実現する正規化されたパス処理
  • MCP 構成サポート:
    • 環境変数を必要とせずにカーソルMCPを統合
    • MCPパラメータによる直接設定
    • 柔軟なAPIキーとモデル仕様オプション
  • 堅牢なエラー処理:
    • 画像処理のフォールバックメカニズムの改善
    • 特定の診断によるエラーレポートの改善
    • ファイル読み取りのための複数のバックアップ戦略
  • 画像処理の強化:
    • すべての画像タイプでより信頼性の高い base64 エンコード
    • シャープモジュールが利用できない場合のフォールバックオプション
    • 自動最適化による大きな画像の処理の改善

インストール

オプション1: npm経由でインストールする

npm install -g @stabgan/openrouter-mcp-multimodal

オプション2: Docker経由で実行

docker run -i -e OPENROUTER_API_KEY=your-api-key-here stabgandocker/openrouter-mcp-multimodal:latest

クイックスタート構成

前提条件

  1. OpenRouter KeysからOpenRouter APIキーを取得します。
  2. デフォルトモデルを選択する(オプション)

MCP 構成オプション

MCP 設定ファイル (例: cline_mcp_settings.jsonまたはclaude_desktop_config.json ) に次のいずれかの構成を追加します。

オプション 1: npx (Node.js) を使用する

{ "mcpServers": { "openrouter": { "command": "npx", "args": [ "-y", "@stabgan/openrouter-mcp-multimodal" ], "env": { "OPENROUTER_API_KEY": "your-api-key-here", "DEFAULT_MODEL": "qwen/qwen2.5-vl-32b-instruct:free" } } } }

オプション2: uv (Python パッケージ マネージャー) を使用する

{ "mcpServers": { "openrouter": { "command": "uv", "args": [ "run", "-m", "openrouter_mcp_multimodal" ], "env": { "OPENROUTER_API_KEY": "your-api-key-here", "DEFAULT_MODEL": "qwen/qwen2.5-vl-32b-instruct:free" } } } }

オプション3: Dockerを使用する

{ "mcpServers": { "openrouter": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "OPENROUTER_API_KEY=your-api-key-here", "-e", "DEFAULT_MODEL=qwen/qwen2.5-vl-32b-instruct:free", "stabgandocker/openrouter-mcp-multimodal:latest" ] } } }

オプション4: Smitheryを使用する(推奨)

{ "mcpServers": { "openrouter": { "command": "smithery", "args": [ "run", "stabgan/openrouter-mcp-multimodal" ], "env": { "OPENROUTER_API_KEY": "your-api-key-here", "DEFAULT_MODEL": "qwen/qwen2.5-vl-32b-instruct:free" } } } }

このMCPサーバーの使用方法に関する包括的な例については、 examplesディレクトリをご覧ください。以下を提供しています。

  • Node.js アプリケーション用の JavaScript の例
  • インタラクティブなチャット機能を備えた Python の例
  • さまざまなアプリケーションと統合するためのコードスニペット

各例には、わかりやすいドキュメントとステップバイステップの説明が付属しています。

依存関係

このプロジェクトでは、次の主要な依存関係を使用します。

  • @modelcontextprotocol/sdk : ^1.8.0 - ツール実装用の最新の MCP SDK
  • openai : ^4.89.1 - OpenRouter 用の OpenAI 互換 API クライアント
  • sharp : ^0.33.5 - 高速画像処理ライブラリ
  • axios : ^1.8.4 - APIリクエスト用のHTTPクライアント
  • node-fetch : ^3.3.2 - 最新のフェッチ実装

Node.js 18以降が必要です。すべての依存関係は、互換性とセキュリティを確保するために定期的に更新されます。

利用可能なツール

mcp_openrouter_chat_completion

OpenRouter モデルにテキストまたはマルチモーダル メッセージを送信します。

use_mcp_tool({ server_name: "openrouter", tool_name: "mcp_openrouter_chat_completion", arguments: { model: "google/gemini-2.5-pro-exp-03-25:free", // Optional if default is set messages: [ { role: "system", content: "You are a helpful assistant." }, { role: "user", content: "What is the capital of France?" } ], temperature: 0.7 // Optional, defaults to 1.0 } });

画像付きのマルチモーダルメッセージの場合:

use_mcp_tool({ server_name: "openrouter", tool_name: "mcp_openrouter_chat_completion", arguments: { model: "anthropic/claude-3.5-sonnet", messages: [ { role: "user", content: [ { type: "text", text: "What's in this image?" }, { type: "image_url", image_url: { url: "https://example.com/image.jpg" } } ] } ] } });
-
security - not tested
F
license - not found
-
quality - not tested

OpenRouter.ai の多様なモデル エコシステムを通じてチャットと画像分析機能を提供し、さまざまな AI モデルによるテキスト会話と強力なマルチモーダル画像処理の両方を可能にします。

  1. Features
    1. What's New in 1.5.0
      1. Installation
        1. Option 1: Install via npm
        2. Option 2: Run via Docker
      2. Quick Start Configuration
        1. Prerequisites
        2. MCP Configuration Options
      3. Examples
        1. Dependencies
          1. Available Tools
            1. mcp_openrouter_chat_completion
          ID: dn5za2ql2h