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

@reglow/review-mcp

v0.1.1

Published

ReView(uni-app x / uts / uvue)移动端组件库 MCP 服务器与 Skills 知识包:让 AI 助手查询组件文档、示例、源码与函数实现

Readme

@reglow/review-mcp

ReView 组件库的 MCP 服务器 与 Skills 知识包,形态对齐同仓库的 @reglow/reui-mcp: MCP 负责「查得到」(组件文档 / 示例 / 源码 / 函数实现 / 检索 / 指南), Skills 负责「怎么用」(uni_modules 安装、easycom、平台差异、主题、i18n 与常见陷阱)。

ReView 是基于 uni-app x(uts/uvue)的移动端组件库,参考 TDesign 设计风格, 组件以 uni_modules/reglow-review/ 安装,模板里用 re-* easycom 标签(如 <re-button />)。

什么是 MCP?

Model Context Protocol(MCP)是一种标准化协议,用于连接 AI 助手与外部数据源和工具。通过 MCP,AI 助手可以动态发现和调用各种能力,而无需为每个工具单独集成。 MCP 的核心价值:

  • 统一接口:提供标准化的方式让 AI 与外部系统交互
  • 动态发现:AI 可以自动发现可用的工具和资源
  • 易于扩展:新增工具只需实现 MCP 协议即可被 AI 使用

什么是 Skills?

Skills(技能)是一种模块化的能力扩展方式,允许 AI 助手通过添加预定义的指令和工具来增强其功能。每个 Skill 包含详细的说明文档和相关的代码资源,使 AI 能够在特定任务中表现得更加专业和高效。 Skills 的核心价值:

  • 领域专长:为 AI 添加特定领域的专业知识和最佳实践
  • 标准化:统一团队的开发流程和规范
  • 可复用:快速复用成功经验和解决方案

⚠️ 前置说明:@reglow/review 未发布到 npm

组件库没有发到 npm(npm view @reglow/review 返回 404),所以本 MCP 不做 npm 版本知识源, 知识只有两级来源:

