Yuque MCP Server
MCP server for Yuque (语雀) that exposes your knowledge base to AI assistants through the Model Context Protocol.
README
Yuque MCP Server
MCP server for Yuque (语雀) — expose your knowledge base to AI assistants through the Model Context Protocol.
Quick Start
1. Get Your Yuque API Token
Visit Yuque Developer Settings to create a personal access token.
2. Quick Install (Recommended)
Use the built-in CLI to auto-configure your MCP client in one command:
npx yuque-mcp install --token=YOUR_TOKEN --client=cursor
Supported clients: claude-desktop, vscode, cursor, windsurf, cline, trae, qoder, opencode
Or use the interactive setup wizard:
npx yuque-mcp setup
The CLI will automatically find the correct config file for your OS, merge with any existing configuration (without overwriting other servers), and print a success message.
3. Manual Configuration
<details> <summary>Prefer to configure manually? Click to expand all client configs.</summary>
Choose your preferred client below:
<details open> <summary><b>Claude Code</b></summary>
claude mcp add yuque-mcp -- npx -y yuque-mcp --token=YOUR_TOKEN
Or using environment variables:
export YUQUE_PERSONAL_TOKEN=YOUR_TOKEN
claude mcp add yuque-mcp -- npx -y yuque-mcp
</details>
<details> <summary><b>Claude Desktop</b></summary>
Add to your claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"yuque": {
"command": "npx",
"args": ["-y", "yuque-mcp"],
"env": {
"YUQUE_PERSONAL_TOKEN": "YOUR_TOKEN"
}
}
}
}
</details>
<details> <summary><b>VS Code (GitHub Copilot)</b></summary>
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"yuque": {
"command": "npx",
"args": ["-y", "yuque-mcp"],
"env": {
"YUQUE_PERSONAL_TOKEN": "YOUR_TOKEN"
}
}
}
}
Then enable Agent mode in GitHub Copilot Chat.
</details>
<details> <summary><b>Cursor</b></summary>
Add to your Cursor MCP configuration (~/.cursor/mcp.json):
{
"mcpServers": {
"yuque": {
"command": "npx",
"args": ["-y", "yuque-mcp"],
"env": {
"YUQUE_PERSONAL_TOKEN": "YOUR_TOKEN"
}
}
}
}
</details>
<details> <summary><b>Windsurf</b></summary>
Add to your Windsurf MCP configuration (~/.windsurf/mcp.json):
{
"mcpServers": {
"yuque": {
"command": "npx",
"args": ["-y", "yuque-mcp"],
"env": {
"YUQUE_PERSONAL_TOKEN": "YOUR_TOKEN"
}
}
}
}
</details>
<details> <summary><b>Cline (VS Code)</b></summary>
Add to your Cline MCP settings (~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
{
"mcpServers": {
"yuque": {
"command": "npx",
"args": ["-y", "yuque-mcp"],
"env": {
"YUQUE_PERSONAL_TOKEN": "YOUR_TOKEN"
}
}
}
}
</details>
<details> <summary><b>Trae</b></summary>
In Trae, open Settings and navigate to the MCP section, then add a new stdio-type MCP Server with the following configuration:
- Command:
npx - Args:
-y yuque-mcp - Env:
YUQUE_PERSONAL_TOKEN=YOUR_TOKEN
See Trae MCP documentation for detailed instructions.
</details>
More clients: Any MCP-compatible client that supports stdio transport can use yuque-mcp. The general pattern is: command =
npx, args =["-y", "yuque-mcp"], env =YUQUE_PERSONAL_TOKEN.
</details>
4. Done!
Ask your AI assistant to search your Yuque docs, create documents, or manage books.
Authentication
The server supports multiple ways to provide your Yuque API token:
| Method | Environment Variable / Flag | Description |
|---|---|---|
| Personal Token (recommended) | YUQUE_PERSONAL_TOKEN |
For accessing your personal Yuque account |
| CLI Argument | --token=YOUR_TOKEN |
Pass directly as a command-line argument |
Priority order: YUQUE_PERSONAL_TOKEN > --token
Private Deployment
For privately deployed Yuque instances, set the YUQUE_BASE_URL environment variable or use the --base-url CLI argument:
# Environment variable
export YUQUE_BASE_URL=https://yuque.example.com/api/v2
# CLI argument
npx yuque-mcp --token=YOUR_TOKEN --base-url=https://yuque.example.com/api/v2
# Install with custom base URL
npx yuque-mcp install --token=YOUR_TOKEN --client=cursor --base-url=https://yuque.example.com/api/v2
When not set, the default is https://www.yuque.com/api/v2.
Available Tools (19)
| Category | Tools |
|---|---|
| User | yuque_get_user |
| Search | yuque_search |
| Books | yuque_list_books, yuque_get_book, yuque_create_book, yuque_update_book |
| Docs | yuque_list_docs, yuque_get_doc, yuque_create_doc, yuque_update_doc |
| Resources | yuque_get_resource, yuque_create_resource, yuque_update_resource |
| TOC | yuque_get_toc, yuque_update_toc |
| Notes | yuque_list_notes, yuque_get_note, yuque_create_note, yuque_update_note |
Troubleshooting
| Error | Solution |
|---|---|
YUQUE_PERSONAL_TOKEN is required |
Set the environment variable YUQUE_PERSONAL_TOKEN or pass --token=YOUR_TOKEN |
401 Unauthorized |
Token is invalid or expired — regenerate at Yuque Settings |
429 Rate Limited |
Too many requests — wait a moment and retry |
410 Gone |
The resource has been permanently deleted or the API endpoint is deprecated — verify the target document/repo still exists |
| Tool not found | Update to the latest version: npx -y yuque-mcp@latest |
npx command not found |
Install Node.js (v18 or later) |
Development
git clone https://github.com/yuque/yuque-mcp-server.git
cd yuque-mcp-server
npm install
npm test # run tests
npm run build # compile TypeScript
npm run dev # dev mode with hot reload
Links
License
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。