ros2_mcp
Advanced MCP Server ROS 2 bridging AI agents straight into robotics
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:
-
Clone the MCP ROS 2 server repository: git clone https://github.com/wise-vision/mcp_server_ros_2.git cd mcp_server_ros_2
-
(Optional) Create and activate a virtual environment: python -m venv venv
on Windows
venv\Scripts\activate
on macOS/Linux
source venv/bin/activate
-
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 .
-
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.
-
(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
ros
Connect AI models like Claude & GPT with robots using MCP and ROS.
jupyter
🪐 🔧 Model Context Protocol (MCP) Server for Jupyter.
falcon
Connect AI agents to CrowdStrike Falcon for automated security analysis and threat hunting
unitree-go2
The Unitree Go2 MCP Server is a server built on the MCP that enables users to control the Unitree Go2 robot using natural language commands interpreted by a LLM.
beemcp
BeeMCP: an unofficial Model Context Protocol (MCP) server that connects your Bee wearable lifelogger to AI via the Model Context Protocol
ros
MCP server for ROS to control robots via topics, services, and actions.