| 来源 | 触发条件 | 内容 | | -------------------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | | 本地 ReView 仓库 | --root <review 仓库路径>,或直接在仓库内运行(mcp/ 的上一级即仓库根) | docs/components/*.md、docs/guide/*.md、README.md、CHANGELOG.md、组件源码、演示页 | | 项目内安装包 | 当前工作目录含 uni_modules/reglow-review(自动识别) | 组件源码(无 docs/ 与演示页,文档回退官网) | | 官方文档站点(兜底) | 本地缺文档 / 未找到本地来源时 | 抓取 https://reglow.huoli.tech/components-library/review 并转 Markdown |

  • 版本号从 CHANGELOG.md 顶部解析(当前 1.0.6(2026-09-22)),每次响应都会标注「知识源 + 组件库版本」。
  • version 参数与 --version 保留(与 reui-mcp 的签名一致),但传值只会得到「未发布到 npm,请用 --root」的提示。

快速开始

0. 一键配置(推荐,Trae / CodeBuddy / Qoder / Cursor / Claude)

一条命令同时写好 MCP 配置并安装 Skills:

npx -y -p @reglow/review-mcp review-setup                             # 默认 trae,codebuddy,qoder
npx -y -p @reglow/review-mcp review-setup --tools trae,qoder          # 指定工具
npx -y -p @reglow/review-mcp review-setup --tools all --scope user    # 全部工具 / 用户级
npx -y -p @reglow/review-mcp review-setup --dry-run                   # 先预览再执行

等价写法:npx -y @reglow/review-mcp --setup trae,codebuddy,qoder。

各工具的项目级落地位置与仍需手动完成的步骤:

| 工具 | Skills 目录 | MCP 配置文件 | 仍需手动完成 | | ---------------------- | ------------------------------------------------ | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Trae | .trae/skills/<skill>/ | .trae/mcp.json | 设置 → MCP 打开「启用项目级 MCP」;用户级为 %APPDATA%/Trae/User/mcp.json(macOS/Linux 见 --list-tools) | | CodeBuddy | .codebuddy/skills/<skill>/ | .mcp.json(JSONC) | IDE 需在对话面板 CodeBuddy Settings → MCP → Add MCP 粘贴同一条目;CLI 直接生效;用户级 ~/.codebuddy/.mcp.json | | Qoder | .qoder/skills/<skill>/ | .mcp.json(或 .qoder/settings.json) | 项目级 MCP 默认需批准(或 mcp.enableAllProjectMcpServers: true);CLI 可 qoder mcp add review-mcp -s project -- npx -y @reglow/review-mcp;/mcp reload | | Cursor / Claude / 通用 | .cursor/skills/、.claude/skills/、.skills/ | .cursor/mcp.json、.mcp.json | 见 review-setup --list-tools 输出 |

  • 写入是幂等合并:只增改 mcpServers["review-mcp"],其它服务器与顶层字段保持不变; 配置文件为非法 JSON 时默认报错不改动,--force 会先备份为 *.bak 再重写。
  • 查看支持的工具与路径:npx -y @reglow/review-mcp --list-tools。
  • 若工具里读不到完整文档,把 npx 参数补上仓库路径: {"command":"npx","args":["-y","@reglow/review-mcp","--root","D:/path/to/review"]}。

1. 手动配置 MCP(任意客户端)

在 Trae / CodeBuddy / Qoder / Cursor / Claude Desktop 等客户端的 mcpServers 中加入:

{
  "mcpServers": {
    "review-mcp": {
      "command": "npx",
      "args": ["-y", "@reglow/review-mcp"]
    }
  }
}

要读完整文档(含 docs/ 与演示页)时,追加 --root:

{
  "mcpServers": {
    "review-mcp": {
      "command": "npx",
      "args": ["-y", "@reglow/review-mcp", "--root", "D:/path/to/review"]
    }
  }
}

命令行方式(Claude Code / Qoder CLI 等):

claude mcp add review-mcp -- npx -y @reglow/review-mcp
qoder mcp add review-mcp -s project -- npx -y @reglow/review-mcp

2. 仅安装 Skills 知识包

npx -y -p @reglow/review-mcp review-skills                        # 默认写入 .trae/skills
npx -y -p @reglow/review-mcp review-skills --target qoder         # .qoder/skills
npx -y -p @reglow/review-mcp review-skills --target codebuddy     # .codebuddy/skills
npx -y -p @reglow/review-mcp review-skills --all                  # 全部已知工具目录
npx -y -p @reglow/review-mcp review-skills --list                 # 查看可用目标

也可通过主命令安装:npx -y @reglow/review-mcp --install-skills --target trae。

安装后在项目中的位置:

<project>/.trae/skills/review-components/
├── SKILL.md            技能入口(何时使用 + 组件库关键事实 + 硬性规则 + 文件导航)
├── WORKFLOWS.md        MCP 工具工作流与 6 个完整任务示例
├── BEST_PRACTICES.md   安装、easycom、平台差异、主题、i18n、性能与常见陷阱
└── COMPONENTS.md       按分类的组件选型清单(tag + 用途 + 文档路径)

工具(Tools)

| 工具 | 参数 | 用途 | | -------------------------- | ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | | get_review_document | component? category? version? source? | 不传 component 返回按分类的组件总览(含 easycom 标签、演示页可用性、官网链接);传则返回完整文档与 API 表格 | | get_review_code_examples | component index? lang? version? | 从官方演示页提取可复制的 uvue 片段(按 <!-- 小节标题 --> 切分),保留小节标题 | | list_component_files | component version? | 组件源码文件清单(路径 / 行数 / 字节) | | get_file_code | component file startLine? endLine? version? | 读取组件目录内文件内容(带路径穿越防护),读 type Props / withDefaults 用 | | get_function_code | component name file? version? | 提取函数 / 常量 / 类 / type 定义的完整实现;未命中时返回相近与可用符号 | | search_review_docs | query? keywords? component? category? limit? version? | 跨组件文档、演示页、源码与库级文档检索(多关键词「全部命中」),返回 文件:行号 + 上下文 + 文档链接 | | get_review_guide | topic? version? | 库级指南章节:overview / install / easycom / theme / i18n / platform / changelog / conventions |

  • 组件名用 kebab-case 且不带 re- 前缀(button、search-history),也接受 easycom 标签写法(re-button)。
  • version 参数保留以对齐 reui-mcp,但本库未发布 npm,传值只会得到提示。
  • 所有返回都以「知识源 + 组件库版本 + 版本来源」开头(如 知识源:本地 ReView 仓库|组件库版本:1.0.6(2026-09-22)), 当内容来自官方文档站点兜底时会额外标注 ⚠️,避免 AI 误判文档版本。

知识来源

| 来源 | 触发条件 | 内容 | | ------------------ | ----------------------------------------------------- | ---------------------------------------------------------------------------------- | | 本地 ReView 仓库 | --root <dir> / REVIEW_ROOT / 在仓库内运行(默认) | 组件文档 + 全部源码 + 演示页 + README.md / CHANGELOG.md / docs/guide/*.md | | 项目内 uni_modules | 工作目录含 uni_modules/reglow-review | 仅组件源码(文档与官方链接回退官网) | | 官方文档站点 | 本地缺文档、或未找到本地来源 | https://reglow.huoli.tech/components-library/review 组件页 / 指南页 / 版本记录页 |

  • 组件分类以 docs/.vitepress/sidebar.ts 为权威(9 个分类,与官网 components/<category>/<name> 路由段一致)。
  • uni_modules/reglow-review/components/*/readme.md 是脚本生成的二次编码文本(中文乱码), 因此不作为文档正文,也不参与检索;读文件时会标注 ⚠️ 该文件是脚本生成的二次编码文本。
  • --no-site 可完全离线(仅本地仓库)。

