SuperAPIAI Directory

Yuque-MCP-Server

github.com · AI office

Yuque integration: manage documents, work with knowledge bases, search content and access analytics data.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux · API

About this tool

Yuque-MCP-Server is a Model-Context-Protocol (MCP) server for integrating with the Yuque API. This implementation is inspired by Figma-Context-MCP and uses the Yuque Open API. It provides MCP tools for interacting with the Yuque knowledge base platform, allowing AI models to operate on and access documents, knowledge bases, search, and team statistics in Yuque, etc.

Main Capabilities

The server provides the following tools:

  • get_current_user: Get information about the currently authenticated user, including basic Yuque account information such as user ID, username, and avatar.
  • get_user_docs: Get the list of all knowledge base documents for the current user, including private and collaborative documents.
  • get_user_repos: Get the list of knowledge bases for a specified user. A knowledge base is a collection of documents organized in Yuque.
  • get_repo_docs: Get the list of all documents in a specific knowledge base, including information such as document titles and update times.
  • get_doc: Get the detailed content of a specific document in Yuque, including the body, modification history, and permission information.
  • create_doc: Create a new Yuque document in a specified knowledge base, supporting content in multiple formats (Markdown, HTML, Lake).
  • update_doc: Update an existing document in Yuque, allowing modification of the title, content, or permission settings.
  • delete_doc: Delete a specified document from a Yuque knowledge base. This operation is irreversible.
  • search: Search for documents or knowledge base content on the Yuque platform, supporting scope and author filtering.
  • get_group_statistics: Get summary statistics for a team, including member count, document count, read count, and interaction data, etc.
  • get_group_member_statistics: Get statistics for team members, including each member's edit count, read count, like count, etc.
  • get_group_book_statistics: Get statistics for team knowledge bases, including each knowledge base's document count, word count, read count, etc.
  • get_group_doc_statistics: Get statistics for team documents, including each document's word count, read count, comment count, etc.

This MCP server can be used with AI models that support Model-Context-Protocol, allowing them to interact with Yuque through the defined tools.

Installation and Usage

Install via Smithery

Smithery can be used to automatically install Yuque MCP Server into the Claude desktop client.

Environment Requirements

  • Node.js 18+ (recommended)

Local Installation Steps

  1. Clone the repository: git clone https://github.com/Henryhaoson/Yueque-MCP-Server.git cd Yueque-MCP-Server
  2. Install dependencies: npm install
  3. Create a .env file based on .env.example: cp .env.example .env
  4. (Optional) Add your Yuque API token in the .env file: YUQUE_API_TOKEN=your_yuque_api_token_here You can also choose to provide the token via a query parameter when connecting to the server, instead of setting it in the .env file.
  5. Then run it in HTTP or CLI mode.

Docker Deployment

This project provides Docker support, allowing the server to be containerized and deployed:

  • Build and start the container: docker-compose up -d
  • View logs: docker-compose logs -f
  • Stop the service: docker-compose down

You can also set configuration items via environment variables or in the .env file:

  • Build the Docker image: docker build -t yuque-mcp-server .
  • Run the container: docker run -d -p 3000:3000 --name yuque-mcp-server yuque-mcp-server
  • Use environment variables: docker run -d -p 3000:3000
    -e YUQUE_API_TOKEN=your_token_here
    -e YUQUE_API_BASE_URL=https://www.yuque.com/api/v2
    --name yuque-mcp-server yuque-mcp-server

Configuration Overrides

When connecting to an SSE endpoint, environment configuration can be overridden via query parameters, which take precedence over environment variables:

  • accessToken: overrides the Yuque API token set in the .env file
  • baseUrl: overrides the Yuque API base URL set in the .env file

This allows the service to be configured dynamically without modifying the .env file, and query parameters take precedence over environment variables. This is especially useful for multi-user environments or for testing different API endpoints. Each SSE connection can use a different configuration, enabling the same server instance to serve different users or environments simultaneously.

Extension Development

To add a new tool, modify the registerTools method in src/server.ts.

Feature Enhancement Notes

  • Team statistics: added the ability to retrieve statistics for teams, members, knowledge bases, and documents, making it easier to analyze and monitor the usage of team knowledge bases.
  • Enhanced document management: supports multiple document formats (Markdown, HTML, Lake); improved document visibility settings (private, public, public within the enterprise); search functionality supports more parameters and filter conditions.
  • Improved data types: updated interface definitions to keep them consistent with the Yuque OpenAPI specification.

Applicable Scenarios and Limitations

This server is suitable for scenarios where AI models are expected to interact with Yuque knowledge bases via the MCP protocol, including reading, creating, updating, deleting, and searching documents, as well as data statistics at the team and member levels. Usage requires a Node.js 18+ environment or a Docker environment, and a Yuque API token. Deleting documents is irreversible. More information regarding fees, pricing, platform limitations, or effectiveness is not currently available.

License

Copyright (c) 2025 Henryhaoson. Released under the MIT License.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools