mcpField
Y
Yuque MCP

Yuque MCP

Local
github.comProductivity0Updated 36w ago

About Yuque MCP

Yuque MCP is an MCP server for connecting Codex and other MCP clients to Yuque repositories, documents, groups, and members. It combines discovery and document operations with configurable allowlists and write/delete safeguards.

Key features

  1. 01Browse repositories and documents
  2. 02Read docs as Markdown or raw content
  3. 03Create, update, and delete docs
  4. 04Manage groups and members
  5. 05Update repository TOC
  6. 06Restrict writes and deletes with safeguards

Use cases

  1. 01Find and read documents in Yuque repositories
  2. 02Create or update docs from local files
  3. 03Manage repository and group content
  4. 04Use Yuque content for research

MCP support

Exposes Yuque repository, document, group, member, and TOC operations as tools for MCP clients. Write and delete tools are disabled by default and can be controlled with environment settings.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"wwwwujl-yuque": {
"command": "npx",
"args": [
"-y",
"@wwwwwujl/yuque-mcp"
],
"env": {
"YUQUE_TOKEN": "<YUQUE_TOKEN>",
"YUQUE_ENDPOINT": "<YUQUE_ENDPOINT>",
"YUQUE_TIMEOUT_MS": "<YUQUE_TIMEOUT_MS>",
"YUQUE_MAX_RETRIES": "<YUQUE_MAX_RETRIES>",
"YUQUE_ALLOW_WRITE": "<YUQUE_ALLOW_WRITE>",
"YUQUE_WRITE_NAMESPACE_ALLOWLIST": "<YUQUE_WRITE_NAMESPACE_ALLOWLIST>",
"YUQUE_WRITE_GROUP_ALLOWLIST": "<YUQUE_WRITE_GROUP_ALLOWLIST>",
"YUQUE_ALLOW_DELETE": "<YUQUE_ALLOW_DELETE>",
"YUQUE_DELETE_NAMESPACE_ALLOWLIST": "<YUQUE_DELETE_NAMESPACE_ALLOWLIST>",
"YUQUE_FILE_ROOT": "<YUQUE_FILE_ROOT>",
"YUQUE_FILE_MAX_BYTES": "<YUQUE_FILE_MAX_BYTES>",
"YUQUE_FILE_ALLOWED_EXTENSIONS": "<YUQUE_FILE_ALLOWED_EXTENSIONS>"
}
}
}
}
Run commandnpx -y @wwwwwujl/yuque-mcp
Environment variables to set
YUQUE_TOKENSecretYuque API token
YUQUE_ENDPOINTYuque API endpoint (optional)
YUQUE_TIMEOUT_MSYuque API timeout in milliseconds (optional)
YUQUE_MAX_RETRIESRead-only retry count (optional)
YUQUE_ALLOW_WRITEEnable write tools when true (optional, default false)
YUQUE_WRITE_NAMESPACE_ALLOWLISTComma-separated namespace allowlist for repo/doc/toc writes (optional)
YUQUE_WRITE_GROUP_ALLOWLISTComma-separated group login allowlist for group writes (optional)
YUQUE_ALLOW_DELETEEnable delete tools when true (optional, default false)
YUQUE_DELETE_NAMESPACE_ALLOWLISTComma-separated delete allowlist targets (optional)
YUQUE_FILE_ROOTAllowed root directory for file-based doc tools (optional, default current working directory)
YUQUE_FILE_MAX_BYTESMaximum size for file-based doc tools (optional, default 1048576)
YUQUE_FILE_ALLOWED_EXTENSIONSComma-separated allowed extensions for file-based doc tools (optional, default .md,.markdown,.txt)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@wwwwwujl/yuque-mcp1.1.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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)

npm install
npm 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:

npm run dev

Run compiled server:

npm run start

Run local MCP smoke test (test namespace only):

YUQUE_SMOKE_NAMESPACE=your/test-namespace npm run smoke

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

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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.