Overview
What is YAPI MCP Server?
A Model Context Protocol (MCP) server that enables LLMs to retrieve API documentation details from YAPI projects. It connects to a running YAPI instance and provides tools for listing interface categories and getting detailed interface information.
How to use YAPI MCP Server?
Install via npx or Docker, set the YAPI_URL environment variable to your YAPI instance base URL, and configure the server in your MCP host (e.g., Claude Desktop). Use the yapi_list_interfaces tool with a project token to list interfaces, or yapi_get_interface_details with a project token and interface ID for full details.
Key features of YAPI MCP Server
- List interface categories and basic interfaces in a YAPI project.
- Get detailed interface info (request/response params, headers, schemas).
- Input project token securely per call or via environment variable.
- Returns structured JSON for easy LLM consumption.
- Uses standard MCP tool interface.
Use cases of YAPI MCP Server
- LLM automatically fetching API endpoint documentation from YAPI.
- Providing developers with on-demand interface details during code generation.
- Integrating YAPI docs into AI‑powered development assistants.
FAQ from YAPI MCP Server
What is YAPI?
YAPI is an API documentation management tool. This server interacts with a running YAPI instance.
How do I get a project token?
Find your YAPI project token in the project’s “Settings” → “Tokens” section.
What environment variables are required?
The YAPI_URL variable is required, set to the base URL of your YAPI instance. Optionally, YAPI_PROJECT_TOKEN can be used as a default (less secure, prefer passing via tool input).
What tools does the server provide?
It provides two tools: yapi_list_interfaces (lists categories and interfaces for a project) and yapi_get_interface_details (returns full details for a specific interface by ID).
How are credentials handled?
The project token is passed as an input argument to each tool. A default token can be set via the YAPI_PROJECT_TOKEN environment variable, but this is less secure because it would be shared across all calls.