{
  "markdown": "<div align=\"center\">\n\n<a href=\"https://www.yuque.com/\"><img src=\"https://avatars.githubusercontent.com/u/34602419?s=200&v=4\" width=\"96\" alt=\"Yuque logo\"></a>\n\n<h1>Yuque MCP Server</h1>\n\nLet AI assistants read and write your [Yuque (语雀)](https://www.yuque.com/) knowledge base<br>through the [Model Context Protocol](https://modelcontextprotocol.io/).\n\n[![CI][ci-image]][ci-url] [![npm version][npm-image]][npm-url] [![npm downloads][download-image]][download-url] [![License][license-image]][license-url]\n\n[Quick Start](#quick-start) · [Tools](#tools-19) · [Troubleshooting](#troubleshooting) · [Docs](./docs/README.md) · [中文文档](./README.zh-CN.md)\n\n</div>\n\nOnce connected, ask your assistant things like:\n\n> \"Search my Yuque for everything about canary releases and give me a one-page summary.\"\n>\n> \"Turn today's meeting notes into a doc in my _Tech Research_ book.\"\n>\n> \"Add a flowchart of this deployment pipeline to the design doc.\"\n\n## Quick Start\n\n**1. Get a token** — create one at [Yuque Developer Settings](https://www.yuque.com/settings/tokens). If you use a team token bound to a Yuque space, also note the space host (e.g. `https://your-space.yuque.com`) — you will pass it as `--host`.\n\n**2. Install** — one command locates the right config file for your OS and merges a `yuque` entry into it, without touching other servers:\n\n```bash\nnpx yuque-mcp install --token=YOUR_TOKEN --client=cursor\n```\n\nSupported clients: `claude-desktop` · `vscode` · `cursor` · `windsurf` · `cline` · `trae` · `qoder` · `opencode`. Prefer an interactive flow? Run `npx yuque-mcp setup`.\n\n<details>\n<summary><b>Claude Code</b></summary>\n\nRegister the server directly:\n\n```bash\nclaude mcp add yuque -- npx -y yuque-mcp --token=YOUR_TOKEN\n```\n\n</details>\n\n<details>\n<summary><b>Other MCP clients (generic config)</b></summary>\n\nAny client that supports stdio transport works — see [docs/clients.md](./docs/clients.md) for per-client config paths.\n\n```json\n{\n  \"mcpServers\": {\n    \"yuque\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"yuque-mcp\"],\n      \"env\": { \"YUQUE_TOKEN\": \"YOUR_TOKEN\" }\n    }\n  }\n}\n```\n\n</details>\n\n**3. Restart your client** and start asking.\n\n## Configuration\n\n| Setting              | Env var / CLI flag        | Description                                                                                                     |\n| -------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------- |\n| Token **(required)** | `YUQUE_TOKEN` / `--token` | Personal or team Yuque API token                                                                                |\n| Host (optional)      | `YUQUE_HOST` / `--host`   | Site or space host, e.g. `https://your-space.yuque.com` — required for space-bound team tokens and private deployments |\n\nSite roots are normalized to `/api/v2`; when unset, the host defaults to `https://www.yuque.com/api/v2`.\n\n```bash\n# Team token / private deployment\nnpx yuque-mcp install --token=YOUR_TOKEN --client=cursor --host=https://your-space.yuque.com\n```\n\n<details>\n<summary>Migrating from an older config?</summary>\n\n`YUQUE_PERSONAL_TOKEN`, `YUQUE_BASE_URL`, and `--base-url` still work as legacy fallbacks. Precedence: `YUQUE_TOKEN` > `YUQUE_PERSONAL_TOKEN` > `--token`, and `YUQUE_HOST` > `--host` > `YUQUE_BASE_URL` > `--base-url`. New configs should use `YUQUE_TOKEN` and `YUQUE_HOST`.\n\n</details>\n\n## Tools (19)\n\nEach tool maps to exactly one Yuque API route.\n\n| Category    | Tool                    | Description                                              |\n| ----------- | ----------------------- | -------------------------------------------------------- |\n| **User**    | `yuque_get_user`        | Get the authenticated user for the current token         |\n| **Search**  | `yuque_search`          | Search docs or repos, with paging                        |\n| **Books**   | `yuque_list_books`      | List books (知识库) of a user                            |\n|             | `yuque_get_book`        | Get a book by ID or namespace                            |\n|             | `yuque_create_book`     | Create a book                                            |\n|             | `yuque_update_book`     | Update name, slug, description, or visibility            |\n| **Docs**    | `yuque_list_docs`       | List docs in a book, with paging                         |\n|             | `yuque_get_doc`         | Get full content — markdown, `lake`, or `html`           |\n|             | `yuque_create_doc`      | Create a doc in a book                                   |\n|             | `yuque_update_doc`      | Update a doc's body or metadata                          |\n| **TOC**     | `yuque_get_toc`         | Get a book's table of contents                           |\n|             | `yuque_update_toc`      | Append or move a single TOC node                         |\n| **Notes**   | `yuque_list_notes`      | List notes (小记), with paging and status filter         |\n|             | `yuque_get_note`        | Get a note with full content                             |\n|             | `yuque_create_note`     | Create a note                                            |\n|             | `yuque_update_note`     | Update a note                                            |\n| **Boards**  | `yuque_get_resource`    | Read a board (mindmap / flowchart / diagram) from a doc  |\n|             | `yuque_create_resource` | Create a board in a doc                                  |\n|             | `yuque_update_resource` | Update a board in a doc                                  |\n\nIn particular, `yuque_update_doc` cannot combine a markdown body with `title` / `slug` / `public` changes in a single call — update metadata separately. The full contract, including format routing between the YMD markdown API and the legacy document API, is documented in [docs/capability-scope.md](./docs/capability-scope.md).\n\n**Not covered (yet):** comments, attachment upload and file management, permission and member management, section-level doc edits, and structured resources other than boards.\n\n## Write access\n\nThe create/update tools modify real content in your knowledge base, and the server can do whatever your token can do. Keep the token secret, and prefer a space-scoped team token (with `YUQUE_HOST`) when you only work within one space. To report a vulnerability, see [SECURITY.md](./SECURITY.md).\n\n## Troubleshooting\n\n| Error                         | Solution                                                                     |\n| ----------------------------- | ----------------------------------------------------------------------------- |\n| `YUQUE_TOKEN ... is required` | Set `YUQUE_TOKEN=YOUR_TOKEN` or pass `--token=YOUR_TOKEN`                     |\n| `401 Unauthorized`            | Token invalid or expired — [regenerate it](https://www.yuque.com/settings/tokens) |\n| `429 Rate Limited`            | Too many requests — wait a moment and retry                                   |\n| `410 Gone`                    | Target permanently deleted or endpoint deprecated — check the doc/book exists |\n| Tool not found                | Update to the latest version: `npx -y yuque-mcp@latest`                       |\n| `npx` command not found       | Install [Node.js](https://nodejs.org/) v18 or later                           |\n\n## Development\n\n```bash\ngit clone https://github.com/yuque/yuque-mcp-server.git\ncd yuque-mcp-server\nnpm install\nnpm test              # run tests\nnpm run build         # compile TypeScript\nnpm run dev           # dev mode with hot reload\n```\n\nArchitecture, tech stack, and the full tool contract live in [docs/](./docs/README.md). Contributions are welcome — see [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n## Links\n\n- [Yuque API docs](https://www.yuque.com/yuque/developer/api)\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [Yuque AI Ecosystem](https://yuque.github.io/yuque-ecosystem/) — skills and plugins built on top of this server\n\n## License\n\n[MIT](./LICENSE)\n\n[ci-image]: https://img.shields.io/github/actions/workflow/status/yuque/yuque-mcp-server/ci.yml?style=flat-square&label=CI\n[ci-url]: https://github.com/yuque/yuque-mcp-server/actions/workflows/ci.yml\n[npm-image]: https://img.shields.io/npm/v/yuque-mcp?style=flat-square\n[npm-url]: https://www.npmjs.com/package/yuque-mcp\n[download-image]: https://img.shields.io/npm/dm/yuque-mcp?style=flat-square\n[download-url]: https://www.npmjs.com/package/yuque-mcp\n[license-image]: https://img.shields.io/github/license/yuque/yuque-mcp-server?style=flat-square\n[license-url]: ./LICENSE\n",
  "bytes": 8635,
  "sha": "3165b05a5463a2481441ae2511ec20bbbee0098a21f9d0d44b287a99fa184141",
  "repo_slug": "yuque/yuque-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_yuque_yuque_mcp_b45becf4/readme"
}