YAPI MCP Server

The YAPI MCP Server acts as a bridge between AI assistants and the YAPI platform, a popular tool for managing and documenting API interfaces. In simple terms, it gives an AI the ability to "read" and understand the specific rules of a company's internal web services. Instead of a developer having to manually copy and paste endpoint details or JSON schemas into a chat window, this tool allows the AI to look up that information directly, making it much easier to discuss, build, or troubleshoot specific interfaces. Technically, the server is built on Node.js and connects to a YAPI instance using environment variables like project IDs and security tokens. It utilizes the Model Context Protocol’s Server-Sent Events (SSE) transport to communicate with AI clients, such as Claude Desktop. Once configured, it provides the AI with structured access to interface details, including request parameters, response formats, and project-wide documentation, all fetched directly from the YAPI source of truth. For developers integrating LLMs into their workflow, this MCP server is a powerful asset because it grounds the AI in actual, real-world data rather than general patterns. By giving the AI direct access to private API specifications, it significantly reduces the likelihood of "hallucinations" when generating client-side code or mapping out data transformations. This creates a more seamless experience where the AI functions as a context-aware teammate that understands the precise technical requirements of a team's backend services.

Category: CRM, ERP & E-commerce

Tags: api-documentation, backend, interface-design, json-schema, yapi

Visit YAPI MCP Server

How to install and configure YAPI MCP Server

1. Installation To install the YAPI MCP Server, follow these steps: 1. Clone the repository: bash git clone https://github.com/devilMing/yapi-mcp-server 2. Install dependencies: bash npm install 3. Environment Setup: Create a .env file in the root directory and configure your YAPI credentials: env YAPI_BASE_URL=http://your-yapi-instance.com YAPI_TOKEN=your-token-here YAPI_PROJECT_ID=your-project-id 4. Start the server: bash npm start

2. Configuration To use this server with Claude Desktop or other MCP clients, add the following to your configuration file (e.g., claude_desktop_config.json): json { "mcpServers": { "yapi": { "type": "SSE", "url": "http://localhost:${your .env PORT}/sse" } } }

3. Available Tools Based on the documentation provided, the server provides access to: * YAPI interface details: Accessing and retrieving specific details regarding YAPI project interfaces. (Specific command names and parameters were not listed in the source content provided.)

4. Example Prompts No specific example prompts were provided in the source documentation. Generally, users would ask the AI to "fetch interface details from YAPI" or "lookup API documentation in the configured YAPI project."

What you can do with YAPI MCP Server

Use Case 1: Automated API Client Generation Problem: Developers often spend significant time manually writing boilerplate code (like fetch requests, TypeScript interfaces, or Axios instances) by copying and pasting field names and data types from YAPI documentation into their IDEs. This process is repetitive and prone to typos. Solution: With the YAPI MCP Server, an AI assistant can directly access the interface definitions (parameters, request bodies, and response schemas). It can then generate perfectly typed code in seconds without the developer ever leaving the chat interface. Example: A developer asks: "Based on the get_user_profile endpoint in YAPI, generate a TypeScript interface for the response and a React Hook to fetch the data." The AI retrieves the schema via the MCP and generates the precise interface and useEffect logic.

Use Case 2: Debugging Request-Response Mismatches Problem: When a frontend developer receives a "400 Bad Request" or "Validation Failed" error from the backend, they usually have to open YAPI in a browser, find the endpoint, and manually compare their code's payload against the documented requirements to find the missing or mistyped field. Solution: The AI can act as an instant auditor. By looking at the developer's current code and fetching the "source of truth" from YAPI via the MCP, it can pinpoint exactly which required field is missing or which data type is incorrect. Example: A developer shares a snippet of a failing API call. The AI checks YAPI, notices that the user_id field has been changed from a number to a string in the latest documentation, and alerts the developer to update their code.

Use Case 3: Generating Mock Data and Test Suites Problem: QA engineers and frontend developers need realistic mock data and test cases that follow the API's constraints (e.g., specific string patterns, enum values, or mandatory fields) defined in YAPI. Creating these manually for complex objects is time-consuming. Solution: The AI can pull the full interface detail from YAPI, including field descriptions and validation rules, to generate comprehensive Jest tests, Vitest mocks, or even Playwright integration tests. Example: A user asks: "Generate three different JSON mock objects for the create_order endpoint in YAPI: one successful case, one with a missing required field, and one with an invalid 'status' enum value." The AI fetches the spec and generates the exact JSON payloads needed for testing.

Use Case 4: Rapid Onboarding and API Discovery Problem: When…

Key facts

  • Open Source
  • https://github.com/devilMing/yapi-mcp-server
  • CRM, ERP & E-commerce, Developer Tools & Code Intelligence
  • api-documentation, backend, interface-design, json-schema, 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…

What is YAPI MCP Server?

YAPI MCP Server is an open-source tool that implements the Model Context Protocol to bridge AI assistants with YAPI interface management platforms. It allows language models to read documented API endpoints, parameter requirements, and response schemas directly, making it easier to generate accurate code and inspect backend service rules.

How do I install YAPI MCP Server?

Clone the official GitHub repository and run npm install to install dependencies. Next, create a dot-env file in the root directory containing your YAPI_BASE_URL, YAPI_TOKEN, and YAPI_PROJECT_ID. Launch the server using npm start, and configure your MCP client to connect via its Server-Sent Events endpoint URL.

Which MCP clients work with YAPI MCP Server?

YAPI MCP Server exposes a Server-Sent Events endpoint, allowing it to connect with any client that supports SSE transport under the Model Context Protocol specification. The primary supported client is Claude Desktop, configured through its standard JSON configuration file with the local SSE URL.

Is YAPI MCP Server open source?

Yes, YAPI MCP Server is an open-source project hosted on GitHub. Developers can inspect the source code, self-host the server locally or on private infrastructure, and customize the communication parameters to fit their specific internal development environments and YAPI setups.

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