鸿蒙 HAP 一键签名·调试·部署 MCP:连设备、取 UDID、签名、装机、验签一条龙,撞 system 权限自动降级。11 工具,本地 stdio,agent 可驱动。
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag — we're steadily working through the catalog.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
鸿蒙 HAP 一键签名 · 调试 · 部署 —— CLI + MCP,agent 可驱动。 封装华为官方工具链(
hvigorw/hap-sign-tool/hdc),把散在文档里的命令拼成一条可脚本、可--dry-run、可让 AI 调用的链。零运行时依赖(纯 Node stdlib)。开源 MIT · 不破解 · 不逆向 · 签名走你自己的 AGC 凭据。
haplane · Gitee:https://gitee.com/LeonTing1010/hap-deploy · GitHub:https://github.com/LeonTing1010/hap-deploy-cliHapLane 是标准 stdio MCP server(JSON-RPC 2.0,协议 2024-11-05)。粘一段配置就接上,支持 Claude Code / Cursor / Cline / DevEco Code 等任意 MCP 客户端。
国内网络拉不动 npm 时,下载 haplane-mcp.mjs 放本地,改成 "command": "node", "args": ["/你的路径/haplane-mcp.mjs"]。
接上后在 AI 里直接说:「把 ./app.hap 签名装到我手机上」——agent 自己调 deploy_to_device,撞 system 权限自动降级重装,装完验签。
HapLane 是中性工具,自身不内嵌任何应用内容。 可搜可装的条目来自你订阅的源(registry index.json,apt/sources.list 模型);默认订阅官方源、可退订。工具指向上游权利人官方发布位,不托管/不转存二进制。详见 分发合规边界。
| 工具 | 作用 |
|---|---|
deploy_to_device | 核心编排:连设备 → 取 UDID → 读包名 → 签名 → 装机 → 验签,一步到位。app:<id> 从订阅源解析→上游拉取直接装;撞 9568332 签名不一致自动卸旧重装;撞 9568289 权限被拒自动降级(逐个剥掉被拒权限重签重装,实测 3 连剥后装上) |
doctor | 自检工具链(hvigorw/java/hap-sign-tool/hdc)与签名材料是否就位 |
hdc_devices | 列联机设备 |
search_hap | 在你订阅的源里搜 HAP 资源(可多源,结果带 registryId 标来源):非 discoveryOnly 条目可直接 deploy_to_device{app:id} 从上游拉 + sha256 校验 + 签装 + HAP Store 开放接口(只发现给源站链接,不代下不转存不绕登录) |
list_sources | 列出当前订阅的 registry 源(只读);增删订阅走 CLI haplane source add/remove/reset |
hdc_udid | 取设备 UDID(真机 debug 签名 / Profile 绑定所需) |
sign | hap-sign-tool sign-app 签名 |
install | hdc install -r 装到设备 |
verify | hap-sign-tool verify-app 验签 |
gen_signing_material | 生成 OpenHarmony 本地自签材料(绑包名 + UDID) |
rename_bundle | 包名全局占用时改 HAP 的 bundleName 再签(纯 Node 重打包) |
agc_status | 用 client_credentials 查 AGC:appId / 设备用量 / 现有 Profile |
agc_provision | 只读计划器:自检还差哪几步一次性配置 |
配置与密码走 HAP_DEPLOY_CONFIG 指向的配置文件 + .env(自动加载),不入 MCP 参数;stdout 只出协议 JSON,日志走 stderr。
全局:--config <path> · --dry-run(只打印命令不真跑,无真机也能看全链)· --verbose · --in <hap> · --target <设备>
复制 hap-deploy.config.example.json 为 hap-deploy.config.json,填 SDK 路径 + 签名材料路径。密码只从环境变量读,绝不入配置 / 日志:
给 AGC 打交道有三种方式,推荐机器密钥:
client_credentials 机器密钥(推荐):AGC 控制台铸 client_id / secret → 换 Bearer token。无交互登录、可吊销、可审计。凭据走 env AGC_CLIENT_ID + AGC_CLIENT_SECRET(或直接 AGC_TOKEN)。deveco login 的 cookie 会话:只连 DevEco AI 助手,根本不碰 AGC,与签名无关。关键坑:请求头
client_id必须匹配 token 的sub,否则 401。
不做
前提
hdc / hap-sign-tool / java(各平台官方版都有,几 G,华为官网装)OpenHarmony.p12 公开密码 123456)——但只对模拟器 / OpenHarmony 有效,纯血真机拒(9568332 sign info inconsistent)。verify 成功不等于真机能装。9568332 → 先 hdc uninstall 再装(deploy_to_device 已自动处理)。205339064)→ rename_bundle 改名再签(⚠️ 改名破坏应用身份,仅侧载 / 自测用)。DevEco HarmonyOS 模拟器上,MCP deploy_to_device 五步全绿:
签名走本地 OpenHarmony 自签;纯血真机换 AGC 材料填进同一 config.signing 即走真机路。
MIT
Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/haplane)<a href="https://allmcps.com/mcp/haplane"><img src="https://allmcps.com/api/badge/haplane?style=directory" alt="Haplane on AllMCPs" /></a>