Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ export default defineConfig({
text: "使用知识库",
link: "/zh/deploy/knowledge/readme",
},
{
text: "使用 MCP 服务",
link: "zh/deploy/mcp/readme"
},
{
text: "系统环境设置",
link: "/zh/deploy/settings",
Expand Down Expand Up @@ -211,10 +215,6 @@ export default defineConfig({
text: "如何实现一个消息平台适配器?",
link: "/zh/workshop/impl-platform-adapter",
},
{
text: "在 LangBot 接入完整 MCP 生态",
link: "/zh/workshop/mcp-details"
},
{
text: "容器网络配置详解",
link: "/zh/workshop/network-details",
Expand Down Expand Up @@ -406,6 +406,10 @@ export default defineConfig({
text: "Using Knowledge Base",
link: "/en/deploy/knowledge/readme",
},
{
text: "Using MCP Services",
link: "/en/deploy/mcp/readme",
},
{
text: "System Settings",
link: "/en/deploy/settings",
Expand Down Expand Up @@ -463,13 +467,13 @@ export default defineConfig({
text: "How to Implement a Message Platform Adapter?",
link: "/en/workshop/impl-platform-adapter",
},
// {
// text: "Integrating Complete MCP Ecosystem in LangBot",
// link: "/en/workshop/mcp-details"
// },
{
text: "Integrating Complete MCP Ecosystem in LangBot",
link: "/en/workshop/mcp-details"
},
{
text: "Container Network Configuration Details",
link: "/en/workshop/network-details",
text: "Container Network Configuration Details",
link: "/en/workshop/network-details",
},
{
text: "Using New API to Transmit Models from Multiple Channels",
Expand Down
Binary file added docs/assets/image/zh/deploy/mcp/mcp02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/image/zh/deploy/mcp/mcp03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/image/zh/deploy/mcp/mcp04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/image/zh/deploy/mcp/mcp05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/image/zh/deploy/mcp/mcp_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions docs/en/deploy/mcp/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Using MCP Servers


LangBot supports SSE mode MCP servers. You can add MCP servers to leverage the tool calling capabilities in large language models for better handling of LLM requests.

:::info
MCP service only supports SSE mode.
- MCP servers recommended acquisition channel: [Composio MCP](https://mcp.composio.dev/)
:::

## Enable Function Calling for Models

As shown in the image, enable the `Function Calling` feature for the model.

<img width="400px" src="/assets/image/zh/deploy/mcp/mcp_01.png" alt="enable function call" />

## Create MCP Server

Click `Plugin Management`, then `MCP Management`, as shown:

<img width="1000px" src="/assets/image/zh/deploy/mcp/mcp02.png" alt="server page" />

Click `Add` in the top right corner, then `Create MCP Server`,

<img width="400px" src="/assets/image/zh/deploy/mcp/mcp03.png" alt="create new mcp server" />

For example, to use the Fetch HTML server, fill in the corresponding URL, click `Test` to test the MCP server, and click `Submit` to add the server.

After adding, click the switch on the card to connect to the MCP server. Click the card to view the MCP server details:

<img width="400px" src="/assets/image/zh/deploy/mcp/mcp05.png" alt="detailed server" />

## Effect

You need to select `Local Agent` as the runner in the pipeline settings and use a model that supports function calling.

<img width="1000px" src="/assets/image/zh/deploy/mcp/mcp04.png" alt="dialog with mcp" />
41 changes: 0 additions & 41 deletions docs/en/deploy/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,6 @@ concurrency:
# Single session concurrency
session: 1

# MCP configuration
# Should be configurable in WebUI in the future
mcp:
# MCP server list
# Currently supports two protocol MCP servers:
# - SSE
# - Stdio (Python)
#
# Format:
# SSE mode:
# name Server name, self-defined
# enable Whether to enable this Server
# mode Fixed as sse
# url MCP SSE Server access URL
# headers Connection headers, optional
# timeout Connection timeout
#
# stdio mode:
# name Server name, self-defined
# enable Whether to enable this Server
# mode Fixed as stdio
# command Execution command
# args Command parameters
# env Command environment variables, optional
#
# For example:
# servers:
# - name: 'SSE Server'
# enable: true
# mode: sse
# url: 'http://127.0.0.1:8000/sse'
# headers: {}
# timeout: 10
# - name: 'stdio Server'
# enable: true
# mode: stdio
# command: 'python'
# args: ['-m', 'weather']
# env: {}
servers: []

# Proxy configuration
proxy:
# HTTP proxy address
Expand Down
2 changes: 1 addition & 1 deletion docs/en/workshop/mcp-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ There are two types of MCP Servers in the market:

## Configuring MCP Server

Please refer to the [System Settings Documentation](/zh/deploy/settings.html)
Please refer to the [System Settings Documentation](/en/deploy/settings.html)

After configuration, you can use the `!func` command in chat to view registered MCP tools. When chatting with models that support Function Calling, LangBot will automatically call MCP tools.
49 changes: 49 additions & 0 deletions docs/zh/deploy/mcp/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 使用MCP服务器


LangBot 支持 SSE 模式 MCP 服务器,您可以添加 MCP 服务器,使用大语言模型中的工具调用特性,更好的处理 LLM 请求。

:::info
- MCP 服务仅支持 SSE 模式。
- MCP 服务器推荐获取渠道:[ModelScope](https://modelscope.cn/mcp)
:::

## 打开模型的函数调用功能

如图,将模型的`函数调用`功能打开。

<img width="400px" src="/assets/image/zh/deploy/mcp/mcp_01.png" alt="enable function call" />

## 创建MCP服务器

点击`插件管理` -> `MCP管理`,如图所示:

<img width="1000px" src="/assets/image/zh/deploy/mcp/mcp02.png" alt="server page" />

点击右上角的`添加`,选择`添加 MCP 服务器`,

<img width="400px" src="/assets/image/zh/deploy/mcp/mcp03.png" alt="create new mcp server" />

比如使用 Fetch HTML 服务器,填写对应的 URL,点击`测试`用来测试 MCP 服务器,点`提交`添加此服务器。

添加完成之后,点击卡片上的开关以连接 MCP 服务器,点击卡片可以看到 MCP 服务器的详情:

<img width="400px" src="/assets/image/zh/deploy/mcp/mcp05.png" alt="detailed server" />

## 效果

需要在流水线设置中选用 `内置 Agent` 作为运行器,并使用支持函数调用的模型。

<img width="1000px" src="/assets/image/zh/deploy/mcp/mcp04.png" alt="dialog with mcp" />












41 changes: 0 additions & 41 deletions docs/zh/deploy/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,6 @@ concurrency:
# 单会话并发数
session: 1

# MCP 配置
# 后续应该会改为在 WebUI 上可以配置
mcp:
# MCP 服务器列表
# 目前支持两种协议的 MCP 服务器:
# - SSE
# - Stdio(Python)
#
# 格式:
# SSE 模式:
# name 服务器名称,自行定义
# enable 是否启用本 Server
# mode 固定填写 sse
# url MCP SSE Server 的访问 URL
# headers 连接时的 headers,可选
# timeout 连接超时时间
#
# stdio 模式:
# name 服务器名称,自行定义
# enable 是否启用本 Server
# mode 固定填写 stdio
# command 执行命令
# args 执行命令的参数
# env 执行命令的环境变量,可选
#
# 例如:
# servers:
# - name: 'SSE Server'
# enable: true
# mode: sse
# url: 'http://127.0.0.1:8000/sse'
# headers: {}
# timeout: 10
# - name: 'stdio Server'
# enable: true
# mode: stdio
# command: 'python'
# args: ['-m', 'weather']
# env: {}
servers: []

# 代理配置
proxy:
# HTTP 代理地址
Expand Down