yuque-mcp

yuque-mcp

Enables to interact with Yuque knowledge base API through MCP. Supports discovering, reading, creating, updating, deleting docs and repos, managing groups and members, and using Yuque content as a research knowledge base.

Category
访问服务器

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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选