ROS MCP
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.
Demo
Test to see if ros topics, services, and actions can be used.
https://github.com/user-attachments/assets/61143c37-fb73-4998-9cbc-844d92ae61d9
Prompt used (Topic)
Open gazebo with TurtleBot3 and publish topic to move it.
Prompt used (Service)
Show me service list and call service to reset the world in Gazebo.
Prompt used (Action)
Show me action list and call action to move the TurtleBot3 forward for 1m.
Components
Socket Server (
socket_server.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 asGazeboorrqt_graphon the local display.MCP Server (
ros-general.py): A Python-based server that implements the MCP. It processes natural language input, maps it to ROS commands, and communicates with the socket server. To enable node communication between the MCP server and the local machine, both must be configured with the sameROS_DOMAIN_IDon the same local network.






