Basic information
About Yapi Mcp Server
# YApi MCP Server
Yapi Mcp Server is a MCP server in the Other category listed in the AddMCP.net directory, published by tiandashu. It exposes 5 tools, including read_config, get_yapi_data, generate_types, generate_mock_from_yapi and more. Supported transport: stdio. Runtime: node. License: MIT. The repository has 4 GitHub stars. Source code is hosted on github.com. Related topics: api-management, mcp, yapi.
Setup
{
"mcpServers": {
"yapi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@vtian/yapi-mcp-server",
"--stdio"
]
}
}
}
{
"mcpServers": {
"yapi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@vtian/yapi-mcp-server",
"--stdio"
]
}
}
}
{
"servers": {
"yapi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@vtian/yapi-mcp-server",
"--stdio"
]
}
}
}
Yapi Mcp Server — by tiandashu config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"yapi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@vtian/yapi-mcp-server",
"--stdio"
]
}
}
}
Yapi Mcp Server — by tiandashu tools
-
read_config
projectPath:string -
get_yapi_data
remoteUrl:string*, interfacePath:string, method:string, listAll:boolean, forceRefresh:boolean -
generate_types
resBodySchema:string*, dataKey:string, interfaceName:string, path:string, method:string, title:string -
generate_mock_from_yapi
resBodySchema:string*, dataKey:string, mockType:string, title:string, path:string, method:string -
generate_api_code
path:string*, method:string, title:string, reqParams:array, reqQuery:array, interfaceName:string, requestLib:string
Overview
What is Yapi Mcp Server?
Yapi Mcp Server is a Model Context Protocol (MCP) server that integrates with the YApi API management platform. It automatically generates TypeScript type definitions, mock data, and API request code for frontend developers.
How to use Yapi Mcp Server?
Install the server via npx -y @vtian/yapi-mcp-server --stdio in your MCP client (e.g., Cursor). Create a yapi.config.json file in your project root with the required remoteUrl and type fields. Then use the five provided tools — read_config, get_yapi_data, generate_types, generate_mock_from_yapi, and generate_api_code — through natural language prompts.
Key features of Yapi Mcp Server
- Reads YApi config file automatically
- Fetches YApi project data with 30‑minute cache
- Generates TypeScript interfaces from response schemas
- Creates realistic mock data matching API structures
- Produces Axios or Fetch API request code
- Works with any MCP‑compatible client
Use cases of Yapi Mcp Server
- List all interfaces in a YApi project
- Update YApi interface data when the API changes
- Generate mock data for a specific interface by ID or name
- Update TypeScript type definitions for a given interface
- Generate Axios or Fetch API call code for a specific endpoint
Frequently asked questions
1 How does this server differ from yapi-cli?
The recommended yapi-cli supports CLI, MCP, skill, multiple YApi projects and spaces, and uses yapiopenapi to reduce context size and token usage.
2 What configuration is required?
Create a yapi.config.json file with remoteUrl (YApi export URL) and type (“yapi”). Optional fields include dataKey, mockPath, typePath, and apiPath.
3 How long is YApi data cached?
YApi data is cached for 30 minutes to reduce network requests.
4 What transport protocol does the server use?
The server uses stdio transport, as shown in the example Cursor configuration with --stdio.
5 What tools are available in the server?
Five tools: read_config, get_yapi_data, generate_types, generate_mock_from_yapi, and generate_api_code.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In