Yapi-MCP

MCP.Pizza Chef: lzsheng

Five tools cover the whole job: list the projects you can reach, browse their categories, search for an interface by name or path, read one in full, and create or update one. There is no delete tool at all, so nothing can be wiped out, though saving over an existing entry replaces it without asking. You need your YApi site address and a project token from YApi's own settings page, and a single line of configuration gets it running. Last updated in July 2025.

Unmaintained · No commits in 14 months.
Coding
Writing

Use This MCP server To

Find the login interface documented in our YApi Show me every parameter one interface expects Write up a new interface from a short description Add a missing parameter to an existing interface entry List the categories in a project so I can find things

README

Yapi Auto MCP Server

一个用于 YApi 的 Model Context Protocol (MCP) 服务器,让你能够在 Cursor 等 AI 编程工具中直接操作 YApi 接口文档。

项目简介

Yapi Auto MCP Server 是一个基于 Model Context Protocol 的服务器,专为 YApi 接口管理平台设计。它允许你在 Cursor、Claude Desktop 等支持 MCP 的 AI 工具中直接:

  • 🔍 搜索和查看 YApi 项目中的接口文档
  • ✏️ 创建和更新 接口定义
  • 📋 管理项目和分类 结构
  • 🔗 无缝集成 AI 编程工作流
  • 🛠 支持多个 YApi Project配置

通过 MCP 协议,AI 助手可以理解你的 YApi 接口结构,在编程过程中提供更准确的建议和代码生成。

主要功能

🔍 接口查询和搜索

  • yapi_search_apis: 按名称、路径、标签等条件搜索接口
  • yapi_get_api_desc: 获取特定接口的详细信息(请求/响应结构、参数等)
  • yapi_list_projects: 列出所有可访问的项目
  • yapi_get_categories: 获取项目下的接口分类和接口列表

✏️ 接口管理

  • yapi_save_api: 创建新接口或更新现有接口
    • 支持完整的接口定义(路径、方法、参数、请求体、响应等)
    • 支持 JSON Schema 和表单数据格式
    • 自动处理接口状态和分类管理

🎯 智能特性

  • 多项目支持: 同时管理多个 YApi 项目
  • 缓存机制: 提高查询响应速度
  • 详细日志: 便于调试和监控
  • 灵活配置: 支持环境变量和命令行参数

Yapi-MCP FAQ

Do I need a key?
Yes. You need the web address of your YApi site plus a project token, which you copy from that project's settings page in YApi. The token is written as the project number, a colon, then the token, and you can list several projects separated by commas.
Is setup hard?
No. You paste one short block into your assistant's settings and it fetches the program for you the first time it runs. There is nothing to install by hand.
Which apps does it work in?
Cursor and Claude Desktop are both documented, and any assistant that can start a command should behave the same way.
Can it delete our documentation?
No, there is no delete tool. It can, however, save over an existing entry with no confirmation step, so ask it to show you the change before it writes.
Is my token handled safely?
Mostly. It is masked in the logs, but the setup the README recommends first puts the token on the command line, where anything that can list running programs on your machine can read it. Prefer the version that puts it in the settings block as an environment value instead.
The documentation mentions a silent logging level. Does it work?
No. Asking for the silent level is rejected on the command line and quietly ignored as an environment value, so the program falls back to normal logging. Use the errors-only level if you want it quiet.
Can I use this to document a brand new interface?
Yes. Describe the path, the method and the parameters in plain words and it will create the entry in the category you name.
Will everything be in Chinese?
The project's own documentation and its messages are in Chinese, but you can talk to it in any language and your assistant will translate what comes back.
There is also a local web-server mode. Is it safe?
Only on a machine you trust. That mode listens on every network connection with no password at all, so anyone who can reach your machine could use your YApi token. Stick with the standard setup unless you are debugging.