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 MCP Servershow me the user authentication API details from project 123"
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 MCP Server (Go版本)
一个用Go语言实现的Model Context Protocol (MCP) 服务器,用于从YApi文档链接读取接口信息并提供给大模型使用。
特性
🚀 使用Go实现,性能优异
📦 支持通过npm/npx发布和使用
📖 从YApi文档链接读取单个接口信息
📚 获取YApi项目中所有接口列表
🔍 在YApi项目中搜索接口
🔌 支持YApi API和HTML页面解析
快速开始
方式1: 通过npx使用(推荐)
方式2: 本地构建
在Claude Desktop中配置
在Claude Desktop的配置文件中添加:
如果发布到私有npm仓库:
可用工具
MCP服务器提供以下工具:
1. get_yapi_interface
从YApi文档链接读取单个接口信息。
参数:
url(string, 必需): YApi文档链接
2. get_yapi_project_interfaces
获取YApi项目中所有接口的列表。
参数:
project_url(string, 必需): YApi项目URL或项目ID
环境变量
YAPI_BASE_URL: YApi实例的基础URL(可选)YAPI_TOKEN: YApi访问令牌(可选,用于API访问)
项目结构
开发
本地开发
测试
发布到私有npm仓库
详细步骤请参考 发布指南.md
许可证
MIT License
贡献
欢迎提交Issue和Pull Request!