CLI 选项

| 选项 | 说明 | | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | --root <dir> | 指定 ReView 仓库工作区(未指定时自动识别仓库 / 项目内的 uni_modules/reglow-review) | | --version <ver> | 指定知识版本;因未发布 npm,只会给出提示(不带值时打印本包版本号,等价 -v) | | --no-site | 禁用官方文档站点兜底(完全离线) | | --check | 自检:打印知识源、版本、分类与组件数量后退出 | | --setup [tools] | 一键配置 AI 工具(MCP 配置 + Skills),默认 trae,codebuddy,qoder;支持 --scope user、--dry-run、--force、--skills-only、--mcp-only | | --list-tools | 列出支持的工具、MCP 配置路径(项目级 / 用户级)与 Skills 目录 | | --install-skills | 安装 Skills 知识包(可配合 --target / --all / --force) | | --print-config | 打印 MCP 客户端配置片段 | | -v / -h, --help | 版本 / 帮助 |

三个可执行入口(bin):

| 命令 | 作用 | | --------------- | ------------------------------------------------------------------------------------------------ | | review-mcp | MCP stdio 服务器(默认行为);另提供 --check / --setup / --install-skills / --list-tools | | review-setup | 为 Trae / CodeBuddy / Qoder 等一键写 MCP 配置 + 安装 Skills | | review-skills | 仅把 Skills 知识包装到指定工具目录 |

# 自检示例
npx -y @reglow/review-mcp --check
# 查看各工具路径
npx -y @reglow/review-mcp --list-tools

开发与测试

# 安装依赖(SDK 与测试工具只在本子包内,ReView 消费方不受影响)
cd mcp && npm install

# 单测(含用官方 SDK Client 连接真实 stdio 服务器的端到端用例)
npm test                                         # 在 mcp/ 目录,vitest 由本子包 devDependencies 提供

仓库根也提供了同名脚本(npm run mcp / mcp:check / setup / skills / test:mcp); 其中 test:mcp 直接调用 vitest,需根目录能解析到 vitest(如在根目录安装过该依赖)。

目录结构:

mcp/
├── index.mjs        bin:review-mcp(stdio 服务器入口 / --check / --setup / --install-skills)
├── server.mjs       MCP 服务器与 7 个工具的实现
├── knowledge.mjs    知识源:本地仓库 / 安装包 / 官网兜底 + 符号提取、演示页示例与检索
├── catalog.mjs      组件目录(解析 sidebar.ts 分类 + 扫描 docs / uni_modules / pages)
├── site.mjs         官网 HTML → Markdown 兜底抓取(组件页 / 指南页 / 版本记录页)
├── integrations.mjs AI 工具集成规格(Trae / CodeBuddy / Qoder / Cursor / Claude 的 MCP 配置与 Skills 目录)
├── setup.mjs        bin:review-setup(一键写 MCP 配置 + 装 Skills,含 JSONC 解析与幂等合并)
├── skills.mjs       bin:review-skills(仅安装 Skills 知识包)
├── skills/          内置 Skills 知识包(随包发布)
└── __tests__/       单测(knowledge / site / skills / setup / server 端到端)

⚠️ stdio 模式下 stdout 仅供协议通信,日志一律走 stderr。

发布

@reglow/review-mcp 与 @reglow/review 是两个独立包(同仓库、可分别发布,互不拖累依赖):

cd mcp
npm version patch        # 按需
npm publish              # 需要 npm 登录且有 @reglow 权限

files 已包含 skills/,因此 Skills 知识包随 MCP 包一起发布,版本一致。

相关资源