ROS MCP is a MCP server designed for controlling robots in ROS environments using natural language. It supports communication via ROS topics, services, and actions, and works with any ROS message type. - Socket Server (socketserver.py): A lightweight server that runs on localhost:8765 to handle GUI-related operations. It receives instructions from the MCP server to launch tools such as Gazebo or r
Add this skill
npx mdskills install Yutarop/ros-mcpComprehensive ROS2 control with clear architecture, excellent demos, and detailed setup guidance
1## ROS MCP2[](https://archestra.ai/mcp-catalog/yutarop__ros-mcp)345**ROS MCP** is a MCP server designed for controlling robots in ROS environments using natural language.6It supports communication via ROS topics, services, and actions, and works with any ROS message type.78## Demo9#### Test to see if ros topics, services, and actions can be used.10https://github.com/user-attachments/assets/61143c37-fb73-4998-9cbc-844d92ae61d91112##### Prompt used (Topic)13> Open gazebo with TurtleBot3 and publish topic to move it.1415##### Prompt used (Service)16> Show me service list and call service to reset the world in Gazebo.1718##### Prompt used (Action)19> Show me action list and call action to move the TurtleBot3 forward for 1m.2021## Components22- **Socket Server** ([`socket_server.py`](https://github.com/Yutarop/ros-mcp/blob/main/src/socket_server.py)): A lightweight server that runs on localhost:8765 to handle GUI-related operations.23It receives instructions from the MCP server to launch tools such as `Gazebo` or `rqt_graph` on the local display.2425- **MCP Server** ([`ros-general.py`](https://github.com/Yutarop/ros-mcp/blob/main/ros-general.py)): A Python-based server that implements the MCP.26It processes natural language input, maps it to ROS commands, and communicates with the socket server.27To enable node communication between the MCP server and the local machine, both must be configured with the same `ROS_DOMAIN_ID` on the same local network.2829## Overview of MCP Tools30- `Topic Management`: List, monitor, and publish to ROS2 topics31- `Node Control`: List and inspect running ROS2 nodes32- `Service Interaction`: Call ROS2 services with custom33- `Action Support`: Send goals to ROS2 actions34- `GUI Integration`: Launch ROS2 GUI tools via WebSocket server35- `Environment Debugging`: Check ROS2 setup and configuration36- `Process Management`: Clean up running ROS2 processes3738Please refer [here](https://github.com/Yutarop/ros-mcp/wiki/Available-Tools) for more details.3940## Getting Started41#### Requirements42- ROS2 Humble Hawksbill (This project has only been tested with ROS2 Humble. Compatibility with other ROS2 distributions is not guaranteed.)43- claude desktop ([Linux](https://github.com/aaddrick/claude-desktop-debian), [macOS](https://claude.ai/download) and [Windows](https://claude.ai/download))44- Python 3.10+45- websockets >= 15.0.146- uv package manager ([Installing uv](https://docs.astral.sh/uv/getting-started/installation/))47- Other dependencies as listed in `pyproject.toml`4849### Installation50#### Git clone and install websockets package51```bash52git clone git@github.com:Yutarop/ros-mcp.git53cd ros-mcp54pip install "websockets>=15.0.1"55```5657#### Activate .venv and install dependencies58```bash59uv venv60source .venv/bin/activate61uv pip install -e .62```6364#### Claude Settings (`claude_desktop_config.json`)65To use the MCP server correctly with Claude Desktop, you need to modify the claude_desktop_config.json file with appropriate values.66```67{68 "mcpServers": {69 "ros-general": {70 "command": "uv",71 "args": [72 "--directory",73 "/ABSOLUTE/PATH/TO/PARENT/FOLDER/ros-mcp",74 "run",75 "bash",76 "-c",77 "export ROS_LOG_DIR=/tmp && export ROS_DOMAIN_ID=${ROS_DOMAIN_ID:-YOUR_ROS_DOMAIN_ID} && source /opt/ros/humble/setup.bash && python3 /ABSOLUTE/PATH/TO/PARENT/FOLDER/ros-general.py"78 ]79 }80 }81}82```83##### **💡 Replace the following placeholders:**84- `/ABSOLUTE/PATH/TO/PARENT/FOLDER/ros-mcp`85Replace with the absolute path the ros-mcp directory.86For example: /home/ubuntu/ros-mcp8788- `YOUR_ROS_DOMAIN_ID`89 Replace with the ROS domain ID used in your environment to enable ROS communication between the MCP server and your local machine. If you're not sure what your current domain ID is, you can check it by running the following command in your terminal:90 ```bash91 echo $ROS_DOMAIN_ID92 ```93 If nothing is printed, the domain ID is not set, and the default value 0 will be used.94 Alternatively, you can set it manually using the following command:95 ```bash96 export ROS_DOMAIN_ID=10 # Replace 10 with your desired domain ID97 ```98- `/ABSOLUTE/PATH/TO/PARENT/FOLDER/ros-general.py`99Replace with the absolute path to your ros-general.py script.100For example: /home/ubuntu/ros-mcp/ros-general.py101102## Running the Servers103#### Start MCP server104Make sure your virtual environment is activated before running the MCP server:105```bash106(ros-mcp) $ uv run ros-general.py107```108#### Start socket server109```bash110python3 socket_server.py111```112 > 💡not in the virtual environment!113114
Full transparency — inspect the skill content before installing.