loading…
Search for a command to run...
loading…
YApi Auto MCP Server - Model Context Protocol server for YApi integration, enables AI tools like Cursor to interact with YApi API documentation
YApi Auto MCP Server - Model Context Protocol server for YApi integration, enables AI tools like Cursor to interact with YApi API documentation
一个用于 YApi 的 Model Context Protocol (MCP) 服务器,让你能够在 Cursor 等 AI 编程工具中直接操作 YApi 接口文档。
Yapi Auto MCP Server 是一个基于 Model Context Protocol 的服务器,专为 YApi 接口管理平台设计。它允许你在 Cursor、Claude Desktop 等支持 MCP 的 AI 工具中直接:
通过 MCP 协议,AI 助手可以理解你的 YApi 接口结构,在编程过程中提供更准确的建议和代码生成。
{
"mcpServers": {
"yapi-auto-mcp": {
"command": "npx",
"args": [
"-y",
"yapi-auto-mcp",
"--stdio",
"--yapi-base-url=https://your-yapi-domain.com",
"--yapi-token=projectId:your_token_here"
]
}
}
}
无需本地安装,通过 npx 直接运行:
{
"mcpServers": {
"yapi-auto-mcp": {
"command": "npx",
"args": [
"-y",
"yapi-auto-mcp",
"--stdio",
"--yapi-base-url=https://yapi.example.com",
"--yapi-token=projectId:token1,projectId2:token2",
"--yapi-cache-ttl=10",
"--yapi-log-level=info"
]
}
}
}
在 MCP 配置中定义环境变量:
{
"mcpServers": {
"yapi-auto-mcp": {
"command": "npx",
"args": [
"-y",
"yapi-auto-mcp",
"--stdio"
],
"env": {
"YAPI_BASE_URL": "https://yapi.example.com",
"YAPI_TOKEN": "projectId:token1,projectId2:token2",
"YAPI_CACHE_TTL": "10",
"YAPI_LOG_LEVEL": "info"
}
}
}
}
适合需要修改代码或调试的场景:
git clone <repository-url>
cd yapi-mcp
pnpm install
.env 文件):# YApi 基础配置
YAPI_BASE_URL=https://your-yapi-domain.com
YAPI_TOKEN=projectId:your_token_here,projectId2:your_token2_here
# 服务器配置
PORT=3388
# 可选配置
YAPI_CACHE_TTL=10
YAPI_LOG_LEVEL=info
SSE 模式(HTTP 服务):
pnpm run dev
然后在 Cursor 中配置:
{
"mcpServers": {
"yapi-mcp": {
"url": "http://localhost:3388/sse"
}
}
}
Stdio 模式:
pnpm run build
node dist/cli.js --stdio

Token 格式说明:
projectId:tokenprojectId1:token1,projectId2:token2配置完成后,你可以在 Cursor 中这样使用:

常用操作示例:
搜索接口:
"帮我找一下用户登录相关的接口"
查看接口详情:
"显示用户注册接口的详细信息"
创建新接口:
"帮我创建一个获取用户列表的接口,路径是 /api/users,使用 GET 方法"
更新接口:
"更新用户登录接口,添加验证码参数"
| 参数 | 描述 | 示例 | 默认值 |
|---|---|---|---|
--yapi-base-url |
YApi 服务器基础 URL | --yapi-base-url=https://yapi.example.com |
- |
--yapi-token |
YApi 项目 Token(支持多项目) | --yapi-token=1026:token1,1027:token2 |
- |
--yapi-cache-ttl |
缓存时效(分钟) | --yapi-cache-ttl=10 |
10 |
--yapi-log-level |
日志级别 | --yapi-log-level=info |
info |
--port |
HTTP 服务端口(SSE 模式) | --port=3388 |
3388 |
--stdio |
启用 stdio 模式(MCP 必需) | --stdio |
- |
创建 .env 文件进行配置:
# 必需配置
YAPI_BASE_URL=https://your-yapi-domain.com
YAPI_TOKEN=projectId:your_token_here
# 可选配置
PORT=3388 # HTTP 服务端口
YAPI_CACHE_TTL=10 # 缓存时效(分钟)
YAPI_LOG_LEVEL=info # 日志级别:debug, info, warn, error, none
| 使用场景 | 推荐方式 | 优势 |
|---|---|---|
| 日常使用 | npx + 命令行参数 | 无需安装,配置简单 |
| 团队共享 | npx + 环境变量 | 配置统一,易于管理 |
| 开发调试 | 本地安装 + SSE 模式 | 便于调试和修改代码 |
| 企业部署 | 本地安装 + stdio 模式 | 性能更好,更稳定 |
Run in your terminal:
claude mcp add yapi-auto-mcp --env YAPI_BASE_URL="" --env YAPI_CACHE_TTL="" --env YAPI_LOG_LEVEL="" --env YAPI_TOKEN="" -- npx -y yapi-auto-mcpYes, Yapi Auto Mcp MCP is free — one-click install via Unyly at no cost.
Yes, it requires environment variables: YAPI_BASE_URL, YAPI_CACHE_TTL, YAPI_LOG_LEVEL, YAPI_TOKEN. Unyly injects them into the config during install.
Self-hosted: the server runs locally on your machine via the install command above.
Open Yapi Auto Mcp on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Extract design specs and assets
by FigmaEnables AI agents to read, write, and edit Office documents via LibreOffice with token-efficient design. Supports multiple formats including DOCX, XLSX, PPTX, a
by passerbyflutterSearch and retrieve company logos by brand or domain. Customize size, format, and theme to match your design needs. Accelerate design, prototyping, and content
by NOVA-3951Enables GUI automation for controlling PIX4Dmatic on Windows through MCP. Supports launching, focusing, capturing screenshots, sending hotkeys, clicking UI elem
by jangjo123Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All design MCPs