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 分