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

@yxfan-dev/yapi-mcp-server

v0.0.2

Published

A Model Context Protocol server for YApi

Readme

YApi MCP Server

A Model Context Protocol server for YApi integration

This is a TypeScript-based MCP server that provides integration with YApi (YAML API) platform. It allows Claude and other AI assistants to interact with YApi through the Model Context Protocol.

Features

Tools

  • get_interface_detail - 获取YApi接口详情

    • 接受接口ID作为参数
    • 返回接口的详细信息
  • get_project_list - 获取YApi项目列表

    • 可选参数:分组ID、页码、每页数量
    • 返回项目列表信息
  • get_category_list - 获取YApi分类列表

    • 接受项目ID作为参数
    • 返回分类列表信息
  • get_follow_list - 获取用户关注的信息列表

    • 不需要参数
    • 返回用户关注的信息列表
  • get_interfaces_by_project_and_tag - 根据项目ID和标签查询接口的详细信息

    • 接受项目ID和标签作为参数
    • 返回符合条件的接口详细信息

安装

从NPM安装

npm install -g yapi-mcp-server

手动安装

克隆仓库并安装依赖:

git clone https://github.com/yourusername/yapi-mcp-server.git
cd yapi-mcp-server
npm install
npm run build

配置

要使用YApi MCP服务器,您需要配置以下环境变量:

  • YAPI_BASE_URL: YApi服务器的基础URL
  • YAPI_USERNAME: YApi用户名
  • YAPI_PASSWORD: YApi密码

使用方法

与Claude Desktop集成

在Claude Desktop配置文件中添加服务器配置:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "yapi-server": {
      "command": "yapi-mcp-server",
      "env": {
        "YAPI_BASE_URL": "http://your-yapi-server-url",
        "YAPI_USERNAME": "your-username",
        "YAPI_PASSWORD": "your-password"
      }
    }
  }
}

与Claude VSCode扩展集成

在VSCode设置中添加服务器配置:

{
  "mcpServers": {
    "yapi-server": {
      "command": "yapi-mcp-server",
      "env": {
        "YAPI_BASE_URL": "http://your-yapi-server-url",
        "YAPI_USERNAME": "your-username",
        "YAPI_PASSWORD": "your-password"
      }
    }
  }
}

开发

安装依赖:

npm install

构建服务器:

npm run build

开发模式(自动重新构建):

npm run watch

调试

由于MCP服务器通过stdio通信,调试可能比较困难。我们建议使用MCP Inspector

npm run inspector

Inspector将提供一个URL,您可以在浏览器中访问调试工具。