SM

secretiveshell/mcp-bridge

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

923 stars 118 forks 品質 68 トレンド 22MIT

MCPツールを呼び出せるOpenAI互換エンドポイントを提供するミドルウェア

概要

MCP-BridgeはOpenAI APIとMCP(MCP)ツールの橋渡しとして機能し、開発者がOpenAI APIインターフェースを通じてMCPツールを活用できるようにします。 プロジェクトを支援する新しいメンテナーを探しています。興味があればDiscordで連絡するか、問題を申し立ててください。さらに、Open WebUIはv0.6.31からMCP(Model Context Protocol)をネイティブにサポートしているため、MCP-Bridgeはソフト非推奨とみなすべきです。 MCP-Bridgeは、MCPツールとOpenAI APIの統合を促進するために設計されています。OpenAI APIと互換性のある方法でMCPツールとやり取りできるエンドポイントのセットを提供します。これにより、MCPを明示的にサポートすることなく、任意のMCPツールで任意のクライアントを利用できます。例えば、公式のMCPフェッチツールでOpen Web UIを使用する例を参照してください。

概要(AI 翻訳)

MCP-BridgeはOpenAI APIとMCP(MCP)ツールの橋渡しとして機能し、開発者がOpenAI APIインターフェースを通じてMCPツールを活用できるようにします。

[!注]

プロジェクトを手伝ってくれる新しいメンテナーを探しています。興味があればDiscordで連絡するか、問題をオープンしてください。

さらに、Open WebUIはバージョン0.6.31からネイティブにMCP(Model Context Protocol)をサポートしているため、MCP-Bridgeはソフト廃止されたものとみなすべきです。

概要

MCP-Bridgeは、MCPツールとOpenAI APIの統合を促進するために設計されています。OpenAI APIと互換性のある方法でMCPツールとやり取りできるエンドポイントのセットを提供します。これにより、MCPを明示的にサポートすることなく、任意のMCPツールで任意のクライアントを利用できます。例えば、公式のMCPフェッチツールでOpen Web UIを使用する例を参照してください。

現在の特徴

機能機能:

  • MCPによる非ストリーミングチャット完了

  • MCPによるストリーミングチャット完了

  • MCPなしの非ストリーミング完了

  • MCPツール

  • MCPサンプリング

  • 外部クライアント向けのSSE Bridge

予定された特徴:

  • ストリーミング完了はまだ実装されていません

  • MCPリソースのサポートが計画されています

設置

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

MCP-Bridge

MCP-Bridge acts as a bridge between the OpenAI API and MCP (MCP) tools, allowing developers to leverage MCP tools through the OpenAI API interface.

[!NOTE]

Looking for new maintainers to assist with the project. Reach out in the Discord or open an issue if you are interested.

Additionally, Open WebUI natively supports MCP (Model Context Protocol) starting in v0.6.31, so MCP-Bridge should be considered as soft deprecated now.

Overview

MCP-Bridge is designed to facilitate the integration of MCP tools with the OpenAI API. It provides a set of endpoints that can be used to interact with MCP tools in a way that is compatible with the OpenAI API. This allows you to use any client with any MCP tool without explicit support for MCP. For example, see this example of using Open Web UI with the official MCP fetch tool.

Current Features

working features:

  • non streaming chat completions with MCP

  • streaming chat completions with MCP

  • non streaming completions without MCP

  • MCP tools

  • MCP sampling

  • SSE Bridge for external clients

planned features:

  • streaming completions are not implemented yet

  • MCP resources are planned to be supported

Installation

The recommended way to install MCP-Bridge is to use Docker. See the example compose.yml file for an example of how to set up docker.

Note that this requires an inference engine with tool call support. I have tested this with vLLM with success, though ollama should also be compatible.

Docker installation

  1. Clone the repository

  2. Edit the compose.yml file

You will need to add a reference to the config.json file in the compose.yml file. Pick any of

  • add the config.json file to the same directory as the compose.yml file and use a volume mount (you will need to add the volume manually)
  • add a http url to the environment variables to download the config.json file from a url
  • add the config json directly as an environment variable

see below for an example of each option:

environment:
  - MCP_BRIDGE__CONFIG__FILE=config.json # mount the config file for this to work
  - MCP_BRIDGE__CONFIG__HTTP_URL=http://10.88.100.170:8888/config.json
  - MCP_BRIDGE__CONFIG__JSON={"inference_server":{"base_url":"http://example.com/v1","api_key":"None"},"mcp_servers":{"fetch":{"command":"uvx","args":["mcp-server-fetch"]}}}

The mount point for using the config file would look like:

    volumes:
      - ./config.json:/mcp_bridge/config.json
  1. run the service
docker-compose up --build -d
GitHub で README 全文を見る

インストール

uvx mcp-server-fetch
MCP 初心者?mcpskill.org のガイドから始めましょう →