Yuque MCP

io.github.wwwwujl由 GitHub 账号 wwwwujl 发布v1.1.0更新于 Oct 24, 2026

Yuque MCP server with safe read/write tools for groups, group members, repositories, docs, and TOC.

概览

AI 生成的概览

让助手浏览、读取、搜索语雀知识库、文档、群组与目录,并在显式启用后创建、更新或删除这些内容。

可以做什么
通过语雀 API 把助手接入语雀:发现知识库与文档,以 markdown、html 或 lake 格式读取文档内容,在知识库内搜索,并分页列出文档。还提供组合工具,如 get_my_repositories、get_repository_overview、search_and_read 和 create_document_with_toc。写入工具覆盖知识库、文档、群组、群组成员与目录操作,并支持从本地文件创建或更新文档。写入与删除工具默认被禁用,需通过环境变量开启。
适用场景
适合把文档或研究笔记放在语雀、希望助手读取、搜索并总结,或起草和更新页面与目录条目的场景。也适合希望把写入权限限制在特定命名空间或群组的团队。
运行要求
以 npm 包形式通过 stdio 在本地运行,建议 Node.js 20+。需要 YUQUE_TOKEN 中的语雀 API 令牌。可选配置包括 YUQUE_ENDPOINT、YUQUE_TIMEOUT_MS、YUQUE_MAX_RETRIES、YUQUE_ALLOW_WRITE、YUQUE_ALLOW_DELETE、写入与删除白名单,以及文件工具限制(YUQUE_FILE_ROOT、YUQUE_FILE_MAX_BYTES、YUQUE_FILE_ALLOWED_EXTENSIONS)。需要访问语雀 API 的网络。
安装前请注意
YUQUE_TOKEN 是可访问你语雀账号的密钥,不要放入共享配置。写入默认关闭,需 YUQUE_ALLOW_WRITE 开启;删除还需 YUQUE_ALLOW_DELETE、白名单以及精确的 confirm_text,开启后可能修改或删除真实文档、知识库和群组。文件类工具会读取 YUQUE_FILE_ROOT 下的本地文件,请将其指向安全目录。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Yuque MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

yuque-mcp

中文说明: README.zh-CN.md

This folder is prepared for building a custom MCP server for Yuque.

Goal

Build a Yuque MCP server so Codex can:

  • discover Yuque repos and docs
  • read doc content in markdown/raw mode
  • create/update/delete docs when needed
  • create docs from local files and update docs from local files
  • create/update/delete repos (knowledge bases)
  • create/update/delete groups
  • manage group members (list/add/remove)
  • run combined operations (get_my_repositories, get_repository_overview, search_and_read, create_document_with_toc)
  • update repository TOC nodes
  • use Yuque content as a research knowledge base

Included Docs

  • docs/00-project-brief.md
  • docs/01-scope-v1.md
  • docs/02-architecture.md
  • docs/03-tool-contract.md
  • docs/04-api-mapping.md
  • docs/05-security.md
  • docs/06-implementation-plan.md
  • docs/07-test-plan.md
  • docs/08-codex-integration.md
  • docs/09-release-notes-zh.md
  • docs/10-registry-publish.md
  • docs/11-weekly-maintenance.md
  • docs/12-complaint-and-takedown.md
  • CHANGELOG.md
  • CONTRIBUTING.md
  • SECURITY.md
  • DISCLAIMER.md
  • tasks/TODO.md

Session Kickoff

In your new Codex session, start with:

  1. Read docs/01-scope-v1.md and docs/03-tool-contract.md.
  2. Scaffold Node + TypeScript MCP server.
  3. Implement read-only tools.
  4. Add write tools for group/repo/doc CRUD + TOC update.
  5. Run tests and add Codex MCP config.

Quick Start (Local)

bash
npm installnpm run build

Required env:

  • YUQUE_TOKEN
  • YUQUE_ENDPOINT (optional, default https://www.yuque.com/api/v2/)
  • YUQUE_TIMEOUT_MS (optional, default 10000)
  • YUQUE_MAX_RETRIES (optional, default 2, read-only retries only)
  • YUQUE_ALLOW_WRITE (optional, default false)
  • YUQUE_WRITE_NAMESPACE_ALLOWLIST (optional, comma-separated namespace allowlist for repo/doc/toc writes)
  • YUQUE_WRITE_GROUP_ALLOWLIST (optional, comma-separated group login allowlist for group writes)
  • YUQUE_ALLOW_DELETE (optional, default false)
  • YUQUE_DELETE_NAMESPACE_ALLOWLIST (optional, comma-separated delete allowlist targets; namespace for repo/doc, login for group)
  • YUQUE_FILE_ROOT (optional, default current working directory, used by file-based doc tools)
  • YUQUE_FILE_MAX_BYTES (optional, default 1048576)
  • YUQUE_FILE_ALLOWED_EXTENSIONS (optional, default .md,.markdown,.txt)

Write safety:

  • All write tools are blocked by default.
  • Set YUQUE_ALLOW_WRITE=true to enable writes.
  • Optional write allowlists:
    • YUQUE_WRITE_NAMESPACE_ALLOWLIST=team/sandbox,team/test
    • YUQUE_WRITE_GROUP_ALLOWLIST=sandbox-team

Delete safety:

  • yuque_delete_doc, yuque_delete_repo, and yuque_delete_group are blocked by default.
  • To enable delete for test repos only, set:
    • YUQUE_ALLOW_WRITE=true
    • YUQUE_ALLOW_DELETE=true
    • YUQUE_DELETE_NAMESPACE_ALLOWLIST=your/test-namespace,your-test-group-login
  • Delete tools also require confirm: true and exact confirm_text:
    • doc: DELETE DOC <namespace>/<docRef>
    • repo: DELETE REPO <namespace>
    • group: DELETE GROUP <login>

Latest highlights:

  • yuque_get_doc / yuque_update_doc / yuque_delete_doc support either slug or doc_id.
  • yuque_list_docs supports pagination (offset, limit).
  • yuque_search_docs now scans paginated docs across the full repository.
  • Doc format supports markdown, html, lake; visibility supports 0 | 1 | 2.
  • TOC update supports extra fields (editNode, url, open_window, visible).
  • Group member tools: yuque_list_group_users, yuque_add_group_user, yuque_remove_group_user.
  • File-based tools are constrained by root directory, extension allowlist, and max size.

Run in dev:

bash
npm run dev

Run compiled server:

bash
npm run start

Run local MCP smoke test (test namespace only):

bash
YUQUE_SMOKE_NAMESPACE=your/test-namespace npm run smoke

Run write smoke suite with cleanup (create/update/toc/delete on test namespace):

bash
YUQUE_SMOKE_NAMESPACE=your/test-namespace \YUQUE_SMOKE_ENABLE_WRITE=true \YUQUE_ALLOW_WRITE=true \YUQUE_ALLOW_DELETE=true \YUQUE_DELETE_NAMESPACE_ALLOWLIST=your/test-namespace \npm run smoke

Suggested Stack

  • Node.js 20+
  • TypeScript
  • @modelcontextprotocol/sdk
  • Native fetch or lightweight HTTP client
  • zod for input validation

Open Source Governance

  • Contribution guide: CONTRIBUTING.md
  • Security policy: SECURITY.md
  • Weekly maintenance checklist: docs/11-weekly-maintenance.md
  • Complaint and takedown policy: docs/12-complaint-and-takedown.md
  • Disclaimer: DISCLAIMER.md

来源:README.md,提交 e3de123

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分