npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@morris131/yapi-mcp-server

v1.0.2

Published

Yapi MCP Server - Model Context Protocol server for Yapi API documentation platform with Windows support

Readme

Yapi MCP Server

基于模型上下文协议(MCP)的 Yapi 接口文档服务器,为 AI 助手提供与 Yapi 平台的无缝集成,支持通过自然语言查询接口详情。

功能特性

  • getInterfaceDetail - 获取 Yapi 接口的详细信息

配置说明

服务器通过环境变量进行 Yapi 连接配置:

# Yapi 服务地址
YAPI_URL=http://yapi.example.com

# 项目令牌,JSON 格式:{"projectId": "token", "123": "your-token-1"}
YAPI_PROJECT_TOKENS={"123":"your-token-1","456":"your-token-2"}

环境变量通过 MCP 客户端配置传入。

使用方式

OpenCode 配置

在 MCP 配置中添加:

{
  "mcp": {
    "yapi": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@morris131/yapi-mcp-server"
      ],
      "environment": {
        "YAPI_URL": "your_yapi_url",
        "YAPI_PROJECT_TOKENS": "{\"123\":\"your-project-token\"}"
      }
    }
  }
}

Claude Code 配置

运行以下命令添加 MCP 服务器:

claude mcp add yapi -e YAPI_URL=your_yapi_url -e YAPI_PROJECT_TOKENS={\"123\":\"your-project-token\"} -- npx -y @morris131/yapi-mcp-server

工具说明

getInterfaceDetail

获取 Yapi 接口的详细信息。

参数:

  • interfaceId(必填):Yapi 接口 ID
  • projectId(必填):Yapi 项目 ID(用于获取令牌)

示例:

{
  "interfaceId": 789,
  "projectId": 123456
}

返回内容:

  • 基本信息(ID、标题、路径、请求方法)
  • 请求信息(请求体类型、参数、请求头、查询参数)
  • 响应信息(响应体类型、响应体、JSON Schema 标识)
  • 其他信息(状态、Markdown 文档)