Python server implementing Model Context Protocol (MCP) for ROS2.
225
8 Tools
Version 4.43 or later needs to be installed to add the server automatically
Use cases
About
Python server implementing Model Context Protocol (MCP) for ROS2.
Attribute | Details |
---|---|
Docker Image | mcp/ros2 |
Author | wise-vision |
Repository | https://github.com/wise-vision/mcp_server_ros_2 |
Dockerfile | https://github.com/wise-vision/mcp_server_ros_2/blob/main/Dockerfile |
Docker Image built by | Docker Inc. |
Docker Scout Health Score | |
Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/ros2 --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
Licence | Mozilla Public License 2.0 |
Tools provided by this Server | Short Description |
---|---|
ros2_get_message_fields | Returns the fields of a given ROS2 message type. |
ros2_get_messages | Calls the ROS2 ‘/get_messages’ service to retrieve past messages from a topic for data which is stored in InfluxDB. |
ros2_interface_list | Returns a list of available ROS 2 interfaces. |
ros2_service_call | Call a ROS 2 service by name and type using provided fields. |
ros2_service_list | Returns a list of available ROS 2 services and their request fields. |
ros2_topic_list | Returns a list of available ROS 2 topics and their types. |
ros2_topic_publish | Publish a message to a ROS 2 topic by name and message type using provided field values. |
ros2_topic_subscribe | Subscribe to a ROS 2 topic by name collecting messages for a given time or count limit. |
ros2_get_message_fields
Returns the fields of a given ROS2 message type.
Parameters | Type | Description |
---|---|---|
message_type | string | Full ROS2 message type, e.g., std_msgs/msg/String |
ros2_get_messages
Calls the ROS2 ‘/get_messages’ service to retrieve past messages from a topic for data which is stored in InfluxDB.
Parameters | Type | Description |
---|---|---|
message_type | string | Full ROS2 message type used for decoding |
topic_name | string | Name of the topic to retrieve messages from. |
number_of_messages | integer optional | Number of messages to fetch. |
time_end | string optional | ISO8601 timestamp string to filter messages before a point in time. |
time_start | string optional | ISO8601 timestamp string to filter messages after a point in time. |
ros2_interface_list
Returns a list of available ROS 2 interfaces.
ros2_service_call
Call a ROS 2 service by name and type using provided fields. Will ask the user to confirm if some fields are missing unless 'force_call' is set to True. Before every use of this tool, the agent must call 'ros2 service list' and 'ros2 interface list' to ensure the latest interface information is available.
Parameters | Type | Description |
---|---|---|
fields | object | Dictionary of fields to send in the service request. |
service_name | string | Name of the service to call |
service_type | string | Full ROS 2 service type, before pass, check service type using tool ros2_service_list |
force_call | boolean optional | Whether to call the service even if some fields are missing |
ros2_service_list
Returns a list of available ROS 2 services and their request fields.
ros2_topic_list
Returns a list of available ROS 2 topics and their types.
ros2_topic_publish
Publish a message to a ROS 2 topic by name and message type using provided field values. Before every use of this tool, the agent must call 'ros2_topic_list' and 'ros2_interface_list' to ensure the latest available topics and message types are known.
Parameters | Type | Description |
---|---|---|
data | object | Dictionary containing the message fields and values |
message_type | string | Full ROS 2 message type, e.g., 'std_msgs/msg/String' |
topic_name | string | Name of the topic to publish to |
ros2_topic_subscribe
Subscribe to a ROS 2 topic by name collecting messages for a given time or count limit. Before every use of this tool, the agent must call 'ros2_topic_list' to ensure it has the latest available topics
Parameters | Type | Description |
---|---|---|
topic_name | string | Name of the topic to subscribe to |
duration | number optional | If provided, collects messages for this many seconds. |
message_limit | integer optional | If provided, stops after receiving this number of messages. |
{
"mcpServers": {
"ros2": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"mcp/ros2"
]
}
}
}
Manual installation
You can install the MCP server using:
Installation for