Skip to main content
Glama
Unitree Go2 MCP Server
by lpigeon

Unitree Go2 MCP 服务器

ROS 2静态徽章

Unitree Go2 MCP 服务器是基于模型上下文协议 (MCP) 构建的服务器,用户可以使用由大型语言模型 (LLM) 解释的自然语言命令来控制 Unitree Go2 机器人。这些命令会被翻译成 ROS2 指令,从而使机器人能够执行相应的动作。

要求

  • Unitree Go2机器人

  • Ubuntu 20.04 或 22.04

  • ROS2 环境: Humble (推荐)或Foxy

Related MCP server: nUR MCP Server

MCP 功能

您可以在MCPFUNCTIONS.md中找到函数列表。

安装

1. 设置unitree_ros2环境

https://github.com/unitreerobotics/unitree_ros2

  • 您需要完成Step 2: Connect and test 。

2. 克隆此存储库

git clone https://github.com/lpigeon/unitree-go2-mcp-server.git
cd unitree-go2-mcp-server

3. uv安装

  • 要安装uv ,您可以使用以下命令:

curl -LsSf https://astral.sh/uv/install.sh | sh

或者

pip install uv
  • 创建虚拟环境并激活它(可选)

uv venv
source .venv/bin/activate

4. MCP 服务器配置

将 MCP 设置设置为 mcp.json。

请记住,配置必须在连接到 Go2 的 PC 上完成。

{
    "mcpServers": {
        "unitree-go2-mcp-server": {
            "command": "uv",
            "args": [
              "--directory",
              "/ABSOLUTE/PATH/TO/PARENT/FOLDER/unitree-go2-mcp-server",
              "run",
              "server.py"
            ]
        }
    }
}

如果您使用 Claude Desktop,您可以使用以下命令找到 mcp.json:

  • MacOS

code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • Linux(Ubuntu)

您可以安装 Claude Desktop 来使用claude-desktop-debian 。

code ~/.config/Claude/claude_desktop_config.json
  • 视窗

code $env:AppData\Claude\claude_desktop_config.json

如何使用

1. 设置UNITREE_ROS2_SETUP_SH_PATH 。

  • 打开server.py并更改UNITREE_ROS2_SETUP_SH_PATH (例如/home/lpigeon/unitree_ros2/setup.sh )

如果您使用rosbridge ,则需要设置 IP 和端口来连接 rosbridge (可选)。

  • 打开server.py并更改你的LOCAL_IP 、 ROSBRIDGE_IP和ROSBRIDGE_PORT 。( ROSBRIDGE_PORT的默认值为9090 )

2.检查Go2机器人是否连接到网络。

在终端中输入以下命令。

ros2 topic list

您应该看到以下主题:

/wirelesscontroller

如果您没有看到该主题,请检查 Go2 机器人与网络之间的连接。

3. 运行任何已导入unitree-go2-mcp-server AI 系统。

4. 输入“让Go2机器人以0.5米/秒的速度向前移动3秒。”。

5.检查Go2机器人的运动。

6. 输入您想做的事情并尽情享受吧!

情境理解

当你输入“Go2 看起来累了”这样的命令时,LLM 会根据上下文进行解释——理解机器人可能需要休息或进行某种形式的伸展!

简单任务

该任务是一个全面的演示任务,展示了Unitree Go2机器人的避障、方向改变和用户交互能力。

贡献

欢迎投稿!
无论您是修正拼写错误、添加新功能还是提出改进建议,我们都非常感谢您的帮助。
请遵循贡献指南以获取有关如何为该项目做出贡献的更多详细信息。

Available Tools

12 tools
danceD

Inputs: no named parameters.

get_topicsD

Inputs: no named parameters.

greetD

Inputs: no named parameters.

jump_forwardD

Inputs: no named parameters.

loveD

Inputs: no named parameters.

pounceD

Inputs: no named parameters.

pub_wirelesscontrollerD

Inputs: keys (required), linear_x (required), linear_y (required), pitch (required), +2 more.

shake_handsD

Inputs: no named parameters.

sit_downD

Inputs: no named parameters.

stand_up_from_a_fallD

Inputs: no named parameters.

stopD

Inputs: no named parameters.

stretchD

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    D1.6/5.0

    Scored across 12 tools

    Disambiguation3/5

    The tools have some distinct purposes like movement (jump_forward, pounce, sit_down) and social interactions (greet, shake_hands), but there is overlap and ambiguity. For example, 'dance', 'love', and 'stretch' are vague and could be confused with other expressive or movement actions, making it unclear when to use one over another.

    Naming Consistency2/5

    Naming is inconsistent with mixed conventions: some use verb_noun (e.g., 'jump_forward', 'sit_down', 'stand_up_from_a_fall'), others are single verbs or nouns (e.g., 'dance', 'greet', 'love', 'stop'), and one uses an abbreviation ('pub_wirelesscontroller'). This lack of pattern makes the set harder to navigate and predict.

    Tool Count4/5

    With 12 tools, the count is reasonable for a robot control server, covering various actions from basic movements to social behaviors. It's slightly on the higher side but still manageable, as each tool appears to serve a specific function in the domain of robot interaction and control.

    Completeness3/5

    The tool set covers expressive and movement actions for a robot, but there are notable gaps. For instance, it lacks core navigation tools (e.g., move, turn) and status queries (e.g., get_battery, get_pose), which are essential for comprehensive robot control. The surface is functional but incomplete for advanced agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A Python-based server that enables AI assistants to control robots by integrating the Model Context Protocol (MCP) with ROS 2, allowing for natural language commands that translate into robot movement via the /cmd\_vel topic.
      84
      -
    • F
      license
      C
      quality
      D
      maintenance
      A Model Context Protocol server that enables natural language interactive control of Universal Robots collaborative robots, allowing users to control robot motion, monitor status, and execute programs through direct commands to large language models.
      39
      7
      -