yuque-mcp
Click on "Install 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-mcp把会议纪要写成语雀文档"
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 Server(本地版 · 双认证模式)
一个用 Python 编写的本地 MCP server,让 AI 客户端(ZCode)可以直接读写你的语雀文档。
认证方式(按优先级自动选择)
模式 | 环境变量 | 要求 | 接口 |
官方 OpenAPI |
| 需超级会员 |
|
网页端 Cookie |
| 免费,任何用户可用 |
|
Related MCP server: Yuque MCP Server
它能做什么(6 个工具)
工具 | 功能 |
| 获取当前账号信息(验证凭证是否有效) |
| 列出当前账号的知识库 |
| 列出知识库里的文档 |
| 创建文档(Markdown 正文) |
| 获取文档内容 |
| 更新文档标题/正文 |
一、免费方式:获取 Cookie(不需要超级会员)
用 Chrome/Edge 登录语雀网页版(https://www.yuque.com)
按 F12 打开开发者工具 → 切到 Network(网络) 标签
刷新页面,点击任意一个请求
在右侧 Request Headers 里找到
Cookie:开头的整段内容(很长的一串)整段复制(含
_yuque_session=...和yuque_ctoken=...)
⚠️ 一定包含
yuque_ctoken,它是写操作(创建/更新文档)要用的 CSRF 令牌。 Cookie 有效期约 2 周,过期后在 Settings → MCP 里重新粘贴即可。
二、把凭证填进 ZCode
ZCode → Settings → MCP → 找到 yuque → 在环境变量里粘贴:
YUQUE_COOKIE:粘贴上一步复制的整段 Cookie 值(免费路线,推荐)
⚠️ Cookie 等于你的登录态,别贴到聊天框、别提交进 git、别发给任何人。
三、重启 ZCode
配置修改后重启 ZCode(新会话自动连接),在 Settings → MCP 确认 yuque 已连接。
之后说一句「把 XXX 写成语雀文档」即可。
手动验证(可选)
pip install "mcp>=1.2.0,<2" # mcp 2.x 移除了 FastMCP,必须锁 1.x
python test_client.py # 协议自测:握手 → 列工具 → 两种认证模式链路文件说明
server.py— MCP server 本体(双认证模式,@mcp.tool()注册工具,stdio 传输)test_client.py— 模拟 MCP 客户端的自测脚本(3 组用例)requirements.txt— 依赖(mcp 1.x)
踩坑记录(学习笔记)
mcp 2.0.0 移除了 FastMCP:
pip install mcp默认装 2.x 会报ModuleNotFoundError: No module named 'mcp.server.fastmcp',必须锁mcp>=1.2,<2。Windows 下 spawn 进程要用绝对路径:
command填python.exe完整路径,别写python。语雀 OpenAPI 令牌是超级会员专享(2022 年后的策略):免费用户改用网页端内部接口
cookie 认证。实测可用的端点(cookie 模式):
GET /api/mine(用户)、GET /api/mine/books(知识库)、GET /api/docs/{slug}?book_id=...&mode=markdown(文档,正文在sourcecode字段)创建文档:
POST /api/docs(JSON 体:book_id/title/format/body/body_draft/public)更新文档:
PUT /api/docs/{id}/content再PUT /api/docs/{id}/publish(先写草稿后发布)
cookie 模式写操作三要素:
yuque_ctoken同时作为 cookie 和X-CSRF-Token请求头; 请求头必须带X-Requested-With: XMLHttpRequest;请求体是 JSON(不是表单), 且要带Referer: https://www.yuque.com/{login}/{book_slug}。网页端接口是非公开的:语雀改版可能需要适配;这是社区方案(elog、 yuque-cookie-plugin 等)都在用的路线。第一次写 404 很正常——先抓真实源码, 别猜端点。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables interaction with Yuque (语雀) knowledge base platform through their API. Supports document management, search, and repository operations including creating, reading, updating, and deleting documents in multiple formats.9593MIT
- 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.43644MIT
- Alicense-qualityCmaintenanceEnables AI assistants to interact with Yuque (语雀) platform through MCP protocol, supporting knowledge base management, document operations, search, and team collaboration features.10MIT
- AlicenseBqualityCmaintenanceEnables reading Yuque documents, listing knowledge base docs, and converting source content to Markdown via MCP. Supports session cookie authentication and optional Playwright rendering.3MIT
Related MCP Connectors
MCP-native collaborative markdown editor with real-time AI document editing
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/k187401/yuque-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server