Files
LangBot/zh/usage/mcp
Xiaoyu SuandJunyan Chin 310c566148 refactor: migration to mintlify
* 重构文档结构:移除 docs 目录,调整文件组织结构

* Reorder "插件 SDK API" section in docs.json

* Refactor and clarify various documentation sections

* Refine warnings and info boxes across multiple docs

* Refactor and simplify Japanese documentation content

* Update package.json to include mintlify as a dependency and add pnpm-lock.yaml for dependency management

* Update blog link and add description in docs.json

---------

Co-authored-by: Junyan Chin <[email protected]>
2026-02-21 23:55:53 +08:00
..
2026-02-21 23:55:53 +08:00

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "使用MCP服务器"
---

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

<Info>
  MCP 服务器推荐获取渠道:[ModelScope](https://modelscope.cn/mcp)
</Info>

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

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

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

## 创建MCP服务器

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

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

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

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

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

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

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

## 效果

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

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