Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

unitree-go2-mcp-server

MCP.Pizza Chef: lpigeon

The Unitree Go2 MCP Server is a ROS2-integrated MCP server that enables natural language control of the Unitree Go2 robot. It translates LLM-interpreted commands into ROS2 instructions, allowing seamless robot operation through conversational inputs. Designed for Ubuntu 20.04/22.04 with ROS2 Humble or Foxy, it bridges advanced language models and robotic control for intuitive interaction.

Use This MCP server To

Translate natural language commands into robot ROS2 instructions Control Unitree Go2 robot movements via conversational inputs Integrate LLM-driven command interpretation with ROS2 robotic systems Enable voice or text-based robot control in research or development Automate robot tasks using natural language workflows Test and prototype robotic commands using LLM and MCP protocol

README

Unitree Go2 MCP Server

ROS 2 Static Badge

The Unitree Go2 MCP Server is a server built on the Model Context Protocol (MCP) that enables users to control the Unitree Go2 robot using natural language commands interpreted by a Large Language Model (LLM). These commands are translated into ROS2 instructions, allowing the robot to perform corresponding actions.

Unitree Go2 Server MCP server

Requirements

  • Unitree Go2 robot
  • Ubuntu 20.04 or 22.04
  • ROS2 environment : Humble(recommended) or Foxy

MCP Functions

You can find the list of functions in the MCPFUNCTIONS.md.

Installation

1. Setup unitree_ros2 environment

https://github.com/unitreerobotics/unitree_ros2

  • You need to complete the setup up to Step 2: Connect and test in the repository linked above.

2. Clone this repository

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

3. uv Installation

  • To install uv, you can use the following command:
curl -LsSf https://astral.sh/uv/install.sh | sh

or

pip install uv
  • Create virtual environment and activate it (Optional)
uv venv
source .venv/bin/activate

4. MCP Server Configuration

Set MCP setting to mcp.json.

Please keep in mind that the configuration must be done on the PC connected to the Go2.

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

If you use Claude Desktop, you can find mcp.json using the following command:

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

You can install Claude Desktop to use claude-desktop-debian.

code ~/.config/Claude/claude_desktop_config.json
  • Windows
code $env:AppData\Claude\claude_desktop_config.json

How To Use

1. Set UNITREE_ROS2_SETUP_SH_PATH.

  • Open server.py and change your UNITREE_ROS2_SETUP_SH_PATH (eg. /home/lpigeon/unitree_ros2/setup.sh)
If you use rosbridge, you need Set IP and Port to connect rosbridge (Optional).
  • Open server.py and change your LOCAL_IP, ROSBRIDGE_IP and ROSBRIDGE_PORT. (ROSBRIDGE_PORT's default value is 9090)

2. Check the Go2 robot is connected to the network.

Type the following command in the terminal.

ros2 topic list

You should see the following topic:

/wirelesscontroller

If you don't see the topic, check the connection between the Go2 robot and the network.

3. Run any AI system that has imported unitree-go2-mcp-server.

4. Type "Make the Go2 robot move forward at a velocity of 0.5 m/s for 3 seconds.".

5. Check the Go2 robot's movement.

6. Type what you want to do and Enjoy!

Contextual Understanding

When you type a command like "It looks like the Go2 is getting tired," the LLM interprets this contextually — understanding that the robot might need a break or some form of stretching!

Simple Task

This task is a comprehensive demo task showcasing the Unitree Go2 robot's obstacle avoidance, direction changing, and user interaction capabilities.

Contributing

Contributions are welcome!
Whether you're fixing a typo, adding a new function, or suggesting improvements, your help is appreciated.
Please follow the contributing guidelines for more details on how to contribute to this project.

unitree-go2-mcp-server FAQ

What operating systems are supported by the Unitree Go2 MCP Server?
It supports Ubuntu 20.04 and 22.04, optimized for ROS2 Humble or Foxy environments.
What robotic platform does this MCP server support?
It is specifically designed for the Unitree Go2 robot.
How does the server interpret natural language commands?
It uses Large Language Models (LLMs) to parse commands and convert them into ROS2 instructions.
Is ROS2 required to use this MCP server?
Yes, a ROS2 environment (Humble or Foxy) is required to interface with the robot.
Can this server work with other robots besides Unitree Go2?
It is tailored for Unitree Go2; adapting it for other robots would require customization.
What LLM providers can be used with this server?
It can work with OpenAI, Anthropic Claude, and Google Gemini models for command interpretation.
How does this MCP server enhance robot control workflows?
It enables intuitive, natural language-based control, reducing the need for manual coding of commands.
What are the hardware requirements to run this server?
A Unitree Go2 robot and a compatible Ubuntu system with ROS2 installed are required.