No project description provided
Project description
HarmonyOS Dev MCP
harmonyos_dev_mcp is the current community mainline service for HarmonyOS device automation, app deployment, UI interaction, and E2E assistance.
Run
uv sync --all-packages
uv run harmonyos-dev-mcp
Requirements
- Python 3.12+
- DevEco Studio 5.0+
hdcuv
Tool Groups
- General:
list_devicesquery_packagelogs_query - Build:
build_appinstall_apprun_appuninstall_app - UI:
screenshotclick_elementlong_press_elementinput_textswipedragpress_keyfind_element - E2E:
get_ui_treelist_windowswait_element
Call Notes
build_appis a long-running tool.- Set MCP
tools/call timeoutto at least60s. - For cold builds,
120sis the recommended timeout. build_appdefaults tobuild_mode="debug",target="hap", andproduct="default".- If a project already defines hvigor signing in
build-profile.json5,build_appreturns the hvigor output artifact directly. - If a project still uses a project-local MDM signing flow and hvigor only produces an unsigned HAP,
build_appwill tryproject_root/hapsigner/2-<build_mode>-sign.batautomatically. On success,output_pathswitches to the signed artifact, usuallyproject_root/hapsigner/signApp.hap. logs_querysupportsmode="errors"andmode="markers".logs_querydefaults to realtime sampling and does not fallback to historical logs unlessfallback_to_historical=true.logs_query.package_nameis no longer reduced to a single pid by default.query_package.info_typeonly supportslist,abilities,main_ability, andpermissions.query_package.info_type="basic"is not supported.input_text.element_handlemust be an object returned byfind_elementorwait_element.- Do not pass
input_text.element_handleas a JSON string. - For MDM-style projects, keep signing materials and scripts under
project_root/hapsigner/. The MCP fallback only runs project-local scripts; it does not synthesize signing config.
Correct input_text example:
{
"element_handle": {
"window_id": 80,
"id": "420",
"compid": "80:420",
"type": "TextInput"
},
"text": "security"
}
Incorrect input_text example:
{
"element_handle": "{\"window_id\":80,\"id\":\"420\"}",
"text": "security"
}
Test
uv run pytest services/harmonyos_dev_mcp/tests/unit -v
Docs
docs/logs_query.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
harmonyos_dev_mcp-0.7.5.tar.gz
(89.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file harmonyos_dev_mcp-0.7.5.tar.gz.
File metadata
- Download URL: harmonyos_dev_mcp-0.7.5.tar.gz
- Upload date:
- Size: 89.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c807d03004170b5a3130d08000c30439cd6b82b2eb5c94a53a133c33fe4af6cc
|
|
| MD5 |
332572212bdbc45da1b6967c703d5484
|
|
| BLAKE2b-256 |
3017a69fa0dcc393c92537e9edf3419f2daf547d8cf9419e8c2ee2d85740815c
|
File details
Details for the file harmonyos_dev_mcp-0.7.5-py3-none-any.whl.
File metadata
- Download URL: harmonyos_dev_mcp-0.7.5-py3-none-any.whl
- Upload date:
- Size: 85.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb3ab6930658541a6d25df0636e59d6cdf8dd50d97ab7e9ad6c47a169fe4aa70
|
|
| MD5 |
cc7b33e8c7fbfbd1bdd3de5b5cc7f0e9
|
|
| BLAKE2b-256 |
df6c70c898f5385cb9694b46a9341f67b7b1ee7bdcba19ef1030a44a8b31746b
|