/ Verzeichnis / Playground / ros-mcp-server
● Community robotmcp ⚡ Sofort

ros-mcp-server

von 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.

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

ros.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren 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
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

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

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

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

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

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

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

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

Continue nutzt ein Array von Serverobjekten statt einer Map.

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

In context_servers hinzufügen. Zed lädt beim Speichern neu.

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

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: ros-mcp-server

How to drive a simulated robot from chat

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

Wann einsetzen: You want to test high-level robot behaviors quickly.

Voraussetzungen
  • 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
Ablauf
  1. Connect to rosbridge
    Configure the MCP with ROSBRIDGE_URL=ws://localhost:9090 and verify connection.✓ Kopiert
    → 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.✓ Kopiert
    → Robot moves in sim
  3. Read a sensor
    Subscribe to /scan for 2 seconds and report obstacles within 1m.✓ Kopiert
    → Range data summary

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

Fallstricke
  • 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

Wann einsetzen: You want a quick 'what's the robot doing' readout.

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

Ergebnis: 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

Wann einsetzen: You want to trigger a goal without writing a client.

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

Ergebnis: Navigation test without writing a client.

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

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

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.✓ Kopiert

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
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

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
None — local rosbridge WebSocket
Tokens pro Aufruf
Topic messages can be large (images, pointclouds); avoid streaming high-bandwidth topics into the LLM
Kosten in €
Free
Tipp
Never subscribe to image or pointcloud topics into an LLM — summarize on the robot side first.

Sicherheit

Rechte, Secrets, Reichweite

Minimale Scopes: Network access to the rosbridge WebSocket
Credential-Speicherung: None by default; put rosbridge behind auth for non-local use
Datenabfluss: ROS topics flow to the LLM provider — treat sensor data as going to a third party
Niemals gewähren: Do not expose rosbridge to the public internet Do not grant autonomy without a hardware e-stop

Fehlerbehebung

Häufige Fehler und Lösungen

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

Prüfen: 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.

Alternativen

ros-mcp-server vs. andere

AlternativeWann stattdessenKompromiss
rosa (NASA JPL)You want a LangChain-based ROS agent, not MCPDifferent architecture; not pluggable into Claude Desktop

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen