
WiseVision ROS2
STDIOROS2 MCP server for topic management, service calls, and message handling in robotics systems.
ROS2 MCP server for topic management, service calls, and message handling in robotics systems.
Python server implementing Model Context Protocol (MCP) for ROS2.
Note: To call service with custom service source it before start server.
ros2_topic_list
topic_name
(string): Topic nametopic_type
(string): Message topic typeros2_service_list
service_name
(string): Service nameservice_type
(string): Service typerequest_fields
(string array): Fields in serviceros2_service_call
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 falseresult
(string): Return result of the service callerror
(string): Return error in case of errorros2_topic_subscribe
topic_name
(string): Topic namemsg_type
(string): Message typeduration
(float): How long subscribe topicmessage_limit
(int): How many messages collectmessages
: Serialized messages from topiccount
: Number of collected messagesduration
: How long messages has been collectedros2_get_messages
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 returnedtimestamps
: 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
).ros2_get_message_fields
message_type
(string): Message typeros2_topic_publish
topic_name
(string): Topic namemessage_type
(string): Message typedata
(dict): Dictionary with message fieldsstatus
: Status of publicationros2_topic_echo_wait
topic_name
(string): Topic namemessage_type
(string): Message typetimeout
(float): Duration to wait for a message before giving up.message
: The deserialized ROS 2 message, converted to a Python dictionary (via message_to_ordereddict)received
: true, indicating the message was successfully received[!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.
"mcp_server_ros_2": { "command": "docker", "args": [ "run", "-i", "--rm", "wisevision/mcp_server_ros_2" ], }
git clone https://github.com/wise-vision/mcp_server_ros_2.git cd mcp_server_ros_2 docker build -t wisevision/mcp_server_ros_2 .
Add this to AI Agent prompt:
You are an AI assistant that uses external tools via an MCP server. Before calling any tool, always check your memory to see if the list of available tools is known. • If you don’t have the current tool list in memory, your first action should be to call the list-tools tool. • Never guess tool names or parameters. • If a user requests something that may require a tool and you don’t have the right tool info, ask them or call list-tools first. Once the tool list is loaded, you may call tools directly using their documented names and schemas.