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

soil-ui-mcp

v1.0.0

Published

MCP server: search & read @sobot/soil-ui component docs under mcp-docs/docs

Readme

soil-ui-mcp

面向 @sobot/soil-uiModel Context Protocol(MCP) 服务:在本地检索、阅读组件 Markdown 文档,并可选接入 soil-ui 源码,在文档不足以回答问题时直接查阅源码实现。

设计说明

| 项目 | 说明 | |------|------| | 服务名 | soil-ui-mcp | | 传输 | stdio(由 Cursor / Claude Desktop 等 MCP 客户端拉起子进程) | | 运行时 | Node.js ≥ 16(18+ 使用原生 fetch,16/17 自动 polyfill) | | 文档根目录 | 相对路径 docs/(即 mcp-docs/docs,启动时全量预加载至内存) | | 源码目录 | 可选,通过环境变量 SOIL_UI_SRC 配置 |

工具一览

文档工具(始终可用)

| 工具 | 作用 | |------|------| | list_docs | 列出所有 .md 文件名,可选按文件名子串过滤 | | search_docs | 在全部文档中做子串搜索,返回按文件分组的行号与片段 | | read_doc | 按文件名读取单个文档完整内容 |

源码工具(配置 SOIL_UI_SRC 后可用)

| 工具 | 作用 | |------|------| | list_src | 递归列出源码目录下的文件,支持路径子串和扩展名过滤 | | search_src | 在源码文件中做子串搜索,返回按文件分组的行号与片段 | | read_src | 按相对路径读取单个源码文件完整内容 |

Agent 工作策略:优先通过文档工具回答问题;当文档信息不足时,自动使用源码工具查阅实现细节。

安装

cd mcp-docs
npm install   # 或 yarn install

本地验证

npm start

进程从 stdin 读取 MCP JSON-RPC;无交互时看似「挂起」属正常,由 MCP 客户端连接使用。

在 Cursor 中注册 MCP

仅使用文档工具

{
  "mcpServers": {
    "soil-ui-mcp": {
      "command": "node",
      "args": ["/Users/you/sobot-ui/mcp-docs/src/server.mjs"]
    }
  }
}

同时启用源码工具

在配置中加入 env.SOIL_UI_SRC,指向 soil-ui 源码目录(绝对路径):

{
  "mcpServers": {
    "soil-ui-mcp": {
      "command": "node",
      "args": ["/Users/you/sobot-ui/mcp-docs/src/server.mjs"],
      "env": {
        "SOIL_UI_SRC": "/Users/you/sobot-ui/src"
      }
    }
  }
}

SOIL_UI_SRC 为可选项。若路径不存在或未配置,服务器正常启动,仅文档工具可用,stderr 会打印一条警告。

更完整示例见 cursor-mcp-config.example.json

发布到 npm

npm login                 # 首次需要登录
npm run release:patch     # 补丁版本 1.0.0 → 1.0.1
npm run release:minor     # 次版本   1.0.0 → 1.1.0
npm run release:major     # 主版本   1.0.0 → 2.0.0

发布后用户可通过 npx 直接运行:

npx soil-ui-mcp

目录结构

mcp-docs/
  package.json          # 包名 soil-ui-mcp,engines: node >=16
  .yarnrc               # ignore-engines true(兼容 Yarn Classic + Node 16)
  src/
    server.mjs          # MCP 入口(stdio)
  docs/                 # 被检索的 Markdown 组件文档
  README.md
  cursor-mcp-config.example.json

安全说明

  • 文档工具read_doc 仅允许 docs/ 目录下的 *.md 文件,通过 path.resolve 校验,防止路径穿越。
  • 源码工具read_src / search_src 仅允许 SOIL_UI_SRC 目录内的文件,扩展名限制为 .js .jsx .ts .tsx .vue .css .less .scss .json .md;自动跳过 node_modulesdistbuild 等目录。