提供大型语言模型机器人控制能力的MCP服务器
# 创建并激活虚拟环境
python -m venv .venv
.venv\Scripts\activate
# 安装依赖
pip install git+https://github.com/unitreerobotics/unitree_sdk2_python.git
pip install djitellopy
from modelcontextprotocol import Client
# 连接到MCP服务
client = Client.connect_stdio()
# 控制宇树机器人
client.call_tool("unitree_connect", {})
client.call_tool("unitree_move", {"velocity": 1.5})
# 控制DJI无人机
client.call_tool("dji_connect", {})
client.call_tool("dji_takeoff", {"height": 2.0})
unitree_connect:建立机器人连接unitree_move(velocity: float, duration: float):控制移动unitree_stop():紧急停止dji_connect:建立无人机连接dji_takeoff(height: float):飞至指定高度dji_land():安全着陆项目结构:
├── src/
│ ├── main.py # 主服务入口
│ ├── unitree_adapter.py # 宇树机器人适配器
│ └── dji_adapter.py # DJI无人机适配器
├── examples/ # 使用示例
├── requirements.txt # 依赖列表
└── README.md # 项目文档
欢迎提交Issue和PR,请遵循现有的代码风格并添加适当的测试。