Skip to content
MCP server

YApi MCP

Pull YApi interface docs, requests and responses into coding agents from a project URL

Runs locally
Install

YApi MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted
Runs
Locally
Version
0.1.0
Listing updated

Similar MCP servers

Install

Run in a terminal

claude mcp add yapi-mcp --env YAPI_TOKEN='<YAPI_TOKEN>' -- uvx contextdong-yapi-mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "yapi-mcp": {
      "command": "uvx",
      "args": [
        "contextdong-yapi-mcp"
      ],
      "env": {
        "YAPI_TOKEN": "<YAPI_TOKEN>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "yapi-mcp": {
      "command": "uvx",
      "args": [
        "contextdong-yapi-mcp"
      ],
      "env": {
        "YAPI_TOKEN": "<YAPI_TOKEN>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "yapi-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "contextdong-yapi-mcp"
      ],
      "env": {
        "YAPI_TOKEN": "<YAPI_TOKEN>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "yapi-mcp": {
      "command": "uvx",
      "args": [
        "contextdong-yapi-mcp"
      ],
      "env": {
        "YAPI_TOKEN": "<YAPI_TOKEN>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "yapi-mcp": {
      "command": "uvx",
      "args": [
        "contextdong-yapi-mcp"
      ],
      "env": {
        "YAPI_TOKEN": "<YAPI_TOKEN>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • YAPI_BASE_URLYApi host URL, e.g. https://yapi.example.com
  • YAPI_TOKENLogin JWT or project open tokenRequired
  • YAPI_UIDOptional uid for login JWT cookie auth

About YApi MCP

YApi MCP lets a coding agent read API documentation hosted on a YApi instance so it can write matching client code. Paste a YApi project or interface page URL and the server parses out the host, project id and interface id, lists and searches interfaces, and returns normalised request and response definitions as JSON Schema or examples.

Authentication uses either a login JWT, sent as the _yapi_token and _yapi_uid cookies, or a project open token. Credentials can come from tool arguments, runtime configuration inside the process, environment variables or a .env file, or a .yapi-mcp.json file, in that order of priority. The README tells users never to commit those files.

It installs from PyPI as contextdong-yapi-mcp and runs with uvx over stdio, or from Git. The README is written in Chinese and is MIT-licensed.

Tools this server provides (7)

Taken from the project documentation; the running server may differ.

yapi_configure
Set credentials dynamically for the running server.
yapi_get_config
View non-sensitive configuration.
yapi_parse_url
Parse host and ids from a YApi page URL.
yapi_get_project
Return project metadata.
yapi_list_interfaces
Return a searchable interface index.
yapi_get_interface
Return the full JSON definition of one interface.
yapi_export_catalog
Export the catalogue, optionally with details.

What it does

URL parsing
Extracts host, project id and interface id from a YApi page address.
Interface search
Lists and searches interfaces in a project.
Normalised definitions
Returns request and response JSON as schema or examples.
Catalogue export
Exports the interface catalogue, with optional details.
Flexible credentials
Arguments, runtime configuration, environment or config file.
Two auth modes
Login JWT or project open token.

Good for

  • Have an agent build a client from YApi docs
  • Search a project's interfaces by keyword
  • Export an interface catalogue for review
  • Wire login endpoints into an app from pasted URLs

Pricing

Open source

Open source, MIT

YApi MCP FAQ

How do I authenticate?

With a login JWT or a project open token set as YAPI_TOKEN, plus the YApi host as YAPI_BASE_URL.

How is YApi MCP installed?

From PyPI as contextdong-yapi-mcp via uvx or pip, or directly from Git.

Does YApi MCP cover non-JSON APIs?

The README describes JSON requests and JSON responses.

What licence applies?

MIT.

Is YApi MCP free?

Yes. YApi MCP is open source, so you can use and self-host it for free.

How do I add YApi MCP to Claude Code?

Run this command in your terminal: claude mcp add yapi-mcp --env YAPI_TOKEN='<YAPI_TOKEN>' -- uvx contextdong-yapi-mcp

What are the best alternatives to YApi MCP?

The closest alternatives to YApi MCP are python-sdk, fastapi_mcp, tyk, JiZhiMCP and fastmcp.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers