@wllcyg/yapi-mcp
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., "@@wllcyg/yapi-mcp search yapi interfaces for 'login' and get the first result's detail"
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.
@wllcyg001/yapi-mcp
YApi MCP Server(Node.js + MCP SDK),提供按需查询的两个核心工具:
search_yapi_interfacesget_yapi_interface_detail
Token 仅支持 project 级。
group级 URL 不支持鉴权。
1. 安装与构建
npm install
npm run build本地开发:
npm run devRelated MCP server: YApi MCP Server
2. 配置
环境变量
YAPI_BASE_URL(必填)YAPI_TOKEN_FILE(可选,默认~/.yapi-mcp-tokens.json)YAPI_TIMEOUT_MS(可选,默认8000)YAPI_RETRY_COUNT(可选,默认1)YAPI_TOKEN(可选,单项目临时兜底)
Token 文件
路径:~/.yapi-mcp-tokens.json
{
"695": "token_for_project_695",
"703": "token_for_project_703"
}3. MCP 客户端配置示例(Cursor)
{
"mcpServers": {
"yapi": {
"command": "node",
"args": ["D:/self/yapi-mcp/dist/index.js"],
"env": {
"YAPI_BASE_URL": "http://10.255.30.245:3000"
}
}
}
}如果你后续发布 npm 包,也可改为:
{
"mcpServers": {
"yapi": {
"command": "npx",
"args": ["-y", "@wllcyg001/yapi-mcp"],
"env": {
"YAPI_BASE_URL": "http://10.255.30.245:3000"
}
}
}
}4. 工具定义
search_yapi_interfaces
输入:
keyword: string(必填)projectId?: numberprojectUrl?: string(如.../project/695/interface/api)method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH"pathHint?: stringlimit?: number(默认 10,最大 50)
输出:
匹配接口列表:
interfaceId / name / method / path / projectId / score
get_yapi_interface_detail
输入:
interfaceId: number(必填)projectId?: numberprojectUrl?: stringincludeMock?: boolean(默认 false)
输出:
接口详情(request/response schema,默认不返回 mock)
5. 错误码
INVALID_ARGUMENTPROJECT_ID_REQUIREDPROJECT_TOKEN_REQUIREDTOKEN_SCOPE_UNSUPPORTEDPROJECT_NOT_ACCESSIBLEINTERFACE_NOT_FOUNDUPSTREAM_TIMEOUTUPSTREAM_ERRORRATE_LIMITED
Available Tools
2 toolsget_yapi_interface_detailA
Get YApi interface detail including request/response schema. Token scope is project-level only.
Inputs: interfaceId (required), projectId, projectUrl, includeMock.
search_yapi_interfacesA
Search YApi interfaces by natural language keyword within a project. Token scope is project-level only.
Inputs: keyword (required), limit, method, pathHint, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Search and detail retrieval are clearly distinct stages in the workflow—one identifies interfaces, the other inspects a specific one. No functional overlap exists, so an agent can easily choose the right tool.
Both tools follow a consistent verb_noun pattern with snake_case: search_yapi_interfaces and get_yapi_interface_detail. The verb-first style is uniform and predictable.
With only 2 tools, the server feels minimal for a YApi integration. This is borderline for the rubric's definition of a thin tool set, though it could be defensible if the scope is intentionally limited to read-only search and retrieval.
The read-only workflow is well covered: search for interfaces and retrieve full details. However, there is no way to list all interfaces without a keyword, and no CRUD or project-level operations, which are reasonable gaps for the stated purpose.
Maintenance
Related MCP Connectors
Search Visa Developer docs and retrieve OpenAPI specs for Visa product APIs to build integrations.
Search Modellix documentation for model APIs, request schemas, and usage guides.
Read-only search over the Vocenya AI receptionist API docs and endpoints, with code samples.
Search and read the Flowie Exchange API docs and OpenAPI contract. No sign-in needed.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables access to YApi interface documentation by retrieving API details through interface IDs or direct YApi URLs.2MIT
- 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.6 npmMIT
- AlicenseAqualityDmaintenanceEnables LLM clients to browse and inspect YAPI API documentation, including project info, categories, interfaces, and full API details with request/response schemas.711 npm1MIT
- AlicenseCqualityDmaintenanceProvides tools for AI assistants to list, search, and get details of YApi interfaces.66 npmISC