Documents

Yuque Mcp Tool

Try it

通过 MCP 协议在 AI 客户端中读取语雀文档。支持读取渲染内容、转换 Markdown、列出知识库文档。 兼容 Claude Desktop、Cursor、WorkBuddy 等主流 MCP 客户端。

What it does

通过 MCP 协议在 AI 客户端中读取语雀文档。支持读取渲染内容、转换 Markdown、列出知识库文档。 兼容 Claude Desktop、Cursor、WorkBuddy 等主流 MCP 客户端。

The skill document

Yuque MCP Tool


中文文档

简介

Yuque MCP Tool 是一个基于 Session Cookie 的语雀 MCP (Model Context Protocol) 服务器。安装后,AI Agent 可以直接读取你的语雀文档内容,无需手动复制粘贴。

适用场景:

  • 让 AI 读取语雀知识库中的技术文档、产品需求、会议纪要
  • 将语雀文档批量转换为 Markdown 格式
  • 快速浏览知识库的文档目录结构

提供的工具

工具名参数说明
yuque_readurl(必填)读取语雀文档,返回渲染后的文本内容
yuque_read_markdownurl(必填),include_stats(可选,布尔值)推荐。读取 Lake/API 源内容并转换为 Markdown,保留表格、PlantUML/Mermaid 图表、代码块、图片、链接和画板摘要
yuque_list_docsrepo_slug(必填),host(可选)列出知识库中的所有文档

安装

# 方式一:pip 安装(推荐)
pip install yuque-mcp-tool

# 安装 Playwright 浏览器(可选,用于渲染 JS 页面)
python -m playwright install chromium

# 方式二:从源码安装
git clone https://github.com/andy8663/yuque-mcp-tool.git
cd yuque-mcp-tool
pip install -e .

方法一:Application 面板(推荐)

  1. 登录 语雀
  2. F12 打开浏览器开发者工具
  3. 切换到 Application(应用)面板
  4. 左侧展开 Cookies → 点击 https://www.yuque.com
  5. 找到 _yuque_session,复制其 Value 列的值

方法二:Console 命令

  1. 登录 语雀
  2. F12 → 在 Console 中输入:
    document.cookie.split('; ').find(c => c.startsWith('_yuque_session=')).split('=')[1]
    
  3. 复制输出的值

⚠️ 如果 _yuque_session 被标记为 HttpOnly,方法二无效,请使用方法一。

Session 有效期约 30 天,过期后需重新获取。

配置 MCP 客户端

在 MCP 客户端的配置文件中添加以下内容:

{
  "mcpServers": {
    "yuque": {
      "command": "yuque-mcp",
      "env": {
        "YUQUE_SESSION": "YOUR_YUQUE_SESSION",
        "YUQUE_HOST": "https://www.yuque.com"
      }
    }
  }
}

各客户端配置文件位置:

客户端配置文件路径
Claude Desktop (macOS)~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows)%APPDATA%\Claude\claude_desktop_config.json
Cursor.cursor/mcp.json(项目根目录)
WorkBuddyMCP 配置文件
通用 MCP 客户端参考客户端文档

如果未通过 pip install 安装,可将 command 改为 pythonargs 设为 ["-m", "yuque_mcp"]

环境变量

变量名必填默认值说明
YUQUE_SESSION语雀 Session Cookie(_yuque_session 的值)
YUQUE_HOSThttps://www.yuque.com默认语雀主机,用于补全短路径 URL
YUQUE_BROWSER_CHANNELPlaywright 浏览器通道,如 chrome
YUQUE_CHROMIUM_EXECUTABLEChromium/Chrome 可执行文件绝对路径
YUQUE_RENDER_MODEauto渲染模式:auto(自动)、off(关闭)、force(强制 Playwright)

使用示例

读取文档为 Markdown(推荐):

帮我读取这个语雀文档:https://www.yuque.com/cc9c0g/rebell/hf0gch

列出知识库文档:

列出语雀知识库 cc9c0g/rebell 里的所有文档

读取渲染内容:

读取这个语雀页面的内容:https://ogtd9v.yuque.com/org/wiki/hf0gch

常见问题

Session 无效 / 读取失败:重新登录语雀,获取新的 _yuque_session 值并更新配置。

Playwright 渲染失败:设置 YUQUE_BROWSER_CHANNEL=chrome 使用系统 Chrome。

团队/空间子域名:文档在团队子域名下(如 ogtd9v.yuque.com)时,设置 YUQUE_HOST 为常用子域名,或直接传完整 URL。

技术栈

aiohttp + Playwright(可选渲染)+ BeautifulSoup4

License

MIT License — 详见 LICENSE


English Documentation

Overview

Yuque MCP Tool is a session-cookie-based MCP (Model Context Protocol) server for Yuque documents. Once installed, your AI Agent can read Yuque documents directly — no manual copy-paste needed.

Use cases:

  • Let AI read technical docs, product requirements, and meeting notes from Yuque
  • Batch convert Yuque documents to Markdown format
  • Quickly browse the document tree of a knowledge base

Available Tools

ToolParametersDescription
yuque_readurl (required)Read a Yuque document and return the rendered text content
yuque_read_markdownurl (required), include_stats (optional, boolean)Recommended. Read the Lake/API source content and convert to Markdown, preserving tables, PlantUML/Mermaid diagrams, code blocks, images, links, and board summaries
yuque_list_docsrepo_slug (required), host (optional)List all documents in a Yuque repository

Installation

# Option 1: pip install (recommended)
pip install yuque-mcp-tool

# Install Playwright browser (optional, for JS page rendering)
python -m playwright install chromium

# Option 2: install from source
git clone https://github.com/andy8663/yuque-mcp-tool.git
cd yuque-mcp-tool
pip install -e .

