Labsco
MCP SERVER

YAPI MCP Server

by devilMing

Puts one YAPI project's interface definitions in front of an assistant, over SSE, using a project token you already have.

API Specifications & HTTP Tooling
Summary
One project, one process, connected by URL.

YAPI is usually the place where the API contract actually lives, and the value here is that an assistant can read it directly instead of being pasted a screenshot of it. Two consequences of the design worth knowing before you wire it up: the project is fixed at configuration time, and because it serves SSE the server has to be running before the client connects — this is not a process your client will start for you.

What it is

A small MCP server that gives an assistant access to YAPI interface details. It is scoped to one YAPI project — the base URL, token and project ID are fixed in the environment rather than passed per call — and it speaks SSE, so the client connects to a URL instead of spawning a process.

What you get

Access to the interface details held in your YAPI instance for the project the token authorises, retrieved live rather than from an export. Because the project is pinned by configuration, the assistant reads that project and nothing else on the instance — running a second project means running a second copy of the server on its own port.

Requirements

A running YAPI instance plus a project ID and a project token for it. Three values go in a `.env` file at the project root: `YAPI_BASE_URL`, `YAPI_TOKEN` and `YAPI_PROJECT_ID`. Node.js v14 or higher, and npm or yarn. The package is `yapi-mcp-server` (1.0.0 in package.json); clone, `npm install`, `npm start`, then add it to your client as an SSE server pointing at `/sse` on the port you configured.

Setup effort

One command plus a key — npx -y yapi-mcp-server, then supply credentials