/ Directory / Playground / ros-mcp-server
● Community robotmcp ⚡ Instant

ros-mcp-server

by robotmcp · robotmcp/ros-mcp-server

Let Claude or GPT drive a ROS-connected robot — publish topics, call services, read sensors — via rosbridge, no code changes.

robotmcp/ros-mcp-server connects AI models to ROS 1 and ROS 2 robots via rosbridge. Publish to topics, subscribe, call services and actions, set parameters, read sensor data. Works across ROS distros including Humble and Jazzy.

Why use it

Key features

Live Demo

What it looks like in practice

ros.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "ros": {
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ],
      "_inferred": true
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "ros",
      "command": "uvx",
      "args": [
        "ros-mcp-server"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "ros": {
      "command": {
        "path": "uvx",
        "args": [
          "ros-mcp-server"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add ros -- uvx ros-mcp-server

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use ros-mcp-server

How to drive a simulated robot from chat

👤 ROS learners, robotics devs prototyping behaviors ⏱ ~30 min intermediate

When to use: You want to test high-level robot behaviors quickly.

Prerequisites
  • ROS 2 (Humble/Jazzy) or ROS 1 running — Docker containers for Humble work great for quick starts
  • rosbridge_suite installed + running — ros2 launch rosbridge_server rosbridge_websocket_launch.xml
  • Python 3.10+ + uvx — brew install [email protected] uv
Flow
  1. Connect to rosbridge
    Configure the MCP with ROSBRIDGE_URL=ws://localhost:9090 and verify connection.✓ Copied
    → List of active topics returned
  2. Move the robot
    Publish to /cmd_vel a Twist message moving forward at 0.2 m/s for 3 seconds, then stop.✓ Copied
    → Robot moves in sim
  3. Read a sensor
    Subscribe to /scan for 2 seconds and report obstacles within 1m.✓ Copied
    → Range data summary

Outcome: A live robot responding to natural-language commands.

Pitfalls
  • Sending too-fast velocity commands crashes/tips the robot — Rate-limit commands in your prompt; start with small velocities
  • Unsafe autonomy — no geofence — Always run first in simulation (Gazebo); never wire this to a physical robot without e-stop

How to produce a natural-language robot health summary

👤 Robotics ops teams ⏱ ~15 min beginner

When to use: You want a quick 'what's the robot doing' readout.

Flow
  1. List topics
    List all active topics.✓ Copied
    → Topic catalog
  2. Sample key sensors
    Subscribe to /battery_state and /odom for 3 seconds each; summarize.✓ Copied
    → Battery % + pose summary
  3. Check parameters
    Get the value of /navigation.max_velocity.✓ Copied
    → Parameter value

Outcome: Operator-friendly summary of robot state.

How to call a ROS action (e.g., navigate to pose) from chat

👤 Robotics devs testing nav stacks ⏱ ~15 min intermediate

When to use: You want to trigger a goal without writing a client.

Flow
  1. Send goal
    Call action /navigate_to_pose with goal x=2.0 y=1.0 yaw=0.✓ Copied
    → Goal accepted, feedback streamed
  2. Monitor feedback
    Stream feedback until goal reached or 30s elapses.✓ Copied
    → Progress + outcome

Outcome: Navigation test without writing a client.

Pitfalls
  • rosbridge action support varies by version — Use ROS 2 + rosbridge 2.x for best action coverage

Combinations

Pair with other MCPs for X10 leverage

Log robot runs to disk for later analysis

Subscribe to /odom for 60 seconds and write the trajectory to /logs/run-2026-04-14.csv.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
list_topics Discover the robot free
publish_topic topic: str, type: str, msg: obj Command the robot free
subscribe_topic topic: str, duration_s?: int Read sensor data free
call_service service: str, request: obj One-shot RPC to the robot free
send_action_goal action: str, goal: obj Long-running tasks (nav, manipulation) free
get_param name: str Inspect config free
set_param name, value Tune at runtime free

Cost & Limits

What this costs to run

API quota
None — local rosbridge WebSocket
Tokens per call
Topic messages can be large (images, pointclouds); avoid streaming high-bandwidth topics into the LLM
Monetary
Free
Tip
Never subscribe to image or pointcloud topics into an LLM — summarize on the robot side first.

Security

Permissions, secrets, blast radius

Minimum scopes: Network access to the rosbridge WebSocket
Credential storage: None by default; put rosbridge behind auth for non-local use
Data egress: ROS topics flow to the LLM provider — treat sensor data as going to a third party
Never grant: Do not expose rosbridge to the public internet Do not grant autonomy without a hardware e-stop

Troubleshooting

Common errors and fixes

Cannot connect to rosbridge

Ensure rosbridge_server is running and reachable at the URL. For ROS 2: ros2 launch rosbridge_server rosbridge_websocket_launch.xml

Verify: nc -vz localhost 9090
Topic publish rejected — unknown type

Pass the exact message type (e.g., geometry_msgs/msg/Twist). Use list_topics to see registered types.

Action feedback not streaming

Older rosbridge versions have spotty action support. Upgrade to 2.x.

High-bandwidth topic crashes the agent

Do not subscribe to /camera/image_raw or /velodyne_points through the LLM. Summarize on-robot.

Alternatives

ros-mcp-server vs others

AlternativeWhen to use it insteadTradeoff
rosa (NASA JPL)You want a LangChain-based ROS agent, not MCPDifferent architecture; not pluggable into Claude Desktop

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills