YAPI Interface MCP Server
The YAPI Interface MCP Server allows you to fetch comprehensive details of YAPI interfaces by their ID for integration with AI development tools like Cursor and Claude Desktop.
Key capabilities:
Retrieve complete interface information including basic details (name, path, method), request parameters (path, query, headers, body), response data, and metadata (creation time, status, tags)
Integrate seamlessly with AI development environments through the Model Context Protocol (MCP)
Connect to a YAPI server using configurable credentials (email, password, URL)
Validate inputs using JSON Schema support
Support development and debugging with included scripts and an MCP Inspector for testing
Provides a Node.js-based MCP server that allows retrieving YAPI interface details, including interface information, request parameters, and response data
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., "@YAPI Interface MCP Serverget details for interface ID 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.
yapi-get-interface-mcp
一个用于获取YAPI接口详情的MCP(Model Context Protocol)服务器,支持与Cursor、Claude Desktop等AI开发工具集成。
使用方法
可用工具
yapi-get-interface
根据接口ID获取YAPI接口详情
参数:
id:接口ID(数字格式)
使用示例:

AI工具会自动调用该工具并返回接口的完整信息,包括:
接口基本信息(名称、路径、方法等)
请求参数(路径参数、查询参数、请求头、请求体)
响应信息(响应体、响应类型等)
其他元数据(创建时间、状态、标签等)
命令行参数
参数 | 说明 | 必需 | 示例 |
| YAPI登录邮箱 | 是 |
|
| YAPI登录密码 | 是 |
|
| YAPI服务器地址 | 是 |
|
Related MCP server: CodeAlive MCP
快速开始
在Cursor中配置
创建或编辑 .cursor/mcp.json 文件(项目级配置)或 ~/.cursor/mcp.json 文件(全局配置):
{
"mcpServers": {
"yapi-get-interface-mcp": {
"command": "npx",
"args": [
"yapi-get-interface-mcp",
"--email", "your@email.com",
"--password", "yourpassword",
"--url", "https://yapi.yourcompany.com"
]
}
}
}环境要求
Node.js >= 18.0.0
pnpm >= 8.0.0
安装
使用npx可以直接运行,无需本地安装:
# 克隆项目
git clone https://github.com/Gorvey/yapi-get-interface-mcp.git
cd yapi-get-interface-mcp
# 安装依赖
pnpm install
# 构建项目
pnpm run build开发指南
项目结构
src/
├── config/ # 配置管理
│ └── yapi-config.ts
├── server/ # MCP服务器
│ ├── server.ts
│ ├── tools.ts
│ └── resources.ts
├── yapi/ # YAPI客户端
│ └── client.ts
└── index.ts # 入口文件开发脚本
# 开发模式(带示例配置)
pnpm run dev
# 监听文件变化自动构建
pnpm run watch
# 清理构建文件
pnpm run clean
# 构建项目
pnpm run build
# 使用MCP Inspector调试
pnpm run inspector调试
使用MCP Inspector进行调试:
pnpm run inspector这将启动一个交互式界面,帮助你测试和调试MCP工具。
常见问题
1. YAPI连接失败
检查YAPI服务器地址是否正确
确认邮箱和密码是否正确
检查网络连接和YAPI服务器可访问性
2. 接口ID无效
确保接口ID是数字格式
检查接口在YAPI中是否存在
确认有访问该接口的权限
3. MCP服务器未被识别
确保已正确构建项目(
pnpm run build)检查配置文件中的路径是否正确
重启AI开发工具
许可证
MIT License
贡献
欢迎提交Issue和Pull Request来改进这个项目。
更多信息
Available Tools
1 toolyapi-get-interfaceC
根据接口ID获取YAPI接口详情,支持格式:数字ID
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | 接口ID,格式:数字ID |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It only states what the tool does (get details) and parameter format, missing critical information like authentication requirements, rate limits, error handling, or response structure. For a read operation with zero annotation coverage, this is insufficient transparency.
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 concise and front-loaded in a single sentence: '根据接口ID获取YAPI接口详情,支持格式:数字ID' (Get YAPI interface details by interface ID, supported format: numeric ID). It efficiently communicates the core purpose and parameter constraint without unnecessary elaboration.
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?
Given the tool's simplicity (1 parameter, no output schema, no annotations), the description is incomplete. It lacks information about what '接口详情' (interface details) includes, potential authentication needs, or error scenarios. While the schema covers the parameter, the overall context for effective tool use remains underspecified.
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 100%, with the parameter 'id' documented as '接口ID,格式:数字ID' (interface ID, format: numeric ID). The description adds no additional parameter semantics beyond what the schema already provides. According to guidelines, with high schema coverage (>80%), the baseline is 3 even without extra param info in the description.
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's purpose: '根据接口ID获取YAPI接口详情' (Get YAPI interface details by interface ID). It specifies the verb '获取' (get) and resource 'YAPI接口详情' (YAPI interface details). However, with no sibling tools mentioned, there's no opportunity to distinguish from alternatives, preventing a perfect score.
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 provides minimal usage guidance: it mentions the parameter format '数字ID' (numeric ID). However, it lacks explicit when-to-use context, prerequisites, or comparisons with alternatives (though none exist). This leaves the agent without clear operational context beyond basic parameter formatting.
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.
1 tool update
v1.0.0- First observed
yapi-get-interface
TDQS
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as fetching YAPI interface details by ID.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'yapi-get-interface' follows a clear verb_noun pattern and is descriptive.
A single tool is too few for a server named 'YAPI Interface MCP Server', which implies a broader scope for managing YAPI interfaces. This minimal set severely limits functionality and suggests an incomplete implementation.
The tool set is severely incomplete for the domain of YAPI interface management. It only provides a 'get' operation, lacking essential CRUD operations like create, update, delete, or list interfaces, which are necessary for basic agent workflows.
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
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Model Context Protocol server for Studex tools, notifications, and profile integrations
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server utilizing Claude AI for generating intelligent queries and offering documentation assistance based on API documentation analysis.193MIT

CodeAlive MCPofficial
AlicenseNot gradedqualityAmaintenanceA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.89MIT- AlicenseNot gradedqualityDmaintenanceA server that implements the Model Context Protocol, providing a standardized way to connect AI models to different data sources and tools.1511MIT
- FlicenseCqualityDmaintenanceA Model Context Protocol server that provides Retrieval-Augmented Generation capabilities using Contextual AI, enabling AI interfaces like Cursor IDE and Claude Desktop to query domain-specific knowledge with context-aware responses and source citations.121-
Appeared in Searches
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/Gorvey/yapi-get-interface-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server