docs(mcp): document simplified local/remote MCP modes

External MCP server connection now offers two modes (local stdio /
remote) instead of three. Remote only needs a URL and the runtime
auto-detects the transport; legacy http/sse entries are auto-normalized
to remote. Updated zh/en/ja usage/mcp pages. Does not touch LangBot's
own /mcp agent-facing server docs.
This commit is contained in:
RockChinQ
2026-06-21 11:20:46 -04:00
parent 17868b360d
commit ee2ad9a592
3 changed files with 27 additions and 18 deletions
+9 -6
View File
@@ -5,19 +5,22 @@ description: "Connect MCP (Model Context Protocol) servers to LangBot to extend
LangBot can call tools from MCP servers. Once an MCP server is added, the built-in Agent — with tool use enabled on its model — can invoke those tools during a conversation.
<Info title="MCP supports Streamable HTTP, SSE, and stdio modes.">
<Info title="MCP supports two modes: local (stdio) and remote.">
Install from [LangBot Space](https://space.langbot.app) for the smoothest setup — listed MCPs are pre-configured and ready to use.
You can also fetch from [ModelScope](https://modelscope.cn/mcp), [mcp.so](https://mcp.so), or [composio.dev](https://composio.dev/toolkits), then add them manually as shown below.
</Info>
## Three Transport Modes
## Two Transport Modes
| Mode | When to use | Notes |
|------|-------------|-------|
| Streamable HTTP (`mode: "http"`) | Remote MCP service that speaks Streamable HTTP | LangBot connects to the remote URL directly |
| SSE | Remote MCP service that speaks SSE | LangBot connects to the remote URL directly |
| stdio | MCP server launched by a local command | Only available when Box Runtime is up |
| Remote (`mode: "remote"`) | Remote MCP service — just paste the URL | LangBot connects to the remote URL directly and auto-detects the transport (tries Streamable HTTP first, falls back to SSE) — no need to choose by hand |
| Local / stdio (`mode: "stdio"`) | MCP server launched by a local command | Only available when Box Runtime is up |
<Note>
Earlier versions split the remote mode into separate `http` (Streamable HTTP) and `sse` options; these are now unified into a single `remote` mode, with the transport auto-detected by the backend. Existing `http` / `sse` rows in the database are normalized to `remote` on upgrade, and their connection args (URL, headers, timeout) are preserved unchanged.
</Note>
<Note>
MCP tools require the pipeline to use the **built-in Agent**, with a model that has **tool use enabled** — see [Models](../models/readme). External runners (Dify, n8n, Langflow, Coze, etc.) use their own tool mechanisms.
@@ -37,7 +40,7 @@ Open `Plugin Management` → `MCP Management`:
<img width="1000px" src="/images/zh/deploy/mcp/mcp02.png" alt="MCP management page" />
Click `Add` in the top right, choose `Add MCP Server`, fill in the URL (HTTP/SSE) or command (stdio), click `Test` to verify connectivity, then `Submit`:
Click `Add` in the top right, choose `Add MCP Server`, pick **Local (stdio)** or **Remote** mode: for remote just paste the URL, for local fill in the launch command. Click `Test` to verify connectivity, then `Submit`:
<img width="400px" src="/images/zh/deploy/mcp/mcp03.png" alt="create new MCP server" />
+9 -6
View File
@@ -5,19 +5,22 @@ description: "MCP(Model Context Protocol)サーバーを LangBot に接続
LangBot は MCP サーバー由来のツールを利用できます。MCP サーバーを追加すれば、ツール使用を有効にしたモデルを持つ組み込み Agent が会話中にそのツールを呼び出せます。
<Info title="MCP は Streamable HTTP、SSE、stdio の 3 モードに対応しています。">
<Info title="MCP はローカル(stdio)とリモートの 2 モードに対応しています。">
まずは [LangBot Space](https://space.langbot.app) からのインストールを推奨します。掲載されている MCP サーバーは設定済みで、そのまま使えます。
[ModelScope](https://modelscope.cn/mcp)、[mcp.so](https://mcp.so)、[composio.dev](https://composio.dev/toolkits) から入手して、後述の手動追加で登録することも可能です。
</Info>
## 3 つの通信モード
## 2 つの通信モード
| モード | 適した場面 | 備考 |
|------|----------|------|
| Streamable HTTP (`mode: "http"`) | Streamable HTTP に対応したリモート MCP | LangBot がリモート URL に直接接続 |
| SSE | SSE に対応したリモート MCP | LangBot がリモート URL に直接接続 |
| stdio | ローカルコマンドで起動する MCP サーバー | Box Runtime が利用可能なときのみサポート |
| リモート (`mode: "remote"`) | リモート MCP サービス。URL を貼り付けるだけ | LangBot がリモート URL に直接接続し、トランスポート(まず Streamable HTTP を試行し、失敗時は SSE にフォールバック)を自動検出します。手動選択は不要 |
| ローカル / stdio (`mode: "stdio"`) | ローカルコマンドで起動する MCP サーバー | Box Runtime が利用可能なときのみサポート |
<Note>
以前のバージョンではリモートモードを `http`(Streamable HTTP)と `sse` の 2 つに分けていましたが、現在は単一の `remote` に統合され、トランスポートはバックエンドが自動検出します。データベース内の既存 `http` / `sse` レコードはアップグレード時に `remote` へ正規化され、接続パラメータ(URL、ヘッダー、タイムアウト)はそのまま保持されます。
</Note>
<Note>
MCP ツールを使うには、パイプラインで**組み込み Agent** を選択し、**ツール使用が有効化されたモデル**を使用する必要があります。[モデル](../models/readme)を参照。Dify、n8n、Langflow、Coze などの外部 Runner は各プラットフォームのツール機構を使います。
@@ -37,7 +40,7 @@ MCP ツールを使うには、パイプラインで**組み込み Agent** を
<img width="1000px" src="/images/zh/deploy/mcp/mcp02.png" alt="MCP 管理ページ" />
右上の `追加` → `MCP サーバーを追加` をクリック。URL(HTTP/SSE)またはコマンド(stdio)を入力し、`テスト` で接続を確認、`送信` で保存します:
右上の `追加` → `MCP サーバーを追加` をクリック。**ローカル(stdio)**または**リモート**モードを選びます。リモートは URL を貼り付けるだけ、ローカルは起動コマンドを入力します。`テスト` で接続を確認、`送信` で保存します:
<img width="400px" src="/images/zh/deploy/mcp/mcp03.png" alt="MCP サーバー作成" />
+9 -6
View File
@@ -5,19 +5,22 @@ description: "为 LangBot 接入 MCP(Model Context Protocol)服务器,用
LangBot 支持调用来自 MCP 服务器的工具。添加 MCP 后,启用了工具使用能力的内置 Agent 即可在对话中调用这些工具。
<Info title="MCP 支持 Streamable HTTP、SSE 和 stdio 三种模式。">
<Info title="MCP 支持本地(stdio)和远程两种模式。">
首选从 [LangBot Space](https://space.langbot.app) 安装:已上架的 MCP 服务器配置好、开箱即用。
也可以从 [ModelScope](https://modelscope.cn/mcp)、[mcp.so](https://mcp.so)、[composio.dev](https://composio.dev/toolkits) 等渠道获取,再按下文手动添加。
</Info>
## 三种运行模式
## 两种运行模式
| 模式 | 适合场景 | 备注 |
|------|----------|------|
| Streamable HTTP (`mode: "http"`) | 远程 MCP 服务,支持 Streamable HTTP 传输 | LangBot 直接连接远程 URL |
| SSE | 远程 MCP 服务,支持 SSE 传输 | LangBot 直接连接远程 URL |
| stdio | 本地命令启动的 MCP Server | 仅在 Box Runtime 可用时支持 |
| 远程 (`mode: "remote"`) | 远程 MCP 服务,粘贴 URL 即可 | LangBot 直接连接远程 URL,自动探测传输协议(先试 Streamable HTTP,失败回退 SSE),无需手动选 |
| 本地 / stdio (`mode: "stdio"`) | 本地命令启动的 MCP Server | 仅在 Box Runtime 可用时支持 |
<Note>
旧版本曾把远程模式拆成 `http`(Streamable HTTP)和 `sse` 两项;现已合并为单一的 `remote`,传输协议由后端自动探测。数据库里存量的 `http` / `sse` 记录会在升级时自动归一为 `remote`,连接参数(URL、请求头、超时)保持不变。
</Note>
<Note>
MCP 工具需要流水线使用**内置 Agent**,并选择**已开启工具使用能力**的模型——见[模型](../models/readme)。Dify、n8n、Langflow、Coze 等外部 Runner 使用各自平台的工具机制。
@@ -37,7 +40,7 @@ MCP 工具需要流水线使用**内置 Agent**,并选择**已开启工具使
<img width="1000px" src="/images/zh/deploy/mcp/mcp02.png" alt="MCP 管理页面" />
点击右上角 `添加` → `添加 MCP 服务器`,填写 URL(HTTP/SSE)或命令(stdio),点 `测试` 验证连通,点 `提交` 保存:
点击右上角 `添加` → `添加 MCP 服务器`,选择**本地(stdio)**或**远程**模式:远程只需粘贴 URL,本地填写启动命令。点 `测试` 验证连通,点 `提交` 保存:
<img width="400px" src="/images/zh/deploy/mcp/mcp03.png" alt="新建 MCP 服务器" />