LLM Bridge MCP

MIT License
3
  • Linux
  • Apple

Integrations

  • Allows access to Google's Gemini models through the same standardized interface used for other LLM providers

  • Provides access to OpenAI's GPT models through a standardized interface, supporting customizable parameters like temperature and max tokens

LLM ブリッジ MCP

LLM Bridge MCPは、AIエージェントが標準化されたインターフェースを介して複数の大規模言語モデルと対話することを可能にします。メッセージ制御プロトコル(MCP)を活用して、異なるLLMプロバイダーへのシームレスなアクセスを提供し、モデル間の切り替えや、同一アプリケーション内での複数のモデルの使用を容易にします。

特徴

  • 複数の LLM プロバイダーへの統合インターフェース:
    • OpenAI(GPTモデル)
    • 人類学的(クロードモデル)
    • Google(ジェミニモデル)
    • ディープシーク
    • ...
  • 型安全性と検証のためにPydantic AIを搭載
  • 温度や最大トークンなどのカスタマイズ可能なパラメータをサポート
  • 使用状況の追跡と指標を提供します

ツール

サーバーは次のツールを実装します。

run_llm( prompt: str, model_name: KnownModelName = "openai:gpt-4o-mini", temperature: float = 0.7, max_tokens: int = 8192, system_prompt: str = "", ) -> LLMResponse
  • prompt : LLMに送信するテキストプロンプト
  • model_name : 使用する特定のモデル(デフォルト: "openai:gpt-4o-mini")
  • temperature : ランダム性を制御します(0.0~1.0)
  • max_tokens : 生成するトークンの最大数
  • system_prompt : モデルの動作をガイドするオプションのシステムプロンプト

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の llm-bridge-mcp を自動的にインストールするには:

npx -y @smithery/cli install @sjquant/llm-bridge-mcp --client claude

手動インストール

  1. リポジトリをクローンします。
git clone https://github.com/yourusername/llm-bridge-mcp.git cd llm-bridge-mcp
  1. uvをインストールします (まだインストールされていない場合)。
# On macOS brew install uv # On Linux curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

構成

API キーを使用してルート ディレクトリに.envファイルを作成します。

OPENAI_API_KEY=your_openai_api_key ANTHROPIC_API_KEY=your_anthropic_api_key GOOGLE_API_KEY=your_google_api_key DEEPSEEK_API_KEY=your_deepseek_api_key

使用法

Claude DesktopまたはCursorと併用

Claude Desktop 構成ファイルまたは.cursor/mcp.jsonにサーバー エントリを追加します。

"mcpServers": { "llm-bridge": { "command": "uvx", "args": [ "llm-bridge-mcp" ], "env": { "OPENAI_API_KEY": "your_openai_api_key", "ANTHROPIC_API_KEY": "your_anthropic_api_key", "GOOGLE_API_KEY": "your_google_api_key", "DEEPSEEK_API_KEY": "your_deepseek_api_key" } } }

トラブルシューティング

よくある問題

1. 「spawn uvx ENOENT」エラー

このエラーは、システムがPATH内でuvx実行ファイルを見つけられない場合に発生します。解決するには、以下の手順に従ってください。

解決策: uvxへのフルパスを使用する

uvx 実行可能ファイルへの完全なパスを見つけます。

# On macOS/Linux which uvx # On Windows where.exe uvx

次に、完全なパスを使用するように MCP サーバー構成を更新します。

"mcpServers": { "llm-bridge": { "command": "/full/path/to/uvx", // Replace with your actual path "args": [ "llm-bridge-mcp" ], "env": { // ... your environment variables } } }

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。

-
security - not tested
A
license - permissive license
-
quality - not tested

AI エージェントが標準化されたインターフェースを介して複数の LLM プロバイダー (OpenAI、Anthropic、Google、DeepSeek) と対話できるようになり、モデル間の切り替えや同じアプリケーションでの複数のモデルの使用が容易になります。

  1. Features
    1. Tools
      1. Installation
        1. Installing via Smithery
        2. Manual Installation
      2. Configuration
        1. Usage
          1. Using with Claude Desktop or Cursor
          2. Troubleshooting
        2. License
          ID: 72opagtg7m