YAPI MCP PRO

YAPI MCP PRO acts as a smart bridge between the YApi interface management platform and AI-powered coding tools like Cursor or Claude. In the simplest terms, it gives an AI assistant the ability to "read" and "understand" a team's API documentation directly. Instead of a developer manually switching between a browser and their code editor to look up endpoint URLs or data structures, they can simply ask the AI to find the right interface for them. As developers move into more complex tasks, this tool becomes an essential part of the workflow by providing the AI with full context of the project’s backend architecture. It enables the AI to search through various projects, list available interfaces, and retrieve detailed user information. This deep integration allows the LLM to write more accurate code, generate precise mock data, and even help manage the entire lifecycle of an API without the developer ever leaving their development environment. On a technical level, the server is built on Node.js and utilizes the Model Context Protocol’s standard input/output (stdio) interface for seamless communication with AI editors. It simplifies authentication by using existing browser cookies, allowing for quick setup through environment variables like the YApi base URL and security tokens. By exposing these capabilities to an LLM, the tool effectively transforms static API documentation into a dynamic, searchable, and actionable resource that the AI can use to automate repetitive integration tasks.

Category: CRM, ERP & E-commerce

Tags: api-documentation, backend, interface-management, node-js, yapi

Visit YAPI MCP PRO

How to install and configure YAPI MCP PRO

1. Installation This MCP server is designed to be run via npx, meaning no permanent local installation is required, and it stays updated automatically. Requirements: * Node.js: version 16.0.0 or higher (18.0.0+ recommended). * npm: version 7.0.0 or higher. Verification Command: To ensure your environment is ready, run: bash npx yapi-mcp-pro --version Note: If you encounter connection issues, clear your npm cache first: bash npm cache clean --force ---

2. Configuration To configure the server, you need two pieces of information from your YApi instance: 1. YAPI_BASE_URL: Your YApi server address (e.g., http://your-yapi-server.com). 2. YAPI_TOKEN: Your browser cookie string (must include _yapi_token and _yapi_uid).

Cursor Configuration (Recommended) You can configure this at the project level or globally. Project-level (.cursor/mcp.json): Create a file at .cursor/mcp.json in your project root and add: json { "mcpServers": { "yapi-mcp-pro": { "command": "npx", "args": ["-y", "yapi-mcp-pro"], "env": { "YAPI_BASE_URL": "http://your-yapi-server.com", "YAPI_TOKEN": "_yapi_token=YOUR_TOKEN_HERE; _yapi_uid=YOUR_UID_HERE", "NODE_ENV": "cli" } } } } Global Configuration: Add the same JSON block to your Cursor settings.json located at: * macOS: ~/Library/Application Support/Cursor/User/settings.json * Windows: %APPDATA%\Cursor\User\settings.json * Linux: ~/.config/Cursor/User/settings.json ---

3. Available Tools The YAPI MCP PRO server provides tools for the full lifecycle management of YApi interfaces, including: * User Management: Retrieve current YApi user information. * Project Management: List all available projects within the YApi platform. * Interface Operations: Search for specific API interfaces and manage their details. ---

4. Example Prompts Once configured in your AI editor (like Cursor or Claude Desktop), you can use the following prompts: * "请获取我的YApi用户信息" (Please get my YApi user information) * "请列出所有YApi项目" (Please list all YApi projects) * "请搜索用户相关的接口" (Please search for user-related interfaces)

What you can do with YAPI MCP PRO

Use Case 1: Instant API Reference During Implementation Problem: Developers frequently lose focus when they have to switch back and forth between their code editor and a web browser to check YApi for request parameters, headers, or response structures. Solution: With YAPI MCP PRO, developers can stay within Cursor or Claude and ask the AI to "Find the details for the user registration API." The MCP fetches the exact schema, including required fields and data types, directly into the chat context. Example: A developer is writing a fetch call and asks the AI: "Look up the `

api/v1/login` interface in the 'Auth' project and tell me what fields are required in the POST body." The AI retrieves the info and provides the exact JSON structure.

Use Case 2: Automated TypeScript Interface Generation Problem: Manually transcribing YApi response schemas into TypeScript interfaces or DTOs is time-consuming and prone to human error, especially for complex, nested objects. Solution: The AI can use the MCP to read the full API definition from YApi and then automatically generate matching TypeScript interfaces or classes that perfectly align with the backend documentation. Example: The user prompts: "Fetch the schema for the 'Get Order Details' interface from YApi and generate a TypeScript interface named IOrderDetail based on its response structure."

Use Case 3: API Consistency Auditing Problem: Over time, the actual code implementation can drift away from the documentation in YApi, leading to integration bugs that are hard to track down. Solution: Developers can ask the AI to compare the current local code (e.g., a controller or a service file) against the official definition stored in YApi to identify discrepancies in parameter names or data types. Example: A developer highlights a function and asks: "Compare this local updateUser function with the YApi definition for the same endpoint. Are there any missing parameters or type mismatches?"

Use Case 4: Accelerating Project Onboarding Problem: New developers joining a project often struggle to understand the API landscape and find where specific functionalities are documented within a massive YApi platform. Solution: The MCP allows the AI to act as a "project librarian." A new dev can use natural language to search through projects and categories to understand the system architecture without manual searching. Example: A new team member asks: "List all YApi projects I have access to, and then search for any interfaces related to 'Payment Processing' so…

Key facts

  • CRM, ERP & E-commerce, Developer Tools & Code Intelligence
  • api-documentation, backend, interface-management, node-js, yapi

Part of MCP Servers

Related MCP servers

  • MCP LaTeX Server — Create, edit, and manage LaTeX files. Requires an external LaTeX distribution like MiKTeX, TeX Live, or MacTeX.
  • MCP JSON — A collection of servers for file system operations, Google search, web automation, and executing terminal commands.
  • MCP Jupyter Complete — A server for Jupyter notebook manipulation with position-based operations and VS Code integration.
  • MCP LSP Go — An MCP server that connects AI assistants to Go's Language Server Protocol (LSP) for advanced code analysis.
  • MCP Manager — A full-stack application for managing Model Context Protocol (MCP) servers for Claude Desktop with a modern web interface.
  • MCP Lab — A development environment for building and testing custom MCP servers with AI and VS Code integration.
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories