
xixianliang/harmonyos-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
xixianliang/harmonyos-mcp-server는 MCP 서버 후보로 https://github.com/xixianliang/harmonyos-mcp-server.에서 가져온
개요
xixianliang/harmonyos-mcp-server는 MCP 서버 후보로 https://github.com/xixianliang/harmonyos-mcp-server.에서 가져온
개요(AI 번역)
HarmonyOS MCP 서버
소개
이것은 조화OS Device를 조작하기위한 MCP 서버입니다.
https://github.com/user-attachments/assets/7af7f5af-e8c6-4845-8d92-cd0ab30bfe17] [T0]] [T0]] [T0]] [T0]] [T0]] [T0]] [T0]] [T0] [T0] [T0]] [T0] [T0] [T0]] [T0]] [T0] [T0] [T0] [T0] [T0]] [T0] [T0]] [T0] [T0] [T0]] [T0]] [T0] [T0] [T0]] https://github.com/user-attachments/assets/7af7f5af-e8c6-4845-8d92-cd0ab30bfe17] https://github.com/user-attachments/assets/7af7f5af-e8c6-4845-8d92-cd0ab30bfe17]]] https://github.com/user-attachments/assets/7af7f5af-e8c6-4845-8d92-cd0ab30bfe17]]]]]] [[https://github.com/user-attachments/assets/7af7f5af-e8c6-4845-8d92-cd0ab30bfe17]]]]]]] [[[[[[https://github.com/user-attachments/assets/7af7f5af-e8c6-4845-8d92-cd0ab30bfe17]]]]]]]]]]]]]] [[[[[[[https://github.com/user-attachments/assets/7af7f5af-e8c6-4845-8d92-cd0ab30bfe17]]]]]]]]]]]]]]]]]] [[[[[[[[[[[[[[[[[[[[[[
빠른 시작
설치
-
이 repo를 복제
-
환경 설정.
사용법
###1.Claude 데스크탑
Claude Desktop을 사용하여 도구를 시도 할 수 있습니다.
###2.Openai SDK를 openai-agents SDK를 사용하여 mcp 서버를 시도할 수 있습니다. 여기에 예
# # # # 3.Langchain의
LLM Agent Framework를 사용하여 작업 흐름을 설계할 수 있습니다. 여기에 예
server.py에서 시스템 프롬프트 작성
load_mcp_prompt] 함수를 사용하여 mcp 서버에서 프롬프트를 얻을 수 있습니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
Intro
This is a MCP server for manipulating harmonyOS Device.
https://github.com/user-attachments/assets/7af7f5af-e8c6-4845-8d92-cd0ab30bfe17
Quick Start
Installation
- Clone this repo
git clone https://github.com/XixianLiang/HarmonyOS-mcp-server.git
cd HarmonyOS-mcp-server
- Setup the envirnment.
uv python install 3.13
uv sync
Usage
1.Claude Desktop
You can use Claude Desktop to try our tool.
2.Openai SDK
You can also use openai-agents SDK to try the mcp server. Here’s an example
"""
Example: Use Openai-agents SDK to call HarmonyOS-mcp-server
"""
import asyncio
import os
from agents import Agent, Runner, gen_trace_id, trace
from agents.mcp import MCPServerStdio, MCPServer
async def run(mcp_server: MCPServer):
agent = Agent(
name="Assistant",
instructions="Use the tools to manipulate the HarmonyOS device and finish the task.",
mcp_servers=[mcp_server],
)
message = "Launch the app `settings` on the phone"
print(f"Running: {message}")
result = await Runner.run(starting_agent=agent, input=message)
print(result.final_output)
async def main():
# Use async context manager to initialize the server
async with MCPServerStdio(
params={
"command": "/bin/uv",
"args": [
"--directory",
"/harmonyos-mcp-server",
"run",
"server.py"
]
}
) as server:
trace_id = gen_trace_id()
with trace(workflow_name="MCP HarmonyOS", trace_id=trace_id):
print(f"View trace: https://platform.openai.com/traces/trace?trace_id={trace_id}\n")
await run(server)
if __name__ == "__main__":
asyncio.run(main())
3.Langchain
You can use LangGraph, a flexible LLM agent framework to design your workflows. Here’s an example
"""
langgraph_mcp.py
"""
server_params = StdioServerParameters(
command="/home/chad/.local/bin/uv",
args=["--directory",
".",
"run",
"server.py"],
)
#This fucntion would use langgraph to build your own agent workflow
async def create_graph(session):
llm = ChatOllama(model="qwen2.5:7b", temperature=0)
#!!!load_mcp_tools is a langchain package function that integrates the mcp into langchain.
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →