Provides containerization support for running the MCP server in an isolated environment, allowing communication with ROS2 components running in the same Docker network.
Integrates with InfluxDB through the WiseVision Data Black Box as an alternative to Rosbag2 for storing and retrieving ROS2 messages.
Provides tools for interacting with ROS2 (Robot Operating System) nodes, enabling listing of topics and services, subscribing to topics, publishing messages, calling services, and retrieving data from WiseVision Data Black Box.
WiseVision ROS2 MCP Server
Python server implementing Model Context Protocol (MCP) for ROS2.
Features
- List available topics
- List available services
- Call service
- Get messages from WiseVision Data Black Box (influxDB alternative to Rosbag2)
- Subscribe topic to get messages
- Publish message on topic
- Echo message on topic
- Get fields from message type
Note: To call service with custom service source it before start server.
API
Tools
- ros2_topic_list
- Retrun list of available topics
- Output:
topic_name
(string): Topic nametopic_type
(string): Message topic type
- ros2_service_list
- Retruns list available services
- Output:
service_name
(string): Service nameservice_type
(string): Service typerequest_fields
(string array): Fields in service
- ros2_service_call
- Call ros2 service
- Inputs:
service_name
(string): Service nameservice_type
(string): Service typefields
(string array): Fields in service request filled with user dataforce_call
(bool): Force service call without every field in service field up, Default set to false
- Output:
result
(string): Return result of the service callerror
(string): Return error in case of error
- Features:
- Check if service exists
- Check if every field in service is provide
- ros2_topic_subscribe
- Subscribes to a ROS 2 topic and collects messages either for a duration or a message limit.
- Inputs:
topic_name
(string): Topic namemsg_type
(string): Message typeduration
(float): How long subscribe topicmessage_limit
(int): How many messages collect- Default to collect first message, waiting 5 seconds
- Output:
messages
: Serialized messages from topiccount
: Number of collected messagesduration
: How long messages has been collected
- ros2_get_messages
- Inputs:
topic_name
(string): Topic namemessage_type
(string): Message typenumber_of_msg
(int): How many messages get from data black boxtime_start
(str): Start time for data retrieval. Only messages with timestamps after this will be returnedtime_end
(str): End time for data retrieval. Only messages with timestamps before this will be returned
- Output:
timestamps
: Time values used to indicate when each message was created, recorded, or received. Typically represented as ISO 8601 strings or UNIX epoch times. Used for filtering, ordering, and synchronizing data.messages
: Individual units of published data in ROS 2 topics. Each message contains a structured payload defined by its message type (e.g.,std_msgs/msg/String
).
- Inputs:
- ros2_get_message_fields
- Inputs:
message_type
(string): Message type
- Output:
- Returns the field names and types for a given ROS 2 message request type
- Inputs:
- ros2_topic_publish
- Inputs:
topic_name
(string): Topic namemessage_type
(string): Message typedata
(dict): Dictionary with message fields
- Output:
status
: Status of publication
- Inputs:
- ros2_topic_echo_wait
- Inputs:
topic_name
(string): Topic namemessage_type
(string): Message typetimeout
(float): Duration to wait for a message before giving up.
- Output:
message
: The deserialized ROS 2 message, converted to a Python dictionary (via message_to_ordereddict)received
: true, indicating the message was successfully received
- Inputs:
Usage
MCP Server Configuration
Note
The server is running inside a Docker container as the root user. To communicate with other ROS components, they must also be run as root.
Note
Due to this issue, this MCP server doesn't work with Copilot in Visual Studio Code.
Docker run
Set MCP setting to mcp.json.
Build docker image locally
Add this to AI Agent prompt:
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm
with this command:
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Public implementation of MCP for ROS 2 enabling to interact with system visible various robots, capable of:
List available topics List available services Call service Subscribe topic to get messages Publish message on topic
and more
Related MCP Servers
- AsecurityAlicenseAqualityMCP server that integrates Microsoft Teams messaging (read, post, mention, list members and threads)Last updated -6287PythonApache 2.0
- AsecurityAlicenseAqualityMiro MCP server, exposing all functionalities available in official Miro SDK.Last updated -9729326TypeScriptApache 2.0
- RustMIT License
- TypeScript