mcp-yapi-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., "@mcp-yapi-servershow me the details for https://yapi.example.com/project/100/interface/api/12345"
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.
mcp-yapi-server
基于 Model Context Protocol (MCP) 的 YApi 集成服务器,在 Cursor 等支持 MCP 的编辑器中直接查询 YApi API 文档。
✨ 功能特性
🔗 直接粘贴 URL - 最简单!粘贴 YApi 链接即可查询
🔍 查询接口详情 - 完整的请求/响应参数
📋 列出接口 - 查看项目所有接口
🔎 搜索接口 - 按关键词搜索
🤖 AI 辅助 - 自动生成代码、类型定义等
Related MCP server: YApi MCP Server
📦 安装
npm install -g mcp-yapi-server或作为项目依赖:
npm install mcp-yapi-server🚀 快速开始
1. 安装
npm install -g mcp-yapi-server2. 配置 Cursor
在 Cursor 设置中添加 MCP 服务器配置:
推荐方式 - 本地安装:
# 在项目目录中安装
npm install mcp-yapi-server{
"mcpServers": {
"yapi": {
"command": "node",
"args": ["./node_modules/mcp-yapi-server/dist/index.js"],
"env": {
"YAPI_BASE_URL": "https://yapi.example.com",
"YAPI_TOKEN": "your_token_here"
}
}
}
}或全局安装:
npm install -g mcp-yapi-server{
"mcpServers": {
"yapi": {
"command": "mcp-yapi-server",
"env": {
"YAPI_BASE_URL": "https://yapi.example.com",
"YAPI_TOKEN": "your_token_here"
}
}
}
}⚠️ 注意: 不推荐使用
npx方式,因为依赖可能无法正确解析。请使用本地安装或全局安装。
3. 重启 Cursor
4. 开始使用
在 Cursor 中直接粘贴 YApi 链接:
https://yapi.example.com/project/100/interface/api/12345📚 文档
🔧 常见问题
"No server info found"
原因: Node.js 版本 < 18
解决: nvm install 18 && nvm use 18
"请登录..."
原因: 需要配置 Token
解决: 在 Cursor 配置中设置 YAPI_TOKEN
详见 故障排除文档
🛠 开发
# 克隆项目
git clone https://github.com/TStoneLee/mcp-yapi-server.git
cd mcp-yapi-server
# 安装依赖
npm install
# 开发模式
npm run dev
# 构建
npm run build📄 许可证
MIT License
🔗 相关链接
Available Tools
5 toolsyapi_get_interfaceC
获取YApi接口的详细信息,包括请求参数、响应参数、请求示例等
Inputs: interface_id (required), token.
yapi_get_interface_by_urlB
通过YApi接口URL获取详细信息。支持直接粘贴YApi链接,如: https://yapi.example.com/project/100/interface/api/12345
Inputs: url (required), token.
yapi_get_projectC
获取YApi项目的基本信息,包括项目名称、描述、成员等
Inputs: project_id (required), token.
yapi_list_interfacesC
获取YApi项目或分类下的接口列表
Inputs: project_id (required), cat_id, token.
yapi_search_interfaceB
在YApi项目中搜索接口,支持按接口名称、路径搜索
Inputs: project_id (required), keyword (required), token.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
TDQS
Scored across 5 tools
The tools are mostly distinct with clear purposes: get_interface, get_interface_by_url, get_project, list_interfaces, and search_interface. However, yapi_get_interface and yapi_get_interface_by_url could cause some confusion as both retrieve interface details, though the latter specifies a URL-based method. The descriptions help differentiate them, but there is minor overlap in functionality.
All tool names follow a consistent yapi_verb_noun pattern using snake_case, such as yapi_get_interface, yapi_list_interfaces, and yapi_search_interface. This predictability makes it easy for agents to understand and use the tools without confusion about naming conventions.
With 5 tools, this server is well-scoped for interacting with YApi, covering key operations like retrieving, listing, and searching interfaces and projects. The count is appropriate, avoiding bloat while providing essential functionality for the domain.
The tool set covers core read operations for YApi, including getting, listing, and searching interfaces and projects. However, there are minor gaps, such as no tools for creating, updating, or deleting interfaces or projects, which might limit full lifecycle management. Agents can still perform basic queries effectively.
Related MCP Connectors
MCP-native collaborative markdown editor with real-time AI document editing
Ask your own documents and get answers that cite the source passage. Workspace knowledge bases over MCP for Cursor, Claude and any MCP client.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
The OpenRouter MCP server plugs OpenRouter into the AI tools you already use. Once connected, your assistant can pull live OpenRouter data (models, prices, your credits, rankings, and docs) and send quick test messages, all without leaving your editor.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables reading and searching API documentation from YApi instances, allowing AI models to access interface definitions, project API lists, and search through API endpoints using YApi URLs or project IDs.5 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with YApi API management platform through natural language, allowing automated interface management including creating/updating APIs, managing categories, importing data, and retrieving project information.26 npm9GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables direct interaction with YApi API management platforms from AI editors like Cursor and Claude Desktop, providing complete interface lifecycle management including browsing, creating, updating, and deleting API documentation.12 npm21MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for the YApi platform that allows AI assistants to search, create, and manage API documentation directly within tools like Cursor. It supports multi-project management and seamless integration into AI-driven programming workflows for interface maintenance.169 npm124MIT