mcp-server-yapi

Provides a MCP server to manage YApi projects, interfaces, categories, and data through natural language interactions.
  • typescript

6

GitHub Stars

typescript

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "kales0202-mcp-server-yapi": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-yapi"
      ],
      "env": {
        "YAPI_TOKEN": "<YAPI_TOKEN>",
        "YAPI_BASE_URL": "<YAPI_BASE_URL>",
        "MCP_DEBUG_CONSOLE": "false"
      }
    }
  }
}

You can manage YApi interfaces and projects with natural language through this MCP server. It wraps common YApi actions into helpful tools, letting you automate interface management and project organization directly from your MCP-enabled client.

How to use

You connect a MCP client to this server and start sending natural language requests to perform tasks such as creating interfaces, organizing categories, importing data, and listing interfaces within a project or category. You can ask for project details, create and update interfaces, import data sets, and retrieve lists of interfaces or categories. Use the available tools to perform each action and combine them to automate typical API lifecycle workflows.

How to install

Prerequisites you need before installing: Node.js version 18 or higher, and a MCP protocol compatible client such as Cursor, Windsurf, Claude Desktop, or another MCP client.

Step-by-step setup to run the MCP server locally with a remote YApi instance.

  1. Create the configuration to run the MCP server via npx as a quick start.
{
  "mcpServers": {
    "mcp_server_yapi_npx": {
      "command": "npx",
      "args": ["-y", "mcp-server-yapi"],
      "env": {
        "YAPI_BASE_URL": "YAPI服务地址,例:https://xxx.yyy.com",
        "YAPI_TOKEN": "项目TOKEN",
        "MCP_DEBUG_CONSOLE": "false"
      }
    }
  }
}

Additional installation method using a local build

If you prefer to run the server locally after building, use the node runtime to execute the built distribution.

  1. Build and run locally using a dist entry point.
git clone https://github.com/kales0202/mcp-server-yapi.git
cd mcp-server-yapi
npm install
npm run build

Then run with Node pointing to the built file:

{
  "mcpServers": {
    "mcp_server_yapi_node": {
      "command": "node",
      "args": ["/absolute/path/to/your/mcp-server-yapi/dist/index.js"],
      "env": {
        "YAPI_BASE_URL": "YAPI服务地址",
        "YAPI_TOKEN": "项目TOKEN",
        "MCP_DEBUG_CONSOLE": "false"
      }
    }
  }
}

"

## Configuration notes

Place your YApi endpoint and token in the environment variables to connect securely. The essential variables are YAPI\_BASE\_URL for the YApi instance URL and YAPI\_TOKEN for the project access token. You can toggle MCP\_DEBUG\_CONSOLE to enable or disable detailed runtime output.

## Notes on tools and capabilities

This MCP server exposes a set of tools that map directly to YApi operations. You can perform actions such as getting project details, creating and updating interfaces, managing interface categories, importing data, and listing interfaces within particular projects or categories.

## Available tools

### get\_project

Retrieve basic information about a YApi project.

### add\_cat

Create a new interface category within a project.

### get\_cat\_menu

Fetch the list of interface categories as a menu.

### list\_cat

List all interfaces under a specific category.

### list\_menu

List interface menu entries available in a project.

### get\_interface

Get detailed data for a single interface.

### list\_interface

List interfaces within a project or category.

### save\_interface

Create or update an interface with provided data.

### add\_interface

Add a new interface to a project or category.

### up\_interface

Update an existing interface with new information.

### import\_data

Import interface data into the server from a data source.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational