YAPI MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@YAPI MCP Server Show me the details of project 123"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
YAPI MCP Server
A Model Context Protocol (MCP) server for YAPI API Platform integration. Enable AI assistants to interact with YAPI seamlessly.
🚀 Quick Start
Recommended: Use with npx (No installation required)
Get your YAPI Token: Login to your YAPI platform and get the token from project settings
Configure Claude Desktop: Add the following to your MCP settings file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"yapi": {
"command": "npx",
"args": [
"-y",
"@criller/yapi-mcp-server",
"--yapi-base-url=http://your-yapi-server.com",
"--yapi-token=your-token-here"
]
}
}
}Start using: Restart Claude Desktop and you're ready to go!
Related MCP server: Mcp-Swagger-Server
✨ Features
This MCP server provides 11 tools covering all YAPI Open APIs:
Project Management (1 tool)
yapi_get_project- Get project information
Category Management (2 tools)
yapi_add_category- Add interface categoryyapi_get_category_menu- Get category menu list
Interface Management (7 tools)
yapi_get_interface- Get interface detailsyapi_list_interfaces_by_cat- List interfaces by categoryyapi_add_interface- Add new interfaceyapi_update_interface- Update interfaceyapi_get_interface_list- Get interface listyapi_update_interface_basic- Update interface basic infoyapi_get_interface_cat_list- Get interface menu tree
Data Import (1 tool)
yapi_import_data- Import data (Swagger, HAR, Postman, etc.)
📖 Usage Examples
Once configured, you can interact with YAPI using natural language:
"Show me the details of project 123"
"List all categories in project 456"
"Get the interface with ID 789"
"Add a new category called 'User Management' to project 123"
"Import this Swagger file to project 456"
🔧 Alternative Configuration Methods
Method 1: Using Environment Variables
{
"mcpServers": {
"yapi": {
"command": "npx",
"args": ["-y", "@criller/yapi-mcp-server"],
"env": {
"YAPI_BASE_URL": "http://your-yapi-server.com",
"YAPI_TOKEN": "your-token-here"
}
}
}
}Method 2: Local Development
For development or debugging:
git clone https://github.com/criller/yapi-mcp-server.git
cd yapi-mcp-server
npm install
cp .env.example .env
# Edit .env and set your YAPI_BASE_URL and YAPI_TOKEN
npm run devThen configure Claude Desktop:
{
"mcpServers": {
"yapi": {
"command": "node",
"args": ["/absolute/path/to/yapi-mcp-server/dist/index.js"],
"env": {
"YAPI_BASE_URL": "http://your-yapi-server.com",
"YAPI_TOKEN": "your-token"
}
}
}
}🛠️ Development
Type Check
npm run typecheckBuild
npm run buildTesting with MCP Inspector
npx @modelcontextprotocol/inspector npx -y @criller/yapi-mcp-server📁 Project Structure
yapi-mcp-server/
├── src/
│ ├── index.ts # MCP Server entry point
│ ├── config.ts # Configuration management
│ ├── types.ts # TypeScript types
│ ├── yapi-client.ts # YAPI API client
│ └── tools/ # MCP tools
│ ├── project-tools.ts # Project management
│ ├── category-tools.ts # Category management
│ ├── interface-tools.ts# Interface management
│ └── import-tools.ts # Data import
├── package.json
├── tsconfig.json
└── README.md🤝 Contributing
Contributions are welcome! Please check CONTRIBUTING.md for details.
📄 License
MIT
Available Tools
11 toolsyapi_add_categoryC
在 YAPI 项目中新增接口分类
Inputs: name (required), project_id (required), desc.
yapi_add_interfaceC
在 YAPI 中新增一个接口定义
Inputs: path (required), catid (required), title (required), method (required), +9 more.
yapi_get_interfaceB
获取 YAPI 接口的详细信息,包括请求参数、响应数据等完整定义
Inputs: interface_id (required).
yapi_get_interface_cat_listC
获取项目的完整接口菜单树(包含所有分类和接口)
Inputs: project_id (required).
yapi_get_interface_listC
根据条件获取接口列表,可按项目或分类筛选
Inputs: page, catid, limit, project_id.
yapi_get_projectB
获取 YAPI 项目的基本信息,包括项目名称、描述、成员、环境配置等
Inputs: project_id (required).
yapi_import_dataB
服务端数据导入,支持导入 Swagger、HAR、Postman 等格式的接口数据到 YAPI 项目
Inputs: json (required), type (required), project_id (required), merge.
yapi_list_interfaces_by_catB
获取某个分类下的所有接口列表,支持分页
Inputs: catid (required), page, limit.
yapi_update_interfaceC
更新 YAPI 接口的完整定义(智能判断新增或更新)
Inputs: id (required), path (required), catid (required), title (required), +3 more.
yapi_update_interface_basicB
更新 YAPI 接口的基本信息(仅更新指定字段)
Inputs: id (required), desc, path, catid, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Several tools have overlapping purposes: yapi_get_category_menu, yapi_get_interface_cat_list, and yapi_get_interface_list all retrieve interface lists or menus, causing potential confusion. The update tools are also similar, though descriptions clarify the distinction between basic and full updates.
All tool names follow a consistent yapi_verb_noun pattern (e.g., yapi_get_category_menu, yapi_update_interface_basic, yapi_import_data), with clear and predictable naming.
With 11 tools, the set is well-scoped for managing YAPI projects, covering project info, categories, interfaces, and imports without excessive redundancy.
The tool surface lacks deletion operations for interfaces and categories, and there is no tool to retrieve a single category or menu item directly. While core CRUD is partially covered, notable gaps exist that could hinder full project management.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol (MCP) server implementation that enables AI assistants to interact with Anytype's API through natural language, allowing users to manage their knowledge base through conversation.2,277 npm538MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that converts OpenAPI/Swagger specifications to MCP format, enabling AI assistants to interact with REST APIs through standardized protocol.77TypeScriptMIT
- FlicenseBqualityDmaintenanceA Model Context Protocol server implementation that can be run directly or through Docker, enabling AI assistants to interact with external systems through the MCP standard.2-
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to make HTTP requests (GET, POST, PUT, DELETE) to external APIs through standardized MCP tools.42MIT