Yuque
About
Integrates with Yuque knowledge base platform to enable document management operations, content search, and team analytics through a flexible server deployable via Docker or locally in HTTP/CLI modes.
Details
- Author
- henryhaoson
- Repository
- HenryHaoson/Yuque-MCP-Server
- GitHub stars
- 9
- Downloads
- 698
- Categories
- Productivity, Developer Tools, Design, Workplace, File Management, AI, Search, Infrastructure, Frontend
- Tags
- #integration
Jump to
- Retrieve current user, documents, and knowledge base info
- Create, read, update, and delete documents in Yuque
- Search content across documents and knowledge bases
- Access team, member, book, and document statistics
- Support multiple document formats (Markdown, HTML, Lake)
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
YuqueCommand (node, npx, python, etc.)npxArguments-
Argument 1
-y -
Argument 2
@highlight/mcp-server
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via Smithery (npx @smithery/cli install @HenryHaoson/Yuque-MCP-Server) or clone the repository, run npm install, create a .env file with your YUQUE_API_TOKEN, and start the server in HTTP mode (npm run start) or CLI stdio mode (npm run start:cli). Docker deployment is also supported via docker-compose up -d or manual Docker commands.
get_current_user
获取当前认证用户的信息,包括用户ID、用户名、头像等语雀账号基本信息
get_user_docs
获取当前用户的所有知识库文档列表,包括私人和协作文档
get_user_repos
获取指定用户的知识库列表,知识库是语雀中组织文档的集合
get_repo_docs
获取特定知识库中的所有文档列表,包括文档标题、更新时间等信息
get_doc
获取语雀中特定文档的详细内容,包括正文、修改历史和权限信息
create_doc
在指定知识库中创建新的语雀文档,支持多种格式内容(Markdown、HTML、Lake)
update_doc
更新语雀中已存在的文档,可以修改标题、内容或权限设置
delete_doc
从语雀知识库中删除指定文档,此操作不可撤销
search
在语雀平台中搜索文档或知识库内容,支持范围和作者筛选
get_group_statistics
获取团队的汇总统计数据,包括成员人数、文档数量、阅读量和互动数据等
get_group_member_statistics
获取团队成员的统计数据,包括各成员的编辑次数、阅读量、点赞量等
get_group_book_statistics
获取团队知识库的统计数据,包括各知识库的文档数、字数、阅读量等
get_group_doc_statistics
获取团队文档的统计数据,包括各文档的字数、阅读量、评论量等
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"yuque": {
"env": {},
"args": [
"-y",
"@highlight/mcp-server"
],
"command": "npx"
}
}
}
Linux
{
"env": [],
"args": [
"-y",
"@highlight/mcp-server"
],
"command": "npx"
}
Macos
{
"env": [],
"args": [
"-y",
"@highlight/mcp-server"
],
"command": "npx"
}
Windows
{
"env": [],
"args": [
"/c",
"npx",
"-y",
"@highlight/mcp-server"
],
"command": "cmd"
}
语雀 MCP 服务器
一个用于与语雀 API 集成的 Model-Context-Protocol (MCP) 服务器。此实现受 Figma-Context-MCP 的启发,并使用 语雀开放 API。
概述
该服务器提供了与语雀知识库平台交互的 MCP 工具,允许 AI 模型:
- 获取用户和文档信息
- 创建、读取、更新和删除文档
- 搜索语雀中的内容
- 获取知识库信息
- 获取统计数据和分析信息
安装
安装 via Smithery
要使用 Smithery 将 Yuque MCP Server 自动安装到 Claude 桌面端:
npx -y @smithery/cli install @HenryHaoson/Yuque-MCP-Server --client claude
前提条件
- Node.js 18+ (推荐)
- 拥有 API 令牌的语雀账号
设置
1. 克隆此仓库:
git clone https://github.com/Henryhaoson/Yueque-MCP-Server.git
cd Yueque-MCP-Server
2. 安装依赖:
npm install
3. 基于 .env.example 创建 .env 文件:
cp .env.example .env
4. (可选) 在 .env 文件中添加你的语雀 API 令牌:
YUQUE_API_TOKEN=your_yuque_api_token_here
你也可以选择在连接到服务器时通过查询参数提供令牌,而不是在 .env 文件中设置。
使用方法
运行服务器
开发模式
# HTTP 服务器模式
npm run dev
CLI stdio 模式
npm run dev:cli
生产模式
首先,构建项目:
npm run build
然后在 HTTP 或 CLI 模式下运行:
# HTTP 服务器模式
npm run start
CLI stdio 模式
npm run start:cli
使用 Docker 部署
本项目提供了 Docker 支持,使您可以轻松地容器化和部署服务器。
使用 Docker Compose(推荐)
1. 构建并启动容器:
docker-compose up -d
2. 查看日志:
docker-compose logs -f
3. 停止服务:
docker-compose down
您可以通过环境变量或在 .env 文件中设置配置项:
# .env 文件示例
PORT=3000
YUQUE_API_TOKEN=your_token_here
YUQUE_API_BASE_URL=https://www.yuque.com/api/v2
手动使用 Docker
1. 构建 Docker 镜像:
docker build -t yuque-mcp-server .
2. 运行容器:
docker run -d -p 3000:3000 --name yuque-mcp-server yuque-mcp-server
3. 使用环境变量:
docker run -d -p 3000:3000 \
-e YUQUE_API_TOKEN=your_token_here \
-e YUQUE_API_BASE_URL=https://www.yuque.com/api/v2 \
--name yuque-mcp-server yuque-mcp-server
MCP 工具
语雀 MCP 服务器提供以下工具:
用户和文档管理
-get_current_user - 获取当前认证用户的信息,包括用户ID、用户名、头像等语雀账号基本信息
- get_user_docs - 获取当前用户的所有知识库文档列表,包括私人和协作文档
- get_user_repos - 获取指定用户的知识库列表,知识库是语雀中组织文档的集合
- get_repo_docs - 获取特定知识库中的所有文档列表,包括文档标题、更新时间等信息
- get_doc - 获取语雀中特定文档的详细内容,包括正文、修改历史和权限信息
- create_doc - 在指定知识库中创建新的语雀文档,支持多种格式内容(Markdown、HTML、Lake)
- update_doc - 更新语雀中已存在的文档,可以修改标题、内容或权限设置
- delete_doc - 从语雀知识库中删除指定文档,此操作不可撤销
- search - 在语雀平台中搜索文档或知识库内容,支持范围和作者筛选
团队统计分析
-get_group_statistics - 获取团队的汇总统计数据,包括成员人数、文档数量、阅读量和互动数据等
- get_group_member_statistics - 获取团队成员的统计数据,包括各成员的编辑次数、阅读量、点赞量等
- get_group_book_statistics - 获取团队知识库的统计数据,包括各知识库的文档数、字数、阅读量等
- get_group_doc_statistics - 获取团队文档的统计数据,包括各文档的字数、阅读量、评论量等
与 AI 模型的集成
此 MCP 服务器可以与支持 Model-Context-Protocol 的 AI 模型一起使用,允许它们通过定义的工具与语雀交互。例如:
1. 启动 MCP 服务器
2. 从兼容的客户端连接到服务器
3. AI 模型现在可以使用注册的工具与语雀数据交互
SSE 端点的查询参数
当连接到 SSE 端点时,你可以通过查询参数(query parameters)覆盖环境配置,这些参数的优先级高于环境变量:
- accessToken: 覆盖在 .env 文件中设置的语雀 API 令牌
- baseUrl: 覆盖在 .env 文件中设置的语雀 API 基础 URL
示例:
```
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





