Skip to main content
Glama
megaacheyounes

ohos-mcp-unofficial

README.md
# Unofficial OpenHarmony/HarmonyOS MCP Server (English)

[![Project Status: Active](https://img.shields.io/badge/Project%20Status-Active-green.svg)](https://github.com/megaacheyounes/ohos-mcp-unofficial)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

This is an unofficial Model Context Protocol (MCP) server that brings the power of **HarmonyOS & OpenHarmony English Documentation** directly to your AI assistants. It indexes over 5,000 official documentation files for instant, high-context retrieval.

---

## 🚀 Quick Start: Zero-Install Method (Recommended)

The easiest way to use this is via `npx`. No cloning required!

### 1. Claude Desktop
Add this to your `claude_desktop_config.json`:
```json
{
  "mcpServers": {
    "ohos-docs": {
      "command": "npx",
      "args": ["-y", "github:megaacheyounes/ohos-mcp-unofficial"]
    }
  }
}
```


### 2. ChatGPT Codex CLI
Add the server using the following command:
```bash
codex mcp add ohos -- npx -y github:megaacheyounes/ohos-mcp-unofficial
```

### 3. OpenCode AI
In the OpenCode settings or config:
- **Command**: `npx`
- **Arguments**: `-y github:megaacheyounes/ohos-mcp-unofficial`

### 4. Cursor / Windsurf / IDEs
Add a new MCP server in the settings:
- **Type**: `command`
- **Command**: `npx -y github:megaacheyounes/ohos-mcp-unofficial`

### 5. Gemini CLI
In your `.geminirc`:
```json
{
  "mcpServers": {
    "ohos": {
      "command": "npx",
      "args": ["-y", "github:megaacheyounes/ohos-mcp-unofficial"]
    }
  }
}
```

---

## 🖼️ Multimodal Support

The documentation has been optimized for AI agents with "vision" capabilities.
- **Remote Images**: All diagrams and screenshots are linked directly to the official Gitee repository.
- **Agent Action**: Multimodal agents can follow these links to download and analyze visual architecture diagrams, UI mockups, and flowcharts to provide more accurate explanations.

---

## 🌐 Understanding the Two Modes

### 1. Stdio Mode (Default)
Used by local assistants (Claude Desktop, Cursor, etc.). The assistant starts the server as a background process.

### 2. HTTP Mode
Use this for remote access or web integrations.
```bash
# Start server
npx -y github:megaacheyounes/ohos-mcp-unofficial --http --port 3456
```
- **Health Check**: `http://localhost:3456/health`
- **Tool Calls**: POST to `http://localhost:3456/call`

---

## 🧰 Available Tools

-   `find_docs`: Search documentation by keywords (e.g., "Navigation", "Canvas").
-   `read_doc`: Retrieve the full Markdown content of a specific document.
-   `list_doc_topics`: Browse the documentation hierarchy.

---

## 🌟 Credits

Inspired by [arkts-helper](https://github.com/LongLiveY96/arkts-helper). This version is specifically optimized for the English-speaking community using OpenHarmony 6.1 (API 23) open-source documentation.

## ⚖️ Disclaimer

This is an unofficial community project and is not affiliated with, maintained by, or endorsed by Huawei Technologies Co., Ltd. or the OpenHarmony project.

Parts of this project were generated or assisted by **AI**. 

Use of this tool and the documentation it retrieves is at your own risk. Always verify critical information against the [official documentation](https://developer.huawei.com).


## 📄 License
MIT © [megaacheyounes](https://github.com/megaacheyounes)

TDQS

A4.2/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: searching, reading, and listing documentation topics. There is no overlap or ambiguity between them.

Naming Consistency5/5

All three tools follow the consistent verb_noun pattern with underscores: find_docs, read_doc, list_doc_topics. The naming is uniform and predictable.

Tool Count5/5

Three tools is well-scoped for a documentation lookup server. Each tool addresses a necessary step in the workflow without unnecessary bloat.

Completeness5/5

The tool set covers the full documentation workflow: discover topics, search for specific docs, and read full content. No critical operations are missing for the stated purpose.

Maintenance

ActivityInactive
ResponsivenessUnresponsive