MCP Directory

How to add ROS MCP Server to Claude Desktop

Connect Claude, GPT, and Gemini to ROS/ROS 2 robots via rosbridge, with no changes to robot source code. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 1.3kโ˜… ยท stdio ยท no auth

Claude Desktop config for ROS MCP Server

claude mcp add ros-mcp -- uvx ros-mcp --transport=stdio
{
  "mcpServers": {
    "ros-mcp-server": {
      "command": "uvx",
      "args": [
        "ros-mcp",
        "--transport=stdio"
      ]
    }
  }
}

Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the ROS MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm ROS MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • An MCP-compatible AI client (Claude Code, Codex CLI, Gemini CLI, Claude Desktop, ChatGPT, Cursor, etc.)
  • An account with an AI provider (e.g., Claude, OpenAI, Gemini)
  • uv / uvx installed on your machine (curl -LsSf https://astral.sh/uv/install.sh | sh)
  • Python 3.10+ and pip 23.0+
  • ROS or ROS 2 installed on the robot's machine
  • rosbridge_server installed and running on the robot (ros-<distro>-rosbridge-server, default WebSocket port 9090)
  • Both machines on the same local network (or connected via VPN)

What ROS MCP Server can do in Claude Desktop

connect_to_robot

Connect the MCP server to a robot's rosbridge endpoint by IP address (and optional port).

ping_robots

Test network connectivity to a robot's IP and rosbridge port to confirm reachability.

get_topics

Discover all ROS topics currently available on the robot.

get_topic_type

Get the message type of a specific topic.

get_topic_details

Get detailed information about a topic, including publishers/subscribers and type.

get_message_details

Inspect the full structure/fields of a given ROS message type (including custom types).

subscribe_once

Subscribe to a topic and return a single latest message.

subscribe_for_duration

Subscribe to a topic for a set duration and collect messages over that window.

Security

The MCP server connects to a robot's rosbridge WebSocket (default port 9090) and can both observe and control the robot โ€” including publishing to topics, calling services, executing actions, and setting parameters. Restrict network exposure of rosbridge (do not expose port 9090 to untrusted networks; use a VPN for remote access). The HTTP transport defaults to host 127.0.0.1; binding to 0.0.0.0 exposes the server to the local network without authentication.

ROS MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the ROS MCP Server config there under the "mcpServers" key and restart the client.

Is ROS MCP Server safe to use with Claude Desktop?

The MCP server connects to a robot's rosbridge WebSocket (default port 9090) and can both observe and control the robot โ€” including publishing to topics, calling services, executing actions, and setting parameters. Restrict network exposure of rosbridge (do not expose port 9090 to untrusted networks; use a VPN for remote access). The HTTP transport defaults to host 127.0.0.1; binding to 0.0.0.0 exposes the server to the local network without authentication.

Do I need to change my robot's source code?

No. You only need to add and launch the rosbridge node in your existing ROS setup; the MCP server connects to it over WebSocket.

Which ROS versions are supported?

Both ROS 2 (Jazzy, Humble, and others) and ROS 1 distros. Some tools (parameters and actions) are ROS 2 only.

How do I install it for Claude Code?

Install uv, then run `claude mcp add ros-mcp -- uvx ros-mcp --transport=stdio`. Verify with `claude mcp list` and restart Claude Code if the server isn't found.

View repo Full ROS MCP Server page