mcp-yapi-server
Enables direct integration with YApi API documentation platform in MCP-compatible editors like Cursor, allowing users to query API details, list interfaces, and search endpoints by simply pasting YApi URLs.
README
mcp-yapi-server
基于 Model Context Protocol (MCP) 的 YApi 集成服务器,在 Cursor 等支持 MCP 的编辑器中直接查询 YApi API 文档。
✨ 功能特性
- 🔗 直接粘贴 URL - 最简单!粘贴 YApi 链接即可查询
- 🔍 查询接口详情 - 完整的请求/响应参数
- 📋 列出接口 - 查看项目所有接口
- 🔎 搜索接口 - 按关键词搜索
- 🤖 AI 辅助 - 自动生成代码、类型定义等
📦 安装
npm install -g mcp-yapi-server
或作为项目依赖:
npm install mcp-yapi-server
🚀 快速开始
1. 安装
npm install -g mcp-yapi-server
2. 配置 Cursor
在 Cursor 设置中添加 MCP 服务器配置:
{
"mcpServers": {
"yapi": {
"command": "mcp-yapi-server",
"env": {
"YAPI_BASE_URL": "https://yapi.example.com",
"YAPI_TOKEN": "your_token_here"
}
}
}
}
或使用本地安装:
{
"mcpServers": {
"yapi": {
"command": "node",
"args": ["./node_modules/mcp-yapi-server/dist/index.js"],
"env": {
"YAPI_BASE_URL": "https://yapi.example.com",
"YAPI_TOKEN": "your_token_here"
}
}
}
}
3. 重启 Cursor
4. 开始使用
在 Cursor 中直接粘贴 YApi 链接:
https://yapi.example.com/project/100/interface/api/12345
📚 文档
🔧 常见问题
"No server info found"
原因: Node.js 版本 < 18
解决: nvm install 18 && nvm use 18
"请登录..."
原因: 需要配置 Token
解决: 在 Cursor 配置中设置 YAPI_TOKEN
详见 故障排除文档
🛠 开发
# 克隆项目
git clone https://github.com/your-username/mcp-yapi-server.git
cd mcp-yapi-server
# 安装依赖
npm install
# 开发模式
npm run dev
# 构建
npm run build
📄 许可证
MIT License
🔗 相关链接
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Neon Database
MCP server for interacting with Neon Management API and databases