ROS Robot Control MCP server

Provides a bridge between natural language commands and Robot Operating System (ROS) for controlling robot movement through WebSocket communication with velocity commands.
Back to servers
Provider
Jungsoo Lee
Release date
Apr 26, 2025
Language
Python
Stats
84 stars

The ROS MCP Server enables robots to perform complex tasks by transforming natural language commands into ROS actions. Using WebSocket-based communication through rosbridge, it works with both ROS and ROS2 systems across various platforms, creating a seamless bridge between large language models and robot control systems.

Installation Options

Installing via Smithery

If you're using Claude Desktop, you can install the ROS MCP Server automatically using Smithery:

npx -y @smithery/cli install @lpigeon/ros-mcp-server --client claude

Manual Installation

Set Up Python Environment

First, install the UV package manager:

curl -LsSf https://astral.sh/uv/install.sh | sh

Or alternatively:

pip install uv

Then create and activate a virtual environment (optional but recommended):

uv venv
source .venv/bin/activate

Configure MCP Server

Create or edit the MCP configuration file with the following content:

{
  "mcpServers": {
    "ros-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/ros-mcp-server",
        "run",
        "server.py"
      ]
    }
  }
}

The location of this configuration file depends on your operating system:

  • MacOS:

    ~/Library/Application\ Support/Claude/claude_desktop_config.json
    
  • Linux (Ubuntu):

    ~/.config/Claude/claude_desktop_config.json
    
  • Windows:

    %AppData%\Claude\claude_desktop_config.json
    

Using the ROS MCP Server

Step 1: Configure Connection Settings

Open server.py and update the following settings to match your environment:

  • LOCAL_IP: Your machine's IP address
  • ROSBRIDGE_IP: IP where rosbridge is running
  • ROSBRIDGE_PORT: Port for rosbridge (default is 9090)

Step 2: Start the Rosbridge Server

For ROS 1:

roslaunch rosbridge_server rosbridge_websocket.launch

For ROS 2:

ros2 launch rosbridge_server rosbridge_websocket_launch.xml

Step 3: Use with an AI System

Launch your AI system that has imported the ROS MCP Server. When you type natural language commands like "Make the robot move forward," the server will convert these to appropriate ROS commands.

Step 4: Verify Operation

You can verify that commands are being processed by:

  • Checking the rosbridge server console for connection messages
  • Monitoring ROS topics to see published messages

Supported Message Types

The ROS MCP Server currently supports these message types:

  • geometry_msgs/Twist
  • sensor_msgs/Image
  • sensor_msgs/JointState

Key Features

  • Universal compatibility with both ROS and ROS2 through rosbridge
  • Cross-platform support for Linux, Windows, and MacOS
  • Seamless integration with large language models for natural interaction
  • Extensible function set for customized robot control
  • No modification required to existing ROS nodes
  • Optional native ROS/ROS2 command support alongside WebSocket control

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later