MCP HarmonyOS

Provides a lightweight MCP server to query HarmonyOS devices, projects, and applications and coordinate build and deployment tasks.
  • typescript

1

GitHub Stars

typescript

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "fadinglight9291117-mcp-harmonyos": {
      "command": "npx",
      "args": [
        "mcp-harmonyos"
      ]
    }
  }
}

You can run this MCP server to interact with HarmonyOS projects, devices, and applications from AI assistants. It enables quick discovery, project inspection, and deployment workflows, helping you streamline HarmonyOS development tasks with structured queries and orchestration of external tooling.

How to use

Use an MCP client to connect to the HarmonyOS MCP server and perform practical workflows. You can list connected devices, inspect project metadata, view modules, verify build outputs, and manage installed applications on devices. When you combine MCP queries with external build and deployment commands, you can execute end-to-end workflows such as building a project, validating outputs, deploying packages to a device, and launching the app.

How to install

Prerequisites: Node.js 18 or later. HarmonyOS DevEco Studio is recommended to provide the hdc command-line tools, and hdc should be available in your system PATH.

# Global installation (recommended for most users)
npm install -g mcp-harmonyos

# Or run directly with npx
npx mcp-harmonyos

Configuration and startup

There are multiple ways to run and configure the MCP server. The server can be started via npm scripts or using npx for ad-hoc usage. Use the method that best fits your workflow and environment.

# Start the server via npm script (after installation from the repository)
npm run start

Notes on configuration and usage

The server exposes a set of tools that let you query devices, projects, and applications, as well as check build outputs. You can combine these with your preferred build and deployment steps to complete common workflows.

Troubleshooting quick references

If commands fail to run, ensure DevEco Studio tooling is installed and hdc is accessible from your PATH. If no devices are detected, enable developer options on the device and USB debugging, then re-check connectivity with the hdc tool.

Available tools

harmonyos_list_devices

List all connected HarmonyOS devices and return each device's UDID and connection status.

harmonyos_get_device_info

Fetch detailed information about a specific HarmonyOS device using its UDID.

harmonyos_get_project_info

Obtain HarmonyOS project metadata from the app.json5 file, including bundleName, version, and modules.

harmonyos_list_modules

List all modules in a HarmonyOS project with their type (HAP, HSP, HAR) and paths.

harmonyos_check_build_outputs

Check for existing build outputs in the project and return build artifacts and directories.

harmonyos_list_installed_apps

List all apps installed on a target HarmonyOS device by its UDID.

harmonyos_get_app_info

Get detailed information about an installed application by its bundleName on a device.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational