yapi-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| YAPI_UID | No | Optional; login JWT usually auto-parses uid | |
| YAPI_TOKEN | Yes | Login JWT or project open token | |
| YAPI_COOKIE | No | Optional raw Cookie header override | |
| YAPI_BASE_URL | Yes | YApi host, e.g. https://yapi.example.com | |
| YAPI_MCP_CONFIG | No | Optional path to JSON config file |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Fetch YApi project API docs (JSON request/response) from a project URL so the agent can implement client integrations. Configure credentials via env (YAPI_BASE_URL / YAPI_TOKEN), config file (.yapi-mcp.json), yapi_configure, or per-tool token/base_url. Prefer: configure → parse URL → list/search interfaces → get interface detail → generate client code.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| yapi_configureA | Set runtime connection settings for this MCP session (overrides env/file). Prefer env vars or |
| yapi_get_configA | Show non-secret connection settings currently in effect. |
| yapi_parse_urlA | Parse a YApi page URL into base_url, project_id, and optional interface_id. Example: https://yapi.example.com/project/123/interface/api/ |
| yapi_get_projectC | Get YApi project metadata (name, basepath, desc). |
| yapi_list_interfacesB | List interfaces under a YApi project (from list_menu), with optional filters. Pass a browser URL like https://yapi.example.com/project/123/interface/api/ or set project_id + base_url. Credentials via env / config / token arg. |
| yapi_get_interfaceA | Get one interface's full JSON request/response definition for client codegen. Prefer interface_id from yapi_list_interfaces, or a detail URL: https://yapi.example.com/project/123/interface/api/456 |
| yapi_export_catalogB | Export a project API catalog for agent understanding / client scaffolding. By default returns an index (method/path/title). Set include_details=true to also pull normalized request/response bodies (capped by limit). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Most tools target distinct actions: configure vs get_config are cleanly separated by direction, and parse_url is a focused utility. The only soft overlap is yapi_export_catalog with include_details=true, which can approximate the combined output of yapi_list_interfaces and yapi_get_interface, though the index-first default keeps them reasonably distinct.
Every tool uses the yapi_ prefix followed by a verb_noun form (get_config, parse_url, get_project, list_interfaces, get_interface, export_catalog), all in snake_case. No mixing of conventions.
Seven tools is well-scoped for a read-focused YApi client: two config tools, one URL helper, three resource reads, and one export. Each earns its place with no filler.
The read surface covers project metadata, interface listing, single-interface detail, and bulk catalog export, which fits the codegen/agent-understanding purpose. Gaps remain: there is no list_projects or interface search, so an agent starting from just a host must rely on parse_url or a known project_id, and no write/update operations exist.