Skip to content
LangChain

harmonyos for LangChain

io.github.fadinglight9291117/harmonyos

MCP server for HarmonyOS development - interact with projects, devices, and applications

client:LangChain transport:stdio runtime:npm

Install harmonyos in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "harmonyos": {
            "transport": "stdio",
            "command": "npx",
            "args": ["-y", "mcp-harmonyos"],
        }
})

tools = await client.get_tools()

get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs

harmonyos in other clients