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
  • https://github.com/yyykf/yapi-mcp-server
  • 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 — 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 the Yapi MCP server?

The Yapi MCP server is an open-source integration running on Java that exposes tools to connect AI assistants to the Yapi API management platform. It allows developers to browse project categories, fetch endpoint schemas, search paths, and manage cached API details through standard Model Context Protocol messages.

How do I install the Yapi MCP server?

You can clone the repository from GitHub, configure your Yapi URL and project tokens in the application-mcp.yml file, and run it using Maven and Java 21 or Docker Compose. After the server starts, connect it to your MCP client by pointing an SSE URL to http://127.0.0.1:8888/sse.

What tools are available in the Yapi MCP server?

The server provides tools including listProjects, listCategories, listCatInterfaces, searchInterfaces, and getInterfaceDetail. It also includes cache administration tools such as refreshCache, clearProjectCache, and getCacheStats to inspect and clear documentation caches without restarting the application.

Which MCP clients work with Yapi?

The Yapi MCP server operates over Server-Sent Events on port 8888 and works with any MCP-compliant client that supports SSE transport, such as Cursor. It can be registered directly inside your client's mcp.json settings file.

Is the Yapi MCP server open source?

Yes, the Yapi MCP server is open-source software licensed under the MIT License. The complete source code, build scripts, and Docker configuration files are hosted on GitHub.

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