@wllcyg/yapi-mcp
Click on "Install 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-mcpsearch 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.
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | ||
| projectUrl | No | ||
| includeMock | No | ||
| interfaceId | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Without annotations, the description adds a token scope constraint and indicates the included content (request/response schema). However, it does not explicitly state read-only behavior or potential error cases, leaving some behavioral uncertainty.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence with no fluff, front-loaded with the core action and additional token scope constraint. It earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 4 parameters and no output schema or annotations, so the description must clarify parameter usage and return values. It only mentions request/response schema and token scope, leaving significant gaps for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters are explained in the description, and the schema has no property descriptions (0% coverage). Parameter names like projectId and includeMock are self-explanatory, but the description adds no semantics or required/optional context, failing to compensate for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves YApi interface detail including request/response schema. The verb 'get' and resource 'interface detail' are specific and distinguish it from the sibling search tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit usage guidance is provided. The description implies usage when a specific interface ID is known and full schema details are needed, but it does not contrast with search_yapi_interfaces or state prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_yapi_interfacesA
Search YApi interfaces by natural language keyword within a project. Token scope is project-level only.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| method | No | ||
| keyword | Yes | ||
| pathHint | No | ||
| projectId | No | ||
| projectUrl | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the token scope is project-level, which is a useful behavioral hint, but it does not mention return format, pagination, or confirm read-only behavior. Since 'search' implies read-only, this is acceptable but not richly transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences long, front-loaded with the core purpose, and adds only the necessary token scope note. Every sentence earns its place; no fluff or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 6 parameters, no output schema, and no annotations. The description is too brief to cover parameter meanings, output behavior, or selection guidance versus the sibling. This is a significant gap for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for all parameters. It clarifies 'keyword' as natural language and implies project scoping via projectId/projectUrl, but it does not explain 'limit', 'method', or 'pathHint'. This leaves the majority of parameters semantically under-defined.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action (search) on a specific resource (YApi interfaces) with a natural language keyword and project scope. This distinguishes it from the sibling tool get_yapi_interface_detail, which presumably retrieves a single interface's details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for searching within a project via natural language, which provides clear context. However, it does not explicitly mention when to use this tool versus get_yapi_interface_detail or any exclusion criteria, so it falls short of a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.1.3- First observed
get_yapi_interface_detail - First observed
search_yapi_interfaces
TDQS
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search the Final POS REST API documentation.
Search 15K+ MCP services, A2A agents, and x402 APIs from 5 registries. Paid via x402 (USDC on Base).
Search the Anthid trading API reference, schemas, and product pages.
Read-only catalogue search: JVM developer tooling, ML models, compliance APIs, siSwati LLM.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables access to YApi interface documentation by retrieving API details through interface IDs or direct YApi URLs.271MIT
- 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.15MIT
- 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.299GPL 3.0
- AlicenseAqualityDmaintenanceEnables LLM clients to browse and inspect YAPI API documentation, including project info, categories, interfaces, and full API details with request/response schemas.7151MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wllcyg/yapi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server