yapi_get_api_descLABSCO SUMMARY
API documentation that stays in step with the code you are writing.
Because both the reading and the writing sides are exposed, the interface definition can be looked up, changed and re-run as a test without leaving the editor — which is the gap that lets YApi drift from the implementation in the first place.
What it is
A full-lifecycle connector to a YApi instance. It authenticates with the cookie from your browser session, discovers the projects that cookie can see, and exposes interface, project, category, user and test-collection operations as tools.
What you get
- Interfaces —
yapi_get_api_desc,yapi_save_apito add or update,yapi_search_apis,yapi_delete_interface,yapi_copy_interfaceincluding across projects - Projects —
yapi_list_projects,yapi_create_project,yapi_update_project - Categories —
yapi_get_categories,yapi_create_category,yapi_update_category,yapi_delete_category - Users —
yapi_get_user_info,yapi_get_user_groups - Testing —
yapi_get_test_collections,yapi_create_test_collection,yapi_run_interfaceto run an interface test against a chosen environment - Migration —
yapi_import_swaggerto bring in Swagger data,yapi_export_projectto take a project out
Requirements
Your YApi server address in YAPI_BASE_URL and a cookie string in YAPI_TOKEN that contains both _yapi_token and _yapi_uid — copy the complete Cookie header out of a request in your browser's Network panel, not a fragment of it. Runs as npx -y yapi-mcp-pro, with an SSE mode for server deployments. If the client shows a failed connection, check npx yapi-mcp-pro --version prints a version first; when it does not, npm cache clean --force is the fix the README puts ahead of everything else. Project information and category lists are cached with a 10 minute default expiry, while interface reads always go live.
Setup effort
One command plus a key — npx -y yapi-mcp-pro, then supply credentials
USE CASES
Reading an interface spec while implementing it
Search for the interface by keyword and pull its full definition into the editor, instead of switching to the YApi tab.
Updating the docs as part of the change
Save the new or modified interface from the same session that changed the code, so the spec lands with the implementation.
Standing up a project from an existing Swagger file
Create the project and category structure, then import the Swagger data into it in one pass.
Checking the interface actually answers
Run the interface test against a named environment and read the result, rather than reaching for a separate HTTP client.
Reusing an interface in another project
Copy it across rather than retyping the schema, then adjust the fields that differ.
Taking a snapshot of a project
Export the project data for backup or for handing to someone outside the YApi instance.
19 tools
Listed in project docs. Your client may show a different list.
yapi_save_apiyapi_search_apisyapi_delete_interfaceyapi_copy_interfaceyapi_list_projectsyapi_create_projectyapi_update_projectyapi_get_categoriesyapi_create_categoryyapi_update_categoryyapi_delete_categoryyapi_get_user_infoyapi_get_user_groupsyapi_get_test_collectionsyapi_create_test_collectionyapi_import_swaggeryapi_export_projectyapi_run_interfaceBEFORE YOU INSTALL
What to know first
Tools you get
19 tools named in the project's documentation.
Requires
- npx on PATH
- Node.js >= 16.0.0
- YAPI_TOKEN in your environment
- YAPI_BASE_URL in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
npx -y yapi-mcp-proMCP Clients
Cursor
{
"mcpServers": {
"yapi-mcp-pro": {
"command": "npx",
"args": [
"-y",
"yapi-mcp-pro"
],
"env": {
"YAPI_BASE_URL": "<YOUR_YAPI_BASE_URL>",
"YAPI_TOKEN": "_yapi_token=<YOUR_YAPI_TOKEN>; _yapi_uid=<YOUR_YAPI_UID>",
"NODE_ENV": "cli"
}
}
}
}