Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Harmony Tools

FreeNot checked

MCP service that wraps HarmonyOS hdc commands

GitHubEmbed

About

MCP service that wraps HarmonyOS hdc commands

README

将 HarmonyOS 命令行工具(hdchvigor 等)封装为 MCP 服务,接入任意支持 MCP 的客户端,常用开发任务以结构化 JSON 返回。

快速上手

  • 前置条件:Python ≥3.11;已安装 HarmonyOS Command Line Tools。
  • 下载地址:HarmonyOS Command Line Tools
  • 配置必需环境变量:
# 解压后在 command-line-tools/sdk/default/openharmony/toolchains 目录下
export HDC_PATH=/path/to/hdc
# 解压后在 command-line-tools/bin 目录下
export HVIGORW_PATH=/path/to/hvigorw

安装

# 全局安装(推荐)
uv tool install git+<repository-url>

# 开发模式(本地源码)
uv pip install -e .

启动

  • stdio(默认):
    • uv run harmony-tools-mcp
  • http(调试/多客户端):
    • uv run harmony-tools --transport http
    • ./start_http_server.sh

客户端最小配置示例

  • stdio
{
  "mcpServers": {
    "harmony-tools": {
      "command": "harmony-tools-mcp",
      "env": {
        "HDC_PATH": "/path/to/hdc", 
        "HVIGORW_PATH": "/path/to/hvigorw"
      }
    }
  }
}
  • http
{
  "mcpServers": {
    "harmony-tools": {
      "transport": "http", 
      "url": "http://127.0.0.1:10005/mcp"}
  }
}

可用工具一览

  • list_targetsshell
  • hvigor_cleanhvigor_assemblehvigor_find_output
  • hdc_screenshothdc_install_app

常见问题(精简)

  • 找不到 hdc/hvigorw:检查并设置 HDC_PATHHVIGORW_PATH
  • 无响应或超时:适当提高超时或减少输出量。
  • 权限问题:设备开启开发者模式并授予访问权限。

开发者文档

详细技术说明(环境变量、运行模式、工具参数与返回结构、长示例、完整排障)见 docs/DEVELOPER.md

from github.com/99byte/harmony-tools

Installing Harmony Tools

This server has no published package — it is built from source. Open the repository and follow its README.

▸ github.com/99byte/harmony-tools

FAQ

Is Harmony Tools MCP free?

Yes, Harmony Tools MCP is free — one-click install via Unyly at no cost.

Does Harmony Tools need an API key?

No, Harmony Tools runs without API keys or environment variables.

Is Harmony Tools hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Harmony Tools in Claude Desktop, Claude Code or Cursor?

Open Harmony Tools on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Harmony Tools with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All development MCPs