yuque-desktop-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yuque-desktop-mcp search my Yuque knowledge base for the product requirements doc"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
语雀桌面端 MCP(免 Token / 免会员)
复用语雀 PC 桌面端已登录会话的 MCP Server:不用申请 API Token,不用超级会员,直接读写你语雀里的知识库、文档和搜索。
认证:读取桌面端
_yuque_session(DPAPI + AES-256-GCM 自动解密)权限:与网页版登录账号一致,能看到的才能读到
能力:读取知识库、文档、目录,支持全文搜索、Markdown 正文、新建 / 更新文档
官方
yuque-mcp需要 API Token(超级会员权益);客户端「MCP / CLI 接入指南」走内部utoo-proxy,公开账号没有入口。本仓库直接复用桌面端登录态,绕开这两者。
不想装环境? 直接下载 Windows 便携版:yuque-desktop-mcp-v1.0.0-win-x64.zip(约 38 MB,已内置 Node 运行时,解压后运行
setup.cmd)。
快速开始
要求:
Windows(自动解密依赖 DPAPI;macOS / Linux 用手动 Cookie,见 FAQ)
语雀桌面端已安装并登录(网页版登录不算)
不需要预装 Node.js ——
setup.cmd会自动准备兼容运行时(Node ≥ 22.5)
两种方式任选:
方式一:便携版(推荐,免装 Node)
下载 yuque-desktop-mcp-v1.0.0-win-x64.zip,解压后运行:
.\setup.cmd方式二:从源码
git clone https://github.com/4AM-Forever/yuque-desktop-mcp.git
cd yuque-desktop-mcp
.\setup.cmdsetup.cmd 会依次完成:
定位兼容的 Node;没有就下载便携版到
runtime\node安装依赖
生成当前机器可用的
mcp-config.json读取语雀登录态自检
首次运行需要联网(Node 约 30 MB + 依赖约 14 MB)。常用参数:
参数 | 作用 |
| 生成可整体拷走的便携运行时 |
| 忽略本机 Node,强制下载官方版 |
| 离线:找不到兼容 Node 就报错 |
| 跳过登录态自检 |
| 强制重装依赖 |
手动方式(已有 Node ≥ 22.5):
npm install
.\bin\yuque-cli.cmd checkcheck 能打印账号、凭据来源和知识库数量,就说明打通了。
Related MCP server: Yuque MCP Server
接入 MCP 客户端
setup.cmd 生成的 mcp-config.json 可直接粘贴:
{
"mcpServers": {
"yuque": {
"command": "<项目目录>\\runtime\\node\\node.exe",
"args": ["<项目目录>\\src\\index.js"]
}
}
}
command不要写"node":PATH 里的 Node 可能是 14/16,会启动失败。
客户端 | 配置位置 | 顶层键 |
Claude Desktop |
|
|
Cursor |
|
|
VS Code / Copilot |
|
|
Codex |
|
|
CodeBuddy |
|
|
Qoder |
|
|
ZCode |
|
|
Trae | 设置 → MCP | 以界面为准 |
DeepSeek Harness |
| bundle patch |
路径以各工具版本为准。判断标准:宿主读 MCP 配置就直接粘,只有认插件 / bundle 的才需要适配层。
DSH 为什么需要 bundle
DSH 支持 MCP,但扩展单位是插件 / bundle,不读取通用 mcpServers JSON。@deepseek-ai/dsh-mcp-client 负责连接,每个服务还需要一个 configuration-only bundle 声明 serverName / transport / command / args / env,才能在插件管理器里安装、启停、显示说明。
dsh-bundle/ 只是 DSH 适配器,不含语雀逻辑;语雀 MCP 本体仍是 src/。安装:把 <项目目录>/dsh-bundle 以 link 方式加入 desktop profile,并把 cordis.patch.yml 里的 command / args 换成 mcp-config.json 中的两个值。
工具
工具 | 作用 |
| 账号、会员状态、知识库数量,验证登录态 |
| 列出知识库,返回 |
| 列出某知识库的文档(id / slug / 链接 / 更新时间) |
| 读取文档 Markdown;支持 slug、doc id 或文档链接 |
| 读取知识库目录树 |
| 站内全文搜索 |
| 最近更新 / 最近阅读 |
| 新建文档 |
| 更新标题 / 正文 |
写入默认关闭。开启方式二选一:args 追加 --allow-write,或设置 YUQUE_ALLOW_WRITE=1。
环境变量
变量 | 默认 | 说明 |
| 空 | 直接传 Cookie(优先级最高,跨平台兜底) |
| 空 | 从文件读 Cookie |
| 自动探测 | 桌面端 profile 目录(含 |
|
| 私有部署改成自己的域名 |
| 关闭 |
|
|
| 单次请求超时 |
|
| 单篇文档返回上限 |
原理与安全
原理:
桌面端是 Electron,登录态在
%APPDATA%\yuque-desktop\Network\Cookies_yuque_session由 Chromiumv10方案加密:DPAPI 保管的 AES-256-GCM 密钥 + 密文启动时读
Local State→ DPAPI 解密钥 → 解密 Cookie → 调语雀网页内部 API不经过开放平台 Token,能读到的范围与网页版账号一致;接口明细见
docs/architecture.md
安全:
解密后的 Cookie 只在进程内存使用,不上传;读取时会把桌面端 Cookies 数据库临时复制到系统临时目录并清理
_yuque_session等价于登录态,不要把它写进日志或发给别人写入默认关闭;本项目没有实现删除
桌面端退出登录后,重新登录即可,下次启动自动读到新会话
常见问题
401 / 登录态失效:确认桌面端仍登录,再跑 .\bin\yuque-cli.cmd check。Cookie 一般能维持数周。
v20 / App-Bound 加密:自动解密失效时,浏览器登录语雀 → F12 → Network → 复制 Cookie,设置 YUQUE_COOKIE。
macOS / Linux / 没装桌面端:同样手动复制 Cookie,用 YUQUE_COOKIE 或 YUQUE_COOKIE_FILE;接口逻辑一致。
企业私有部署:设置 YUQUE_BASE_URL,Cookie 也要用该域名下的会话。
做不到的:团队空间管理、附件上传、评论、权限管理 —— 这些只有开放平台 Token 才有。
换一台电脑 / 分发
源机器:
.\setup.cmd -Portable把整个目录(至少 src\、bin\、runtime\、node_modules\、package.json)拷走。目标机器解压后:
.\setup.cmd -SkipCheck它会复用 runtime\node,补装缺失依赖,并按新路径重新生成 mcp-config.json。
目标机器不需要装 Node.js
Cookie 与机器绑定(DPAPI),不用带凭据;在新机器登录桌面端即可
runtime\不进仓库,分发时单独打包
目录与调试
src/ MCP 本体(index / server / yuque / auth / config / cli)
bin/ MCP 与 CLI 启动器(自动定位兼容 Node)
runtime/ setup.cmd -Portable 生成的便携 Node(不进仓库)
dsh-bundle/ DSH 适配器(不含语雀逻辑)
setup.cmd 一键安装入口
setup.ps1 安装逻辑
mcp-config.json 按当前机器生成(不进仓库)
test/smoke.js 端到端冒烟测试.\bin\yuque-cli.cmd check
.\bin\yuque-cli.cmd books
.\bin\yuque-cli.cmd docs <book_id>
.\bin\yuque-cli.cmd doc <book_id> <slug>
.\bin\yuque-cli.cmd search 工作Available Tools
9 toolsyuque_create_doc新建文档(需开启写入)A
在指定知识库中新建一篇 Markdown 文档。默认禁用,需 YUQUE_ALLOW_WRITE=1。
Inputs: body (required), title (required), book_id (required), slug.
yuque_get_doc读取文档内容BRead-only
读取一篇语雀文档的 Markdown 正文与元信息。doc 可以是文档 slug 或文档 id;也可以直接传语雀文档链接。
Inputs: doc (required), format, book_id.
yuque_get_toc读取知识库目录ARead-only
读取知识库的目录树(标题层级、文档 id、slug),便于按结构浏览。
Inputs: book_id (required).
yuque_list_books列出知识库ARead-only
列出当前账号可见的全部知识库(含 id、名称、文档数、slug)。返回的 id 就是其他工具需要的 book_id。
Inputs: limit, offset.
yuque_list_docs列出知识库中的文档BRead-only
列出某个知识库(book_id)里的文档,返回文档 id、标题、slug、链接和更新时间。
Inputs: book_id (required), limit, offset.
yuque_list_recent最近更新的文档BRead-only
列出当前账号最近更新(或最近阅读)的文档。
Inputs: limit, scope.
yuque_search搜索语雀BRead-only
全文搜索文档或知识库(复用语雀站内搜索索引)。
Inputs: query (required), type, limit.
yuque_update_doc更新文档(需开启写入)ADestructive
更新已有文档的标题或 Markdown 正文。默认禁用,需 YUQUE_ALLOW_WRITE=1。
Inputs: doc (required), book_id (required), body, title.
yuque_whoami当前语雀账号ARead-only
查看当前登录的语雀账号、会员状态、知识库数量,并验证登录态是否有效。
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose: identity check, book enumeration, doc enumeration, single-doc read, TOC structure, full-text search, recency listing, and two write operations. The only mild overlap is between yuque_get_doc (reads one doc) and yuque_get_toc (reads a book's structure), plus yuque_list_recent vs yuque_search, but the descriptions make the boundaries clear.
All nine tools follow a strictly consistent yuque_verb_noun pattern in snake_case (whoami is the sole noun-only name but reads naturally as an identity verb). Verb choices (list/get/search/create/update) are predictable and reused coherently across resources.
Nine tools is well-scoped for a Yuque read-first client: enough to cover discovery, navigation, retrieval, and editing without redundancy. Every tool earns its place and no trivial or filler tool exists.
Read coverage is strong (books, docs, TOC, search, recent, whoami) and write coverage includes create and update. However there is no delete_doc, no document move/rename, and no book or group management, leaving the lifecycle incomplete for anything beyond authoring and editing.
Maintenance
Related MCP Connectors
Search and manage your team's knowledge from MCP clients.
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Knowledge base MCP for AI agents on iknow.dev. Search, read, and maintain via OAuth.
Read and write your team's shared, AI-readable wiki from any MCP client.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables access to Yuque (语雀) documentation through cookie-based authentication, supporting document retrieval, search, TOC navigation, and content management from knowledge bases via URL or namespace.44MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Yuque (语雀) platform through MCP protocol, supporting knowledge base management, document operations, search, and team collaboration features.11MIT

Yuque MCP Serverofficial
AlicenseBqualityBmaintenanceMCP server for Yuque (语雀) that exposes your knowledge base to AI assistants through the Model Context Protocol.211,257 npm273MIT- AlicenseBqualityDmaintenanceEnables reading Yuque documents, listing knowledge base docs, and converting source content to Markdown via MCP. Supports session cookie authentication and optional Playwright rendering.31MIT