Get the FREE Ultimate OpenClaw Setup Guide →

ros2_mcp

Advanced MCP Server ROS 2 bridging AI agents straight into robotics

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio wise-vision-ros2_mcp python -m ros2_mcp

How to use

This MCP server provides a Python-based ROS 2 integration that exposes ROS 2 topics, services, and actions through the Model Context Protocol (MCP) using stdio as the transport. It includes built-in tools to list topics and services, subscribe to or publish on topics, call services, send and manage action goals, and retrieve message definitions. The server auto-discovers available interfaces (topics, services, actions) and can work with nested message fields, making it suitable for AI-assisted debugging, code generation, and natural-language command translation for ROS 2 workflows. Users can leverage the supplied prompts and tools to analyze topics, relay messages, perform health checks on ROS 2 nodes, and reuse data from a data black box as needed.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Access to ROS 2 Humble/Jazzy environment if you are running locally

Installation steps:

  1. Clone the MCP ROS 2 server repository: git clone https://github.com/wise-vision/mcp_server_ros_2.git cd mcp_server_ros_2

  2. (Optional) Create and activate a virtual environment: python -m venv venv

    on Windows

    venv\Scripts\activate

    on macOS/Linux

    source venv/bin/activate

  3. Install Python dependencies specified by the project (adjust if a requirements.txt or setup.py exists): pip install -r requirements.txt # if present

    or install via setup if provided

    pip install -e .

  4. Run the MCP ROS 2 server: python -m ros2_mcp

    If your environment requires ROS 2 setup, source the ROS 2 workspace as needed before running.

  5. (Optional) Run via Docker or other environments if provided in the repository guides to match deployment preferences.

Notes:

  • Ensure your ROS 2 environment is properly sourced and accessible to the Python process.
  • If you need to customize Python dependencies, edit the requirements and reinstall.

Additional notes

Environment tips:

  • The server communicates over stdio; connect clients via standard MCP tooling to exchange commands and responses.
  • The project supports automatic QoS selection for topics and services to optimize performance.
  • If you need to call a service with a custom type, source the package that defines it before starting the server (as noted in the README).
  • Docker images are available for quick deployment, and the server is designed to be easy to configure with minimal setup time.
  • If you encounter ROS 2 topic/service discovery issues, ensure ROS_DOMAIN_ID is consistent across processes and that the ROS 2 environment is properly sourced.

Related MCP Servers

Sponsor this space

Reach thousands of developers