Yuque MCP Server
Enables searching and retrieving detailed document content from the Yuque platform through its API. It allows AI models to search for documentation and knowledge bases by keywords and access specific document details.
README
Yuque MCP Server
语雀(Yuque)文档 Model Context Protocol (MCP) 服务器,提供文档搜索和内容获取功能。
功能
- search: 搜索语雀文档
- get_doc: 获取文档详细内容
安装
npm install
配置
创建 .env 文件或设置环境变量:
YUQUE_AUTH_TOKEN=your-auth-token-here
YUQUE_BASE_URL=https://api.yuque.com
获取 Auth Token
- 登录 语雀
- 进入 设置 > Token > 新建 Token
- 复制生成的 Token
构建
npm run build
MCP 配置
在 Claude Desktop 配置文件中添加:
macOS
~/Library/Application Support/Claude/claude_desktop_config.json
Windows
%APPDATA%\Claude\claude_desktop_config.json
配置内容:
{
"mcpServers": {
"yuque": {
"command": "node",
"args": ["E:\\node\\yuque-mcp\\dist\\index.js"],
"env": {
"YUQUE_AUTH_TOKEN": "your-auth-token-here",
"YUQUE_BASE_URL": "https://api.yuque.com"
}
}
}
}
工具说明
search
搜索语雀文档。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| q | string | 是 | 搜索关键词 |
| type | string | 是 | 搜索类型:doc(文档)或 repo(知识库) |
| page | number | 否 | 页码,默认 1 |
| scope | string | 否 | 搜索范围 |
| creator | string | 否 | 按作者 login 筛选 |
示例:
搜索关键词 "TypeScript" 的文档
get_doc
获取指定文档的详细内容。
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| book_id | number | 是 | 知识库 ID |
| doc_id | number | 是 | 文档 ID |
示例:
获取知识库 123 中文档 456 的内容
项目结构
yuque-mcp/
├── src/
│ ├── config/
│ │ └── env.ts # 环境变量配置
│ ├── models/
│ │ └── types.ts # TypeScript 类型定义
│ ├── api/
│ │ ├── client.ts # HTTP 客户端
│ │ └── yuque-api.ts # 语雀 API 封装
│ ├── tools/
│ │ ├── search.ts # search 工具实现
│ │ └── get-doc.ts # get_doc 工具实现
│ ├── server.ts # MCP 服务器配置
│ └── index.ts # 入口文件
├── package.json
├── tsconfig.json
└── README.md
开发
# 安装依赖
npm install
# 开发模式(监听文件变化)
npm run dev
# 构建
npm run build
# 运行
npm start
使用示例
搜索文档
帮我搜索关于 "TypeScript" 的语雀文档
获取文档内容
获取知识库 123 中文档 456 的详细内容
故障排查
环境变量未设置
如果看到 Missing required environment variable: YUQUE_AUTH_TOKEN,请确保:
- 已创建
.env文件 - 或在 Claude Desktop 配置中设置了
env字段
API 认证失败
检查:
- Token 是否正确
- Token 是否有足够权限
- 网络连接是否正常
许可证
MIT
参考文档
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.