YApi

The mcp-server-yapi serves as a smart bridge that allows developers to manage their API documentation and project structures using simple, natural language. Instead of manually clicking through complex dashboards to create or update API endpoints, this tool enables an AI assistant to handle those tasks directly. It essentially transforms the YApi platform into an interactive workspace where organizing technical interfaces feels like having a conversation with a helpful colleague. For those looking for deeper control, the server provides a comprehensive suite of specialized tools that cover the entire API lifecycle. It includes specific functions for retrieving project details, organizing interface categories, and listing existing menus. Developers can use it to programmatically add new interfaces, update existing ones, or even import large batches of server data. By exposing these backend capabilities to a Model Context Protocol (MCP) client, it ensures that an AI agent has the precise tools needed to manipulate API data accurately and efficiently. Integrating this server into AI-powered development environments like Cursor, Windsurf, or Claude Desktop significantly streamlines the coding workflow. Because the AI can "read" the existing API definitions and "write" new ones in real-time, it reduces the friction of context-switching between a code editor and a documentation portal. This automation ensures that project documentation stays perfectly in sync with the actual development process, making it an essential utility for teams that want to leverage the full power of large language models for automated interface management.

Category: CRM, ERP & E-commerce

Tags: api-documentation, api-lifecycle, interface-management, yapi

Visit YApi

How to install and configure YApi

1. Installation Prerequisites: * Node.js >= v18.0.0 * An MCP-compatible client (e.g., Claude Desktop, Cursor, Windsurf) Direct Installation: No manual installation is required if using the npx configuration method shown in the configuration section. Local Development Installation: If you prefer to run the server from source: 1. Clone the repository: git clone https://github.com/kales0202/mcp-server-yapi.git 2. Navigate to the directory: cd mcp-server-yapi 3. Install dependencies: npm install 4. Build the project: npm run build ---

2. Configuration Add the following configuration to your MCP settings file (e.g., claude_desktop_config.json or Cursor's MCP settings). Option A: Using NPX (Recommended) json { "mcpServers": { "mcp-server-yapi": { "command": "npx", "args": ["-y", "mcp-server-yapi"], "env": { "YAPI_BASE_URL": "Your YApi service URL (e.g., https://xxx.yyy.com)", "YAPI_TOKEN": "Project TOKEN (Found in Project -> Settings -> Token configuration)", "MCP_DEBUG_CONSOLE": "false" } } } } Option B: Using Local Build json { "mcpServers": { "mcp-server-yapi": { "command": "node", "args": ["/absolute/path/to/your/mcp-server-yapi/dist/index.js"], "env": { "YAPI_BASE_URL": "Your YApi service URL", "YAPI_TOKEN": "Project TOKEN", "MCP_DEBUG_CONSOLE": "false" } } } } ---

3. Available Tools * get_project: Get basic project information. * add_cat: Add a new interface category. * get_cat_menu: Retrieve the category menu list. * list_cat: Get a list of interfaces within a specific category. * list_menu: Get the interface menu list. * get_interface: Get detailed data for a specific interface. * list_interface: Get list data for interfaces. * save_interface: Add or update an interface. * add_interface: Create a new interface. * up_interface: Update an existing interface. * import_data: Import server-side data. ---

4. Example Prompts You can use natural language to interact with your YApi platform via the LLM: * "Show me the basic information for this project." * "Create a new interface category named 'Authentication'." * "List all interfaces under the 'User Management' category." * "Get the details for the 'Get User Profile' API." * "Update the 'Login' interface with the following parameters..."

What you can do with YApi

Use Case 1: Automated API Documentation from Local Code Problem: Developers often finish writing backend code but delay updating the YApi documentation because manually filling out request parameters, headers, and response schemas in a web UI is tedious and error-prone. Solution: This MCP allows a developer to bridge the gap between their IDE (like Cursor or Windsurf) and YApi. The AI can analyze the local source code (e.g., a Controller file), extract the API logic, and use the save_interface or add_interface tool to automatically create or update the documentation in YApi. Example: "I've just finished the UserController.ts file. Please analyze the updateProfile method and update the corresponding interface in the 'User Management' category on YApi."

Use Case 2: Natural Language API Discovery and Integration Problem: Frontend developers working on large enterprise projects often struggle to find the exact endpoint they need among hundreds of listed APIs, requiring them to constantly switch between their code and the YApi browser tab. Solution: Using the list_interface and get_interface tools, a developer can search for functionality using natural language directly within their development environment. The AI can find the relevant endpoint and immediately provide the request

response structure. Example: "Find the API in YApi that handles user password resets. Once you find it, show me the required body parameters and generate a TypeScript interface for the response."

Use Case 3: Rapid Project Scaffolding and Categorization Problem: At the start of a new project or sprint, Lead Developers need to set up the API structure (categories and empty interface shells) to coordinate work between frontend and backend teams. Doing this manually for 20+ endpoints is time-consuming. Solution: The MCP can use add_cat and add_interface to bulk-create the project structure based on a simple requirements list or a technical design document. Example: "Based on this project brief, create three categories in YApi: 'Auth', 'Orders', and 'Inventory'. Then, add empty interface stubs for 'Login', 'Register', 'CreateOrder', and 'GetStock' under their respective categories."

Use Case 4: Bulk Data Migration and Syncing Problem: Teams often need to import external API definitions (like Swagger

OpenAPI JSON files) into YApi, or sync changes between different project environments, which usually involves manual file exports and imports. Solution: By using the import_data tool, the AI can facilitate the flow of data from external sources or raw JSON directly into the YApi project without the user navigating the "Settings" and "Import" menus.…

Key facts

  • https://github.com/YMFE/yapi
  • CRM, ERP & E-commerce, Developer Tools & Code Intelligence
  • api-documentation, api-lifecycle, interface-management, yapi

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — MCP LaTeX Server is an MCP server that provides tools for creating, editing, validating, and compiling LaTeX documents directly through…
  • MCP JSON — MCP JSON is an MCP server collection that bundles tools for file system operations, Google search, browser-based web automation, and…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP LSP Go — MCP LSP Go is an MCP server that connects AI assistants to the official Go Language Server Protocol implementation, gopls,…
  • MCP Manager — MCP Manager is an MCP server management tool that connects directly to your Claude Desktop environment, enabling users to discover,…
  • MCP Lab — MCP Lab is an MCP server development environment designed for building, testing, and debugging custom Model Context Protocol servers integrated…

How do I install YApi MCP server?

You can run the server directly using npx by adding it to your MCP client configuration file, such as Claude Desktop or Cursor. Set the command to npx with arguments -y mcp-server-yapi. Ensure you provide the required environment variables, including YAPI_BASE_URL and YAPI_TOKEN, alongside Node.js version 18 or newer installed on your machine.

What can YApi MCP server do?

The server allows AI assistants to manage your YApi platform documentation directly. It exposes tools to fetch project details, create and list interface categories, retrieve endpoint specifications, add new APIs, update existing definitions, and import server-side data, allowing developers to keep documentation synchronized with code without leaving the editor.

Which MCP clients work with YApi?

Any AI assistant or developer environment supporting the Model Context Protocol can connect to the server. Common examples include Claude Desktop, Cursor, and Windsurf. Once configured with your YApi server URL and project authentication token, the assistant gains access to all interface management tools.

Where do I find the YApi project token?

You can locate your project token directly within the YApi web interface. Navigate to your target project, open the Project tab, proceed to the Settings menu, and select Token configuration. Copy the generated token and assign it to the YAPI_TOKEN environment variable in your client configuration.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories