Get the FREE Ultimate OpenClaw Setup Guide →

yapi

MCP server from yyykf/yapi-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio yyykf-yapi-mcp-server docker run -i yyykf/yapi-mcp-server \
  --env YAPI_BASE_URL="Description: base URL for Yapi instance (e.g., http://yapi.example.com)" \
  --env YAPI_PROJECT_TOKENS="Description: JSON or comma-separated tokens mapping projectId to token, e.g., {"123": "token"}" \
  --env SPRING_PROFILES_ACTIVE="Description: Spring profile if needed (e.g., prod)"

How to use

This MCP server provides a set of tools to interact with your Yapi API management platform. The available capabilities include listing Yapi projects, retrieving interface categories, listing interfaces within a category, searching interfaces by project, keyword or path, and fetching detailed information about a specific API interface. It also offers management utilities such as refreshing the cache and obtaining cache statistics to help you monitor performance. Once the server is running and configured, you can issue natural language queries to explore your Yapi documentation, locate relevant interfaces, and manage API information directly through your MCP-enabled client.

How to install

Prerequisites:

  • Docker installed and running (or use an alternative supported environment if available)
  • Access to the internet to pull the container image

Steps:

  1. Pull or run the MCP server Docker image (example using Docker): docker pull yyykf/yapi-mcp-server:latest

  2. Configure Yapi connection settings via environment variables or a mounted configuration file.

    • Set YAPI_BASE_URL to your Yapi instance URL
    • Set YAPI_PROJECT_TOKENS to your project tokens mapping (e.g., {"123": "token123"})
    • Optional: SPRING_PROFILES_ACTIVE for the desired Spring profile
  3. Run the container with the required environment variables: docker run -d --name yapi-mcp-server
    -e YAPI_BASE_URL="http://your-yapi-instance"
    -e YAPI_PROJECT_TOKENS='{"123": "token123"}'
    -e SPRING_PROFILES_ACTIVE=prod
    yyykf/yapi-mcp-server:latest

  4. Verify the server is running and healthy. If the server exposes a health check endpoint, you can curl it (adjust port if you expose differently): curl http://localhost:8888/actuator/health

  5. Optional: If you use Docker Compose, you can adapt the provided docker-compose.yml in the repository to start the service with your environment bindings and tokens.

Additional notes

Tip: Ensure your Yapi URL is reachable from the MCP server container. If you use tokens for multiple projects, keep them in a structured JSON or environment variable that the application can parse. Check the health endpoint to confirm the service is up before issuing tool queries. If you upgrade the image, re-check compatibility of API endpoints in your Yapi instance. For multi-arch deployments, build or pull multi-arch images and use Docker Compose with appropriate platform settings.

Related MCP Servers

Sponsor this space

Reach thousands of developers