YApi
Interact with the YApi platform using natural language for automated interface management.
mcp-server-yapi
mcp-server-yapi 是一个为 YApi 设计的 MCP 服务器。它将 YApi 的常用功能封装为一系列工具,允许大语言模型(LLM)通过自然语言与你的 YApi 平台进行交互,实现接口管理自动化。
✨ 核心功能
通过本服务,你可以用自然语言完成以下操作:
- 项目管理: 获取项目基本信息。
- 接口管理: 创建、保存、更新、获取接口信息。
- 接口分类: 创建分类、获取分类菜单。
- 数据导入: 导入接口数据。
- 接口列表: 获取项目或分类下的接口列表。
⚙️ 客户端配置
安装要求
- Node.js >= v18.0.0
- Cursor, Windsurf, Claude Desktop 或者其它支持 MCP 协议的客户端
配置示例
YAPI 的项目 TOKEN:在"项目->设置->token 配置"中
{
"mcpServers": {
"mcp-server-yapi": {
"command": "npx",
"args": ["-y", "mcp-server-yapi"],
"env": {
"YAPI_BASE_URL": "YAPI服务地址,例:https://xxx.yyy.com",
"YAPI_TOKEN": "项目TOKEN",
"MCP_DEBUG_CONSOLE": "false"
}
}
}
}
🔧 本地开发调试
请确保你的开发环境中已安装 Node.js (版本 >=18)。
- 克隆并编译
# 克隆仓库
git clone https://github.com/kales0202/mcp-server-yapi.git
# 进入项目目录
cd mcp-server-yapi
# 安装依赖
npm install
# 编译生成dist/index.js
npm run build
- 与 AI Agent 结合
你可以将此服务集成到支持 MCP 协议的 AI Agent 客户端中,将以下配置添加到你的客户端配置文件中
YAPI 的项目 TOKEN:在"项目->设置->toekn 配置"中
{
"mcpServers": {
"mcp-server-yapi": {
"command": "node",
"args": ["/absolute/path/to/your/mcp-server-yapi/dist/index.js"],
"env": {
"YAPI_BASE_URL": "YAPI服务地址",
"YAPI_TOKEN": "项目TOKEN",
"MCP_DEBUG_CONSOLE": "false"
}
}
}
}
🛠️ 可用工具列表
get_project: 获取项目基本信息add_cat: 新增接口分类get_cat_menu: 获取菜单列表list_cat: 获取某个分类下接口列表list_menu: 获取接口菜单列表get_interface: 获取接口数据list_interface: 获取接口列表数据save_interface: 新增或者更新接口add_interface: 新增接口up_interface: 更新接口import_data: 服务端数据导入
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Stackzero Labs MCP
A server for generating Stackzero Labs UI components.
Cygnus MCP Server
A simple MCP server exposing Cygnus tools for demonstration, including 'cygnus_alpha' and 'invoke-service'.
Claude Code MCP
Orchestrates multiple Claude Code agents across iTerm2 sessions, providing centralized management and inter-agent communication.
CryptoAnalysisMCP
Provides comprehensive cryptocurrency technical analysis, including real-time price data, technical indicators, chart pattern detection, and trading signals for over 2,500 cryptocurrencies.
s&box MCP Server
Enables AI assistants to interact with s&box game objects and components via WebSocket communication.
VS Code Settings MCP Server
Programmatically manage Visual Studio Code settings using AI assistants and automated tools.
Azure DevOps
Interact with Azure DevOps Work Items using the Azure DevOps REST API.
Roblox Studio MCP Server
An AI-powered MCP server for Roblox Studio development, featuring advanced NLP, semantic analysis, and multi-turn conversation capabilities.
Sandbox MCP Server
Provides isolated Docker environments for secure code execution.
Autodocument
Automatically generates documentation for code repositories by analyzing directory structures and code files using the OpenRouter API.