Method 1: Application Panel (Recommended)

  1. Log in to Yuque
  2. Press F12 to open browser DevTools
  3. Switch to the Application tab
  4. Expand Cookies → click https://www.yuque.com
  5. Find _yuque_session and copy its Value

Method 2: Console Command

  1. Log in to Yuque
  2. Press F12 → in the Console, run:
    document.cookie.split('; ').find(c => c.startsWith('_yuque_session=')).split('=')[1]
    
  3. Copy the output value

⚠️ If _yuque_session is marked as HttpOnly, Method 2 will not work — use Method 1 instead.

The session cookie is valid for approximately 30 days.

MCP Client Configuration

Add the following to your MCP client's configuration file:

{
  "mcpServers": {
    "yuque": {
      "command": "yuque-mcp",
      "env": {
        "YUQUE_SESSION": "YOUR_YUQUE_SESSION",
        "YUQUE_HOST": "https://www.yuque.com"
      }
    }
  }
}

Configuration file locations by client:

ClientConfig File Path
Claude Desktop (macOS)~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows)%APPDATA%\Claude\claude_desktop_config.json
Cursor.cursor/mcp.json (project root)
WorkBuddyMCP configuration file
Generic MCP ClientRefer to client documentation

If not installed via pip install, set command to python and args to ["-m", "yuque_mcp"].

Environment Variables

VariableRequiredDefaultDescription
YUQUE_SESSIONYesYuque session cookie (_yuque_session value)
YUQUE_HOSTNohttps://www.yuque.comDefault Yuque host for short-path URL completion
YUQUE_BROWSER_CHANNELNoPlaywright browser channel, e.g. chrome
YUQUE_CHROMIUM_EXECUTABLENoAbsolute path to a Chromium/Chrome executable
YUQUE_RENDER_MODENoautoRendering mode: auto, off, or force

Usage Examples

Read a document as Markdown (recommended):

Read this Yuque document: https://www.yuque.com/cc9c0g/rebell/hf0gch

List documents in a knowledge base:

List all documents in Yuque repository cc9c0g/rebell

Read rendered content:

Read the content of this Yuque page: https://ogtd9v.yuque.com/org/wiki/hf0gch

FAQ

Invalid Session / Read Failure: Re-log in to Yuque, obtain a new _yuque_session value, and update your configuration.

Playwright Rendering Failure: Set YUQUE_BROWSER_CHANNEL=chrome to use the system Chrome.

Team / Workspace Subdomains: If documents are on a team subdomain (e.g. ogtd9v.yuque.com), set YUQUE_HOST to your common subdomain, or pass full document URLs directly.

Tech Stack

aiohttp + Playwright (optional rendering) + BeautifulSoup4

License

MIT License — see LICENSE

Related skills

Use this skill when a user wants to create, update, delete, or list documents in a Yuque knowledge base, or manage Yuque repository table of contents. Use it for pushing local content to Yuque, syncing document changes, or inspecting what exists in a Yuque repo. Do not use it when the user wants general knowledge-base management unrelated to Yuque, or when they need to manage Yuque team members, permissions, or repository settings.

1 installs

Configure and route Dataify MCP tools safely

2 installs

Chrome DevTools MCP 服务器,让 AI 编码助手(Claude Code、Cursor、Copilot)直接控制和调试真实 Chrome 浏览器,实现截图、性能分析、网络请求检查、控制台调试和自动化操作

19 installs

OpenClaw MCP 桥接框架。受 Claude Code MCPTool 启发重新设计的 OpenClaw 原生 MCP 连接器。通过标准化的 stdio/SSE 协议连接外部服务,支持动态工具注册、资源读取、流式响应。零泄露代码,纯原创实现,使用 @modelcontextprotocol/sdk 标准库。

5 installs

国产大模型统一 MCP 服务器,通过标准 JSON-RPC 2.0 协议为 Claude Code / Cursor / Cline / n8n 等 18+ Agent 框架提供 DeepSeek、通义千问、智谱 GLM、Kimi、腾讯混元、火山豆包、MiniMax、零一万物、百川智能、阶跃星辰十家模型的统一调用接口。新增 5 个非 MCP 框架适配器:LangChain Tool、AutoGPT Plugin、CrewAI Tool、Coze 插件、Dify 工具节点,实现从 MCP 生态到全 Agent 生态的扩展。内置模型性能基准测试套件(50 道题库、6 维度评分、雷达图对比、历史追踪)和 Token 价格实时追踪(价格抓取、变更通知、趋势图、成本预测)。支持 8 个 MCP 工具(ask_model/describe_image/embed_text/rerank/audio_transcribe/video_understand/list_providers/health_check)、资源读取(配置/使用统计)、预置 prompt 模板(代码审查/翻译),内置统一错误映射、流式 SSE 输出、使用量统计、硬件感知并发控制。auto 模式支持能力画像排序 + 自动故障转移(超时/失败切备用);API key 支持环境变量优先读取;SQLite 启用 WAL 模式支持多 Agent 框架并发写入;支持多模态视觉模型(Qwen-VL/GLM-4V/豆包视觉)和图片理解(describe_image);支持 Function Calling / Tool Use(ask_model 传入 tools 参数);新增文本向量嵌入(embed_text)、文档重排序(rerank)、语音转文字(audio_transcribe)、视频理解(video_understand)四个新工具。config.json 填写 api_key 即可启动,无需 GPU、不做微调、不做私有部署,只做标准 MCP 协议网关。

一个强大的模型上下文协议(MCP)服务器,提供对学术文献数据库的无缝访问,帮助研究人员使用LLM和MCP客户端(如Claude、Cursor等)加速文献综述过程。