# io.github.xiaoxuzhu303-prog/harmony-mcp (npm · @yujiamei/harmony-mcp)

AI copilot for WeChat Mini Program - compile-fix, size analysis, compliance. 20 tools.

- Trust score: 65/100 (medium)
- Change this week: +18
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `@yujiamei/harmony-mcp`: 65/100 (this document), [markdown](https://verifymcp.io/servers/xiaoxuzhu303-prog-harmony-mcp/yujiamei-harmony-mcp.md), [page](https://verifymcp.io/servers/xiaoxuzhu303-prog-harmony-mcp/yujiamei-harmony-mcp)

## Channel facts

- Registry: `npm`
- Package: `@yujiamei/harmony-mcp`
- Version: `0.4.2`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 19/100
  - Repository check failed: the declared repository URL returned HTTP 404.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 57 days ago).
  - Security-disclosure policy not yet verified: we couldn't inspect the source repository.
- **Schema Quality & AI Usability**: 84/100
  - 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).
  - AI-judged instruction clarity (good).
  - Context-footprint check failed: tool/resource definitions use about 2908 tokens (~103/item across 28 items; 28 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 23/100
  - Stability observed for 7 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add xiaoxuzhu303-prog-harmony-mcp -- npx -y @yujiamei/harmony-mcp
```

### Codex

```bash
codex mcp add xiaoxuzhu303-prog-harmony-mcp -- npx -y @yujiamei/harmony-mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "xiaoxuzhu303-prog-harmony-mcp": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@yujiamei/harmony-mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add xiaoxuzhu303-prog-harmony-mcp --command npx --arg -y --arg @yujiamei/harmony-mcp
```

### Hermes

```yaml
mcp_servers:
  xiaoxuzhu303-prog-harmony-mcp:
    command: "npx"
    args: ["-y", "@yujiamei/harmony-mcp"]
```

### Other

```json
{
  "mcpServers": {
    "xiaoxuzhu303-prog-harmony-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@yujiamei/harmony-mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 65, +3)

- [functional improvement] Stability: unverified → 0.23

### 2026-08-02 (score 62, +62)

- [security regression] Provenance: unverified → fail
- [security improvement] Install scripts: unverified → pass
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Malware scan: unverified → pass
- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] Tool coverage: unverified → 100
- [functional improvement] License: unverified → pass
- [functional improvement] Schema quality: unverified → 100
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Schema quality: unverified → good
- [functional] Licence: MIT

### 2026-08-01 (score 0, −29)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-31 (score 29, −18)

- [security regression] Malware scan: pass → unverified

### 2026-07-30 (score 47, +27)

- [functional regression] Dependency health: partial → unverified
- [functional improvement] Tool coverage: unverified → 100
- [functional improvement] Schema quality: unverified → 100

### 2026-07-28 (score 20, −27)

- [functional regression] Schema quality: 100 → unverified
- [functional regression] Tool coverage: 100 → unverified
- [functional improvement] Dependency health: unverified → partial

### 2026-07-27 (score 47)

First indexed and scored.

## MCP tools (28)

### `wechat_cli_login` (~51 tokens)

微信登录

登录微信开发者工具（会弹出二维码，需要用户手机微信扫码确认）。当其他工具返回 NEED_LOGIN 状态时，必须先调用此工具完成登录，再重试之前的操作。

### `wechat_preview` (~62 tokens)

预览小程序

预览小程序项目，生成二维码用于手机扫码预览。如果用户只是想检查编译是否通过，应优先使用 wechat_diagnose 而非此工具。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径

### `wechat_upload` (~84 tokens)

上传代码

上传小程序代码到微信后台。通常不需要直接调用此工具，推荐使用 wechat_publish（一键发版）来完成完整的发布流程。

Input parameters:

- `description` (string): 版本描述
- `projectPath` (string, required): 小程序项目的绝对路径
- `version` (string, required): 版本号，如 '1.0.0'

### `wechat_build_npm` (~74 tokens)

构建 NPM

构建小程序项目的 npm 依赖。当 wechat_diagnose 返回 REBUILD_NPM 指令、或用户新安装了 npm 包后需要调用此工具。构建完成后建议重新编译验证。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径

### `wechat_open_project` (~51 tokens)

打开项目

在微信开发者工具中打开指定项目。通常由自动恢复链路内部调用，用户一般不需要直接使用。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径

### `wechat_close_project` (~48 tokens)

关闭项目

关闭当前在微信开发者工具中打开的项目。当需要切换到另一个项目时使用。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径

### `wechat_reset_fileutils` (~63 tokens)

重置文件监听

重置微信开发者工具的文件监听缓存。当开发者工具出现文件不同步、修改不生效等异常时使用。通常由自动恢复链路内部调用。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径

### `wechat_project_info` (~100 tokens)

项目信息

读取小程序项目全貌：AppID、页面列表、分包结构、编译配置、窗口设置。当用户第一次提到一个项目时应主动调用。支持 uni-app/Taro/mpx 跨框架自动识别（所有工具共享此能力）。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）

### `wechat_package_size` (~159 tokens)

包体积分析

分析小程序包体积，返回主包/分包体积、文件明细、三方库排行、体积炸弹警告。当用户问「包超了吗」「体积多大」时调用。
如果 useOfficialReport=true 会触发一次预览编译获取精准数据。主包超 1.5MB 时建议调用 wechat_subpackage_suggest 获取分包方案。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）
- `useOfficialReport` (boolean): 是否使用微信官方编译报告获取精准体积（会触发一次预览编译）

### `wechat_subpackage_suggest` (~138 tokens)

智能分包建议

智能分包建议：分析页面依赖关系，生成分包方案 + 可直接使用的 app.json 配置片段 + 体积归因 + 预加载配置 + 分包后体积模拟。
当主包超 1.5MB 或 wechat_package_size 建议分包时调用。拿到 configSnippet 后，读取 app.json 合并 subpackages 并从 pages 中移除已分包页面。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）

### `wechat_page_list` (~80 tokens)

页面列表

列出小程序所有页面（主包 + 分包），标注分包归属和页面总数。当用户问「有哪些页面」「页面列表」时调用。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）

### `wechat_config_validate` (~95 tokens)

配置校验

校验 project.config.json 和 app.json 配置文件，检查 appid 格式、pages 为空、必填字段缺失等常见错误。当用户问「配置有没有问题」时调用。返回 suggestedActions 时请按顺序执行。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）

### `wechat_dependency_check` (~97 tokens)

依赖检查

检查 npm 依赖状态：未构建的依赖、已知体积大户（lodash/moment 等）。当用户问「依赖有问题吗」或发版前调用。返回 suggestedActions 时请按顺序执行。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）

### `wechat_audit` (~96 tokens)

代码质量审计

全面代码质量审计：11 条运行时规则扫描 + A/B/C/D 评分 + 具体问题列表。当用户说「帮我检查代码质量」「项目有没有问题」时调用。返回 suggestedActions 时请按顺序修复。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）

### `wechat_compliance_check` (~104 tokens)

合规预检

合规预检：扫描隐私 API 调用（15 条规则）、检查权限声明、推断所需类目、标注个人主体限制。发版前调用避免审核被拒。返回缺失权限 + suggestedPatch（可直接帮用户补全 permission 配置）。

Input parameters:

- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）

### `wechat_publish` (~172 tokens)

一键发版

一键发版：自动读取当前版本号并递增、构建 npm 依赖、上传代码到微信后台。调用前必须先调用 wechat_diagnose 确认编译零错误，只有编译通过才能发版，否则应先引导用户修复编译错误。
支持自动识别 uni-app/Taro/mpx 等跨框架项目。

Input parameters:

- `description` (string): 版本描述，如 '修复了购物车 bug'
- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）
- `versionBump` (string): 版本递增方式：patch(修复)、minor(功能)、major(大版本)，默认 patch

### `wechat_diagnose` (~327 tokens)

编译诊断

触发小程序项目编译，捕获编译错误并结构化分析，给出修复建议。支持自动识别 uni-app/Taro/mpx 等跨框架项目。
如果返回 status="COMPILATION_FAILED"，你必须根据每个 error 的 agentActionHint 执行对应操作：
\- READ_FILE_AND_PATCH: 立刻读取 error.file 的 error.line 行附近代码，分析并修复错误
\- ADD_PAGE_TO_APP_JSON: 在 app.json 的 pages 数组中添加缺失的页面路径
\- REBUILD_NPM: 调用 wechat_build_npm 工具重新构建 npm
\- INSTALL_DEPENDENCY: 执行 npm install 安装缺失的依赖包
\- FIX_CONFIG: 读取并修复对应的配置文件
\- CHECK_COMPONENT_PATH: 检查组件路径和 usingComponents 配置
修复完成后，再次调用本工具验证编译是否通过，直到 status="COMPILATION_OK"。
如果 status="LOOP_LIMIT_REACHED"，你必须立即停止自动修复，将完整的错误历史展示给用户，请求人工介入。

Input parameters:

- `errorHistory` (string): 之前各轮的错误 JSON（由 AI 累积传入）
- `projectPath` (string, required): 小程序项目的绝对路径（支持原生项目、uni-app、Taro、mpx 源码目录）
- `retryCount` (number): 当前自动修复轮次（AI 每次重试时递增）

### `wechat_self_test` (~96 tokens)

环境自检

检测 harmony-mcp 运行环境是否就绪（CLI 路径、开发者工具进程、Node 版本等）。当用户第一次使用本工具或询问'连上了吗/能用吗'时，应主动调用此工具进行自检，并将结果用自信的口吻告知用户。本工具同时包含隐私安全声明，请在用户有安全顾虑时引用。

### `wechat_ready_check` (~138 tokens)

全链路预检

一次性检查微信开发者工具全链路状态：CLI 路径、进程运行、登录态、服务端口、项目合法性和可预览状态。
返回每个检查项的 pass/warn/fail 状态和具体修复 SOP。
建议在执行 preview/upload/diagnose 等操作前先调用此工具确认环境就绪。
如果返回 status="NOT_READY"，你必须根据 failedChecks 中每项的 sop 字段引导用户逐一修复。

Input parameters:

- `projectPath` (string): 可选，小程序项目路径。提供后会额外检查项目合法性

### `wechat_init_project` (~179 tokens)

新建小程序项目

在指定目录创建一个标准的微信小程序项目骨架，包含 project.config.json、app.json、app.js、首页等基础文件。
支持三种模板：blank（空白项目）、tabbar（带底部导航）、subpackage（带分包结构）。
创建完成后建议调用 wechat_open_project 在开发者工具中打开。

Input parameters:

- `appid` (string): 小程序 AppID（可选，默认使用测试号 touristappid）
- `projectName` (string): 项目名称（可选，默认 my-miniprogram）
- `projectPath` (string, required): 要创建项目的目标目录绝对路径（目录不存在会自动创建）
- `template` (string): 项目模板：blank（空白）、tabbar（带底部导航）、subpackage（带分包），默认 blank

### `harmony_list_devices` (~76 tokens)

鸿蒙设备列表

列出当前已连接的鸿蒙设备和模拟器（connectKey、状态、类型）。当用户问「有哪些鸿蒙设备」或在执行其他鸿蒙操作前需要确认目标设备时调用。多设备场景下，其他鸿蒙工具需要用此处返回的 connectKey 指定 target。

### `harmony_install` (~98 tokens)

安装 HAP 包

将 HAP 安装包安装到指定鸿蒙设备。当用户说「装到设备上」「安装这个 hap」时调用。安装前建议先用 harmony_list_devices 确认目标设备。多设备时必须指定 target。

Input parameters:

- `hapPath` (string, required): HAP 安装包的绝对路径
- `target` (string): 目标设备 connectKey（多设备时必填，来自 harmony_list_devices）

### `harmony_uninstall` (~78 tokens)

卸载应用

从指定鸿蒙设备卸载应用（按 bundleName）。当用户说「卸载这个应用」时调用。多设备时必须指定 target。

Input parameters:

- `bundleName` (string, required): 应用包名（bundleName，如 com.example.app）
- `target` (string): 目标设备 connectKey（多设备时必填）

### `harmony_start` (~102 tokens)

启动 Ability

在指定设备上启动应用的某个 Ability（相当于预览/拉起应用）。当用户说「在设备上跑起来」「启动这个应用」时调用。需要提供 bundleName 和 abilityName。

Input parameters:

- `abilityName` (string, required): Ability 名称（如 EntryAbility）
- `bundleName` (string, required): 应用包名（bundleName）
- `target` (string): 目标设备 connectKey（多设备时必填）

### `harmony_log` (~99 tokens)

查看设备日志

抓取设备最近的 hilog 日志（默认最近 200 行）。当用户说「看看日志」「设备上报什么错了」时调用。可用 keyword 过滤。

Input parameters:

- `keyword` (string): 按关键词过滤日志（可选）
- `lines` (number): 抓取的日志行数（默认 200）
- `target` (string): 目标设备 connectKey（多设备时必填）

### `harmony_file_push` (~82 tokens)

推送文件到设备

将本地文件推送到鸿蒙设备的指定路径。当用户说「把文件传到设备上」时调用。

Input parameters:

- `localPath` (string, required): 本地文件的绝对路径
- `remotePath` (string, required): 设备上的目标路径
- `target` (string): 目标设备 connectKey（多设备时必填）

### `harmony_file_pull` (~79 tokens)

从设备拉取文件

从鸿蒙设备拉取文件到本地指定路径。当用户说「把设备上的文件拉下来」时调用。

Input parameters:

- `localPath` (string, required): 本地目标路径
- `remotePath` (string, required): 设备上的源文件路径
- `target` (string): 目标设备 connectKey（多设备时必填）

### `harmony_ready_check` (~80 tokens)

鸿蒙环境预检

一次性检测鸿蒙开发环境：HDC 路径、HDC 版本、已连接设备。返回每项 pass/warn/fail 状态和修复 SOP。在执行鸿蒙设备操作前建议先调用确认环境就绪。如果返回 NOT_READY，请根据 failedChecks 的 sop 逐项引导用户修复。

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/xiaoxuzhu303-prog-harmony-mcp/yujiamei-harmony-mcp#diagnostics

## Score history

- 2026-08-03: 65
- 2026-08-02: 62
- 2026-08-01: 0
- 2026-07-31: 29
- 2026-07-30: 47
- 2026-07-28: 20
- 2026-07-27: 47

## Links

- npm package: https://www.npmjs.com/package/@yujiamei/harmony-mcp
- Socket report: https://socket.dev/npm/package/@yujiamei/harmony-mcp
- Changelog RSS feed: https://verifymcp.io/servers/xiaoxuzhu303-prog-harmony-mcp/yujiamei-harmony-mcp/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/xiaoxuzhu303-prog-harmony-mcp/yujiamei-harmony-mcp/changelog.json
- HTML version of this page: https://verifymcp.io/servers/xiaoxuzhu303-prog-harmony-mcp/yujiamei-harmony-mcp
