Yapi

The Yapi MCP server acts as a bridge between AI assistants and the Yapi API management platform, making it easy to interact with API documentation through natural language. Instead of manually clicking through a web interface to find endpoints or study schemas, a developer can simply ask an AI to find a specific service or list project details. It effectively gives an LLM direct access to a team's internal API registry, streamlining the development process by bringing documentation directly into the coding environment. Beyond simple lookups, this tool provides a robust set of functions for deep exploration of API architecture. It includes specific tools for listing projects, browsing interface categories, and retrieving granular details about specific endpoints, such as request parameters and response formats. The server also features built-in cache management—including manual refresh and statistics tracking—to ensure that the AI is always working with the most up-to-date documentation without unnecessary latency or backend load. Designed for flexible deployment, the server can be hosted via Java or Docker and integrates seamlessly with MCP-compatible clients like Cursor. By configuring project-specific tokens, developers can secure and customize access to multiple Yapi projects simultaneously. This setup empowers AI agents to not only answer questions about existing APIs but also assist in complex integration tasks by referencing real-time interface definitions, significantly reducing the cognitive load for developers working in service-heavy environments.

Category: CRM, ERP & E-commerce

Tags: api-management, api-registry, documentation, integration, yapi

Visit Yapi

How to install and configure Yapi

1. Installation You can run the Yapi MCP server using either Java or Docker. Method 1: Run with Java 1. Ensure you have JDK 21+ and Maven 3.6+ installed. 2. Clone the repository: bash git clone https://github.com/yyykf/yapi-mcp-server.git cd yapi-mcp-server 3. Build the project: bash mvn clean package 4. Run the application: bash java -jar target/yapi-mcp-server-0.0.1-SNAPSHOT.jar Method 2: Run with Docker 1. Ensure you have Docker and Docker Compose installed. 2. Clone the repository: bash git clone https://github.com/yyykf/yapi-mcp-server.git cd yapi-mcp-server 3. Start the server: bash docker-compose up -d ---

2. Configuration

Server Configuration Before running the application, you must configure your Yapi connection and project tokens in src/main/resources/application-mcp.yml: yaml spring: cloud: openfeign: client: config: yapiClient: url: http://yapi.com # Replace with your Yapi URL yapi: project-tokens: 123456: "your-project-token-1" # Project ID: Token 789012: "your-project-token-2" # Add more projects as needed

MCP Client Configuration (Cursor) To integrate with Cursor, add the following to your mcp.json configuration file: json { "mcpServers": { "yapi": { "url": "http://127.0.0.1:8888/sse" } } } ---

3. Available Tools | Tool | Description | | --- | --- | | listProjects | List all configured Yapi projects with their IDs and names | | listCategories | Get interface categories for a specific Yapi project (Requires projectId) | | listCatInterfaces | List interfaces within a specific category (Requires catId) | | searchInterfaces | Search API interfaces by project name, keyword, or path | | getInterfaceDetail | Get detailed information about a specific API interface (Requires interfaceId) | | refreshCache | Manually refresh the Yapi cache | | clearProjectCache | Clear cache for a specific project (Requires projectId) | | getCacheStats | Get cache statistics information | ---

4. Example Prompts Once configured, you can use natural language prompts such as: * "Show me all available projects" * "List all API categories in project 123456" * "Search for login APIs" * "Get details of interface ID 789" * "What's the cache status?"

What you can do with Yapi

Use Case 1: Streamlined Frontend-to-Backend Integration Problem: Frontend developers often spend significant time switching between their code editor and the Yapi web interface to copy API paths, request headers, and payload schemas. This context switching breaks flow and leads to manual typing errors. Solution: With this MCP, a developer can use an AI assistant (like Cursor) to fetch the exact API definition directly into their workspace. The AI can then use the getInterfaceDetail tool to generate type-safe interfaces (TypeScript) or API service functions based on the real-time documentation in Yapi. Example: "Look up the 'Create Order' API in Yapi and generate a TypeScript interface for the request body and a Zod schema for the response."

Use Case 2: Zero-Context API Discovery for Large Projects Problem: In large organizations with hundreds of microservices, developers often don't know if an API already exists for a specific task. They might spend hours searching through internal docs or end up reinventing an endpoint that a teammate already built. Solution: Developers can use the searchInterfaces tool through natural language to query their entire Yapi instance. The AI can search by keywords, paths, or project names to find existing functionality across the whole company. Example: "Search all Yapi projects for any existing interfaces related to 'user password reset' or 'email verification' so I don't duplicate work."

Use Case 3: Automated API Contract Verification and Bug Fixing Problem: When an API integration fails, the developer must determine if the frontend is sending the wrong data or if the backend documentation has changed. Manually comparing the code against the Yapi UI is tedious. Solution: The developer can provide the failing code snippet to their AI assistant. The AI uses getInterfaceDetail to fetch the source of truth from Yapi and performs an immediate "diff" between the implementation and the documentation to identify mismatches in field names or data types. Example: "The login request is returning a 400 error. Check the current code against the Yapi definition for the `

auth/login` interface and tell me if I'm missing any required parameters."

Use Case 4: Rapid Mock Data Generation for Testing Problem: Writing unit tests requires realistic mock data that follows the API contract. Creating this data manually is time-consuming, and hardcoded mocks often become outdated as the API evolves in Yapi. Solution: The AI assistant can use the Yapi MCP to pull the latest response schema and…

Key facts

  • Open Source
  • CRM, ERP & E-commerce, Developer Tools & Code Intelligence
  • api-management, api-registry, documentation, integration, 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