AI copilot for WeChat Mini Program - auto compile-fix, size analysis, smart subpackage. 16 tools.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"harmony-mcp": {
"args": [
"-y",
"@yujiamei/harmony-mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
微信小程序与 HarmonyOS 设备自动化 MCP Server。让 Kiro、Cursor、Claude Desktop 等 AI 客户端直接执行本地开发者工具能力:编译诊断、合规预检、包体积分析、一键上传和鸿蒙设备操作。
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@yujiamei/harmony-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @yujiamei/harmony-mcp against OSV.dev.
Click any tool to inspect its schema.
/harmony-checkOne-click environment pre-check
/harmony-auditFull code audit and scoring report
/harmony-shrinkPackage size analysis and subpackage suggestions
/harmony-publishCompliance pre-check, compilation diagnosis, and version confirmation
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in other
Pi Coding Agent extension (CLI-first) — routes bash/read/grep/find/ls through lean-ctx CLI for strong token savings. Optional MCP bridge can register advanced tools.
Autonomous spec-to-product coding-agent CLI with an MCP server exposing 34 tools over stdio.
97% token reduction for AI coding sessions — zero deps, 21 languages, MCP server
App framework, testing framework, and inspector for MCP Apps.
MCP Security Weekly
Get CVE alerts and security updates for io.github.xiaoxuzhu303-prog/harmony-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
微信小程序与 HarmonyOS 设备自动化 MCP Server。让 Kiro、Cursor、Claude Desktop 等 AI 客户端直接执行本地开发者工具能力:编译诊断、合规预检、包体积分析、一键上传和鸿蒙设备操作。
当前 npm 稳定版:v0.5.0,共 36 个工具。
不需要云开发,不需要小程序 CI 密钥,不需要 IP 白名单。默认通过微信开发者工具官方 CLI 工作。
Quick Start · 核心能力 · 工具列表 · 配置 · FAQ
>= 20三类客户端配置内容相同,只是配置文件路径不同。
{
"mcpServers": {
"harmony-mcp": {
"command": "npx",
"args": ["-y", "@yujiamei/harmony-mcp"]
}
}
}
常见配置路径:
| 客户端 | 配置文件 |
|---|---|
| Kiro | .kiro/settings/mcp.json |
| Cursor | .cursor/mcp.json |
| Claude Desktop macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop Windows | %APPDATA%\Claude\claude_desktop_config.json |
Windows 如果 npx 启动不稳定,可以改用全局安装:
npm install -g @yujiamei/harmony-mcp
然后将配置改为:
{
"mcpServers": {
"harmony-mcp": {
"command": "harmony-mcp",
"args": []
}
}
}
| 场景 | 你可以对 AI 说 | 做什么 |
|---|---|---|
| 一键发版 | "帮我发个版本,描述是修复购物车 bug" | 读取版本、构建 npm、上传代码 |
| 编译诊断 | "编译报错了,帮我定位" | 调用开发者工具编译,解析错误并给出修复建议 |
| 包体积分析 | "主包快超了,帮我看看" | 分析包体积、定位大文件、给出分包建议 |
| 合规预检 | "发版前检查一下合规" | 扫描 32 条审核高频规则 |
| 代码审计 | "帮我检查代码质量" | 扫描 14 条运行时规则并评分 |
| 鸿蒙设备 | "把这个 HAP 装到设备上" | 通过 HDC 安装、启动、看日志、传文件 |
你:帮我发个版本,描述是修复了购物车 bug
AI:读取项目信息... OK
构建 npm... OK
上传代码 v1.2.4... OK
发版完成。去微信后台提交审核即可。
你:编译报错了,帮我定位
AI:pages/cart/cart.js:42 Cannot find module 'utils/pay'
类型:模块缺失
源码:src/pages/cart/cart.tsx
建议:检查 import 路径或补齐对应模块
wechat_compliance_check 覆盖隐私弹窗、授权时机、虚拟支付、强制登录、web-view 域名、HTTPS、页面路径、tabBar、诱导分享、内容安全和敏感信息硬编码等高频审核问题。
v0.5.0 稳定版共 36 个工具:
| 分类 | 数量 | 代表工具 |
|---|---|---|
| 微信基础操作 | 10 | wechat_preview、wechat_auto_preview、wechat_cache_clean |
| 微信项目分析 | 4 | wechat_project_info、wechat_package_size、wechat_subpackage_suggest |
| 微信项目检查 | 4 | wechat_config_validate、wechat_audit、wechat_compliance_check |
| 微信智能流程 | 2 | wechat_diagnose、wechat_publish |
| 微信 CI / 环境 / 运行时 | 8 | wechat_ci_preview、wechat_ready_check、wechat_runtime_diagnose |
| HarmonyOS 设备操作 | 8 | harmony_list_devices、harmony_install、harmony_log |
完整工具表见 docs/TOOLS.md。
默认情况下无需配置。只有在微信开发者工具或 HDC 不在常见路径时,才需要在运行目录创建 harmony-mcp.json。
{
"cliPath": "D:\\Program Files\\Tencent\\微信web开发者工具\\cli.bat",
"hdcPath": "D:\\Huawei\\Sdk\\openharmony\\toolchains\\hdc.exe",
"appJsonPath": "src/app.json"
}
也可以通过环境变量指定微信开发者工具 CLI:
WECHAT_DEVTOOLS_CLI="D:\\Program Files\\Tencent\\微信web开发者工具\\cli.bat"
下一阶段继续补强:
| 能力 | 状态 |
|---|---|
| HarmonyOS 真机验证矩阵 | 计划中 |
| uni-app / Taro 源码映射增强 | 计划中 |
| 运行时诊断 Beta 稳定化 | 持续迭代 |
| 工具清单自动校验 | 计划中 |
在支持 MCP Prompts 的客户端中输入 /,可以看到 4 个快捷指令:
| 指令 | 功能 |
|---|---|
/harmony-check | 一键环境预检 |
/harmony-audit | 全量代码审计与评分报告 |
/harmony-shrink | 包体积分析与分包建议 |
| `/harmo |