HarmonyOS MCP
๐ ๐ - Control HarmonyOS-next devices with AI through MCP. Support device control and UI automation.
What is HarmonyOS MCP?
HarmonyOS MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to ๐ ๐ - control harmonyos-next devices with ai through mcp. support device control and ui automation.
๐ ๐ - Control HarmonyOS-next devices with AI through MCP. Support device control and UI automation.
This server falls under the Cloud Services and APIs categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- ๐ ๐ - Control HarmonyOS-next devices with AI through MCP. Su
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx harmonyosConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use HarmonyOS MCP
The HarmonyOS MCP Server is a Python-based MCP integration that enables AI assistants to control and automate HarmonyOS-next devices connected via ADB (Android Debug Bridge), exposing device control and UI automation capabilities through the Model Context Protocol. It allows agents to launch applications, execute device commands, and drive UI interactions on Huawei HarmonyOS devices as if they had hands-on access. Developers building HarmonyOS apps who want AI-assisted testing and automation, or power users who want to control their HarmonyOS phone through natural language commands, will find this server bridges the gap between conversational AI and device control.
Prerequisites
- Python 3.13 (the project specifically pins to this version via uv)
- uv package manager installed (https://github.com/astral-sh/uv)
- A HarmonyOS-next device connected to your computer with USB debugging enabled
- An MCP client such as Claude Desktop, or any agent framework supporting the Model Context Protocol (LangGraph and OpenAI SDK are also supported)
Clone the repository
Download the HarmonyOS MCP Server source code to your local machine.
git clone https://github.com/XixianLiang/HarmonyOS-mcp-server.git
cd HarmonyOS-mcp-serverInstall Python 3.13 and project dependencies via uv
Use uv to install the pinned Python version and sync all project dependencies. This ensures the exact environment the server expects.
uv python install 3.13
uv syncConnect your HarmonyOS device
Connect your HarmonyOS-next device via USB and enable USB debugging in developer options. Verify the device is detected.
# Verify device connectivity (using hdc, Huawei's device connector tool)
hdc list targetsAdd the server to your MCP client configuration
Open your MCP client configuration (e.g. claude_desktop_config.json) and add the HarmonyOS server, using the uv run command to launch server.py with the correct Python environment.
{
"mcpServers": {
"harmonyos": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/HarmonyOS-mcp-server",
"run",
"python",
"server.py"
]
}
}
}Restart your MCP client and verify
Restart Claude Desktop or your chosen MCP client. Ask your AI assistant to launch a simple app on the connected device to verify the server is working.
HarmonyOS MCP Examples
Client configuration (Claude Desktop)
Add this block to claude_desktop_config.json, replacing the directory path with the absolute path where you cloned the repository.
{
"mcpServers": {
"harmonyos": {
"command": "uv",
"args": [
"--directory",
"/Users/yourname/HarmonyOS-mcp-server",
"run",
"python",
"server.py"
]
}
}
}Prompts to try
Once connected with a HarmonyOS device attached, use these prompts to control the device through your AI assistant.
- "Launch the Settings app on the phone."
- "Open the Camera application on the connected HarmonyOS device."
- "Take a screenshot of the current screen on the device."
- "Navigate back to the home screen on the phone."
- "Launch the app with package name com.example.myapp on the connected device."Troubleshooting HarmonyOS MCP
uv python install 3.13 fails or Python 3.13 is not found
Ensure uv is installed and up to date: run 'pip install -U uv' or follow the uv installation guide at https://github.com/astral-sh/uv. The project pins Python 3.13 specifically; using other Python versions may cause dependency resolution issues.
Device not detected or commands fail with device not found errors
Verify USB debugging is enabled on your HarmonyOS device under Settings > Developer Options. Run 'hdc list targets' to confirm the device appears. You may need to install Huawei's hdc (HarmonyOS Device Connector) tools if they are not already on your system.
Server starts but AI cannot control the device
Check that the connected device has granted debugging access (accept the USB debugging prompt on the device). Ensure the server.py entry point path is correct in your MCP configuration. Try running 'uv run python server.py' manually from the project directory to see any error output.
Frequently Asked Questions about HarmonyOS MCP
What is HarmonyOS MCP?
HarmonyOS MCP is a Model Context Protocol (MCP) server that ๐ ๐ - control harmonyos-next devices with ai through mcp. support device control and ui automation. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install HarmonyOS MCP?
Follow the installation instructions on the HarmonyOS MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with HarmonyOS MCP?
HarmonyOS MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is HarmonyOS MCP free to use?
Yes, HarmonyOS MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
HarmonyOS MCP Alternatives โ Similar Cloud Services Servers
Looking for alternatives to HarmonyOS MCP? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
โ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
โ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
โ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
โ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
โ 26.7kๆฌ้กน็ฎไธบxiaozhi-esp32ๆไพๅ็ซฏๆๅก๏ผๅธฎๅฉๆจๅฟซ้ๆญๅปบESP32่ฎพๅคๆงๅถๆๅกๅจใBackend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
โ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up HarmonyOS MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use HarmonyOS MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.