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 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-yapi-server

v1.0.1

Published

MCP server for accessing YApi service - Query YApi API documentation directly in Cursor and other MCP-compatible editors

Readme

mcp-yapi-server

npm version License: MIT GitHub stars GitHub forks

基于 Model Context Protocol (MCP) 的 YApi 集成服务器,在 Cursor 等支持 MCP 的编辑器中直接查询 YApi API 文档。

✨ 功能特性

  • 🔗 直接粘贴 URL - 最简单!粘贴 YApi 链接即可查询
  • 🔍 查询接口详情 - 完整的请求/响应参数
  • 📋 列出接口 - 查看项目所有接口
  • 🔎 搜索接口 - 按关键词搜索
  • 🤖 AI 辅助 - 自动生成代码、类型定义等

📦 安装

npm install -g mcp-yapi-server

或作为项目依赖:

npm install mcp-yapi-server

🚀 快速开始

1. 安装

npm install -g mcp-yapi-server

2. 配置 Cursor

在 Cursor 设置中添加 MCP 服务器配置:

{
  "mcpServers": {
    "yapi": {
      "command": "mcp-yapi-server",
      "env": {
        "YAPI_BASE_URL": "https://yapi.example.com",
        "YAPI_TOKEN": "your_token_here"
      }
    }
  }
}

或使用本地安装:

{
  "mcpServers": {
    "yapi": {
      "command": "node",
      "args": ["./node_modules/mcp-yapi-server/dist/index.js"],
      "env": {
        "YAPI_BASE_URL": "https://yapi.example.com",
        "YAPI_TOKEN": "your_token_here"
      }
    }
  }
}

3. 重启 Cursor

4. 开始使用

在 Cursor 中直接粘贴 YApi 链接:

https://yapi.example.com/project/100/interface/api/12345

📚 文档

🔧 常见问题

"No server info found"

原因: Node.js 版本 < 18
解决: nvm install 18 && nvm use 18

"请登录..."

原因: 需要配置 Token
解决: 在 Cursor 配置中设置 YAPI_TOKEN

详见 故障排除文档

🛠 开发

# 克隆项目
git clone https://github.com/TStoneLee/mcp-yapi-server.git
cd mcp-yapi-server

# 安装依赖
npm install

# 开发模式
npm run dev

# 构建
npm run build

📄 许可证

MIT License

🔗 相关链接