Yapi Mcp Server
@tiandashu
关于 Yapi Mcp Server
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"yapi-mcp-server": {
"command": "npx",
"args": [
"-y",
"@vtian/yapi-mcp-server",
"--stdio"
]
}
}
}工具
5概览
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
FAQ from Yapi Mcp Server
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.
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.
How long is YApi data cached?
YApi data is cached for 30 minutes to reduce network requests.
What transport protocol does the server use?
The server uses stdio transport, as shown in the example Cursor configuration with --stdio.
What tools are available in the server?
Five tools: read_config, get_yapi_data, generate_types, generate_mock_from_yapi, and generate_api_code.
其他 分类下的更多 MCP 服务器
Servers
modelcontextprotocolModel Context Protocol Servers
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.

EverArt
modelcontextprotocolModel Context Protocol Servers
Codelf
unbugA search tool helps dev to solve the naming things problem.
Inbox Zero AI MCP
elie222The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
评论