ROS MCP Server

Inspect and command ROS 1 and ROS 2 robots from an MCP client through rosbridge

By Robot MCP Python Local · stdio Developer tools

66 popularity score ★ 1.5k ↓ 1.5k/mo

Connect your client

Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add ros -- uvx ros-mcp --transport=stdio
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp",
        "--transport=stdio"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp",
        "--transport=stdio"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "ros": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "ros-mcp",
        "--transport=stdio"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.ros]
command = "uvx"
args = ["ros-mcp", "--transport=stdio"]
Gemini CLITerminal
gemini mcp add --scope user ros uvx -- ros-mcp --transport=stdio

What it does

ROS MCP Server is a Python server that talks to a robot's ROS graph over a rosbridge WebSocket, so an MCP client can look around the robot and act on it. It works with ROS 2 distributions such as Jazzy and Humble as well as ROS 1, and it needs no changes to the robot's own code: the only thing added on the robot side is the rosbridge node.

Once connected, the client can list topics, services, actions, nodes and parameters, read their types (custom message types included), take one message or a timed batch from a topic, publish sequences of messages, call services, send and cancel action goals, and get, set or delete parameters. Camera frames received from image topics are saved as a JPEG and shown to the client. A set of tools reads robot specification files shipped with the package (for example a Unitree Go2 profile) and detects which ROS version the robot runs.

Version 3.1.2 registers 30 tools across eight modules (ros_mcp/tools/__init__.py), more than the README's feature list suggests. The robot address is not a setting: the server starts pointed at 127.0.0.1:9090 and the client changes it with connect_to_robot. It runs over stdio by default and can serve HTTP or streamable HTTP with --transport, --host and --port (ros_mcp/main.py).

What it needs

RuntimePython 3.10+

Python 3.10+ and uv on the machine running the client (the docs' command is uvx). A robot or simulator with ROS 1 or ROS 2 and the rosbridge_server package installed and launched (ros2 launch rosbridge_server rosbridge_websocket_launch.xml), reachable from that machine on the same network or over a VPN. On Windows the docs run it inside WSL.

Limits

It reaches ROS only through rosbridge; without a running rosbridge node every tool fails. It holds one robot connection at a time, starting at 127.0.0.1:9090 until connect_to_robot is called. publish_for_durations refuses rates above 100 Hz; subscribe_for_duration stops after 100 messages by default (max_messages). Image frames are written to ./camera/received_image.jpeg relative to where the server was started, overwriting the previous one. HTTP mode binds to 127.0.0.1 on port 9000 unless --host and --port are given, and the docs describe no sign-in for it.

Who it suits

Robotics developers and researchers who already run ROS and want a client to explore a robot's topics and services, debug it or drive it in plain language, in simulation or on hardware. It is local and community-made, not from Open Robotics, and its tools can move a real robot, so it fits a lab or test setup where someone watches the robot. Pick something else if your robot does not use ROS, or if you cannot run rosbridge on it.

Tools 30

connect_to_robot
Set the rosbridge IP and port and check the robot answers
ping_robots
Ping one or more IPs and test whether given ports are open
get_verified_robot_spec
Read a robot specification file bundled with the package
get_verified_robots_list
List the bundled robot specification files
detect_ros_version
Report whether the robot runs ROS 1 or ROS 2 and which distro
get_topics
List all topics and their types
get_topic_type
Return the message type of one topic
get_topic_details
Show a topic's type, publishers and subscribers
get_message_details
Show the field structure of a message type
subscribe_once
Wait for and return a single message from a topic
subscribe_for_duration
Collect messages from a topic for a set time
publish_for_durations
Publish a sequence of messages, each held for a duration
get_services
List all services
get_service_type
Return the type of one service
get_service_details
Show a service's request and response fields
call_service
Call a service with a request payload
get_actions
List available actions
get_action_details
Show an action's goal, result and feedback fields
get_action_status
Report the status of goals on an action
send_action_goal
Send a goal to an action server and wait for the result
cancel_action_goal
Cancel a running action goal by id
get_nodes
List running nodes
get_node_details
Show a node's publishers, subscribers and services
get_parameter
Read one parameter value
set_parameter
Change a parameter value
has_parameter
Check whether a parameter exists
delete_parameter
Remove a parameter
get_parameters
List the parameters of a node
get_parameter_details
Show a parameter's value and type
view_saved_image
Open a saved image file from disk and return it

Similar servers