ROS 2 MCP Server

ROS 2 nodes, topics, and services bridge for AI agents using the MCP standard.

Data last scanned today · Reviewed yesterday

Overview

This Python-based MCP server enables AI assistants to interact directly with ROS 2 environments over stdio. It provides functionality to list, subscribe to, and publish ROS 2 topics, as well as call services and manage action goals. The server includes several built-in prompts for specialized tasks, such as performing topic health checks, analyzing message statistics, and relaying data between topics. It is compatible with both ROS 2 Humble and Jazzy distributions.

Our verdict

With a security score of 23/100, this server carries a high-risk rating. The primary vulnerability is the complete lack of an authentication method, meaning any entity with access to the configuration can execute commands against the ROS 2 system. Additionally, the server provides full write access to ROS 2 topics and services without a read-only mode, creating a potential vector for unauthorized system modification. It is recommended only for use in isolated or non-critical environments where security boundaries are managed externally.

  • Supports both ROS 2 Humble and Jazzy versions.
  • Includes pre-built prompts for analysis and health monitoring.
  • Minimal supply chain risk with zero direct dependencies.
  • No authentication method implemented for user access.
  • Lacks a read-only mode, exposing full write capabilities.
  • Maintained by community contributors rather than an official vendor.

Tools

ToolDescriptionRisk
ros2_topic_listReturns list of available topicslow
ros2_topic_subscribeSubscribes to a ROS 2 topic and collects messages for a duration or message limitlow
ros2_get_messagesRetrieves past messages from a topic (data black box)low
ros2_get_message_fieldsGets field names and types for a message typelow
ros2_topic_publishPublishes message to a topicmedium
ros2_service_listReturns list of available serviceslow
ros2_service_callCalls a ROS 2 servicemedium
ros2_list_actionsReturns list of available ROS 2 actions with their types and request fieldslow
ros2_send_action_goalSends a goal to an action. Optionally waits for the result.medium
ros2_cancel_action_goalCancels a specific goal or all goals for an actionmedium
ros2_action_request_resultWaits for the RESULT of a given goal via GetResultlow
ros2_action_subscribe_feedbackSubscribes to feedback messages for an action. Can filter by goal_id. Collects messages for duration or max count.low
ros2_action_subscribe_statusSubscribes to an action's status topic and returns collected status frameslow

Compatibility

ClientLocalDockerRemoteRead-only
Claude Desktop
Cursor
VS Code
Windsurf
ChatGPT

Frequently asked questions

What ROS 2 distributions are supported?

The server currently supports ROS 2 Humble and ROS 2 Jazzy.

How do I call a service with a custom, non-default message type?

You must source the ROS 2 package that defines the custom service type in your environment before starting the server.

How does the server handle Quality of Service (QoS) settings?

The server automatically selects appropriate Quality of Service settings for all topics and services.

What should I do if the server returns an incomplete list of topics or services in Docker?

DDS discovery may still be in progress immediately after startup. You can tune the discovery warm-up behavior using the MCP_ROS_DISCOVERY_S environment variable.

Alternatives

Changelog

Badge

ROS 2 MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.