Skip to main content

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+
  • hdc
  • uv

Tool Groups

  • General: list_devices query_package logs_query
  • Build: build_app install_app run_app uninstall_app
  • UI: screenshot click_element long_press_element input_text swipe drag press_key find_element
  • E2E: get_ui_tree list_windows wait_element

Call Notes

  • build_app is a long-running tool.
  • Set MCP tools/call timeout to at least 60s.
  • For cold builds, 120s is the recommended timeout.
  • logs_query supports mode="errors" and mode="markers".
  • logs_query defaults to realtime sampling and does not fallback to historical logs unless fallback_to_historical=true.
  • logs_query.package_name is no longer reduced to a single pid by default.
  • query_package.info_type only supports list, abilities, main_ability, and permissions.
  • query_package.info_type="basic" is not supported.
  • input_text.element_handle must be an object returned by find_element or wait_element.
  • Do not pass input_text.element_handle as a JSON string.

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
  • docs/query_package.md

Project details


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.3.tar.gz (80.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harmonyos_dev_mcp-0.7.3-py3-none-any.whl (79.3 kB view details)

Uploaded Python 3

File details

Details for the file harmonyos_dev_mcp-0.7.3.tar.gz.

File metadata

  • Download URL: harmonyos_dev_mcp-0.7.3.tar.gz
  • Upload date:
  • Size: 80.8 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

Hashes for harmonyos_dev_mcp-0.7.3.tar.gz
Algorithm Hash digest
SHA256 08f8c0d0c86a3f93ce7d4fbe46e57f6a59badc25cc0843954f040c3ea9ff4aff
MD5 ca468613e130d83774ed7ae264ae59ca
BLAKE2b-256 30381be074f08fd30eb80243f0d26c9c8798733043d6a08f182688e2e6c01948

See more details on using hashes here.

File details

Details for the file harmonyos_dev_mcp-0.7.3-py3-none-any.whl.

File metadata

  • Download URL: harmonyos_dev_mcp-0.7.3-py3-none-any.whl
  • Upload date:
  • Size: 79.3 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

Hashes for harmonyos_dev_mcp-0.7.3-py3-none-any.whl
Algorithm Hash digest
SHA256 56de2de14734229fd655600e3938547b1e24dcf412c0afddc8a2123690f56631
MD5 9b0ba49d1f17cb0aa5132ef81065fe38
BLAKE2b-256 4906170d9a747fd82290a2b1adac4c1304f7f31130bfaa4da64952712ed8019e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page