yapi
MCP server from tiandashu/yapi-mcp-server
claude mcp add --transport stdio tiandashu-yapi-mcp-server npx -y @vtian/yapi-mcp-server --stdio
How to use
This MCP server integrates with the YApi API management platform to automatically generate TypeScript types, mock data, and API request code from your YApi project. It exposes five MCP tools: read_config to locate and read the yapi.config.json in your project, get_yapi_data to fetch and optionally cache YApi interface data, generate_types to produce TypeScript interfaces from the API schemas, generate_mock_from_yapi to create mock data that follows the interface structures, and generate_api_code to output Axios or Fetch-style API request functions. You can invoke these tools from any MCP client that supports the MCP protocol (for example Claude Desktop or Cursor) by running the corresponding tool names within the yapi-mcp-server: read_config, get_yapi_data, generate_types, generate_mock_from_yapi, and generate_api_code. The server caches YApi data for up to 30 minutes to reduce repeated network requests and improve performance.
How to install
Prerequisites:\n- Node.js and npm (or pnpm/yarn) installed on your system.\n- Access to a terminal or MCP client that can communicate with the MCP server.\n\nInstallation steps:\n1) Ensure Node.js and npm are installed. you can verify with:\n node -v\n npm -v\n\n2) Install and run the MCP server via npx (the recommended approach as shown in the README):\n\n npx -y @vtian/yapi-mcp-server --stdio\n\n3) If you prefer to package it yourself, you can install the npm package globally or locally in a project and run the server entry point per your setup. For example:\n\n npm install -g @vtian/yapi-mcp-server\n yapi-mcp-server --stdio\n\nPrerequisites reminder: ensure your environment can reach your YApi instance (remoteUrl in yapi.config.json). Follow the environment-specific steps for your OS or container if you’re deploying in CI/CD or in a containerized environment.
Additional notes
Notes and tips:\n- The MCP server reads yapi.config.json from your project automatically. Ensure remoteUrl, type, and optional dataKey/mockPath/typePath/apiPath are correctly configured.\n- The dataKey field (default data) selects the array/object field from the YApi export response containing interfaces.\n- Mock data generation and TypeScript type generation rely on the schema exposed by YApi; ensure your YApi project exports a compatible schema.\n- The built-in cache lasts 30 minutes to minimize repeated requests to YApi. If you need fresh data, trigger get_yapi_data again via MCP client.\n- Common issues often relate to network access to the YApi remoteUrl, authentication tokens, or incorrect yapi.config.json paths. Double-check the remoteUrl and the project’s access permissions if you encounter empty results.\n- If you modify yapi.config.json, reuse read_config to confirm the file is detected correctly before regenerating types or mocks.\n- This MCP server supports both Axios- and Fetch-style API code generation; configure your preferences in the generate_api_code tool output.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.