MCP server for AI agents to interact with ROS2 (mock + live)
ros2-mcp has 25 tools with consistent naming (verb_noun pattern: ros2_*, lappa_*) and descriptions present for all. However, parameter descriptions are often minimal (5-15 chars), and output schemas are not formally documented, responses are JSON strings without declared structure. Error handling is basic (ok/error fields) but lacks recovery guidance. No tool annotations (readOnlyHint/destructiveHint) despite clear risk classifications. Resource support (topic://) is present but limited by URI template constraints. Descriptions average ~80 chars, below the 194-char baseline for A+ tools.
Probe a Lappa IDE server over HTTP (optional bridge for multi-agent ROS workflows). Does not require Lappa to be installed in this package. When the server is down, returns ok=false with a clear error (safe for mock/CI).
Send a goal to a ROS2 action (mock succeeds; live uses ros2 CLI).
Return rosbag metadata.
Check ROS2 / mock connectivity and environment.
Get a parameter value.
Compact graph overview for planning agent actions.
Send cmd_vel to a Lappa HTTP simulator bridge.
Output schemas not formally documented. All tools return JSON strings via _j() helper without declared response structure. LLMs cannot plan downstream calls or extract fields reliably.
Parameter descriptions are minimal (5-15 chars). E.g., ros2_topic_echo 'count' param: 'Number of messages (1-20 mock, 1-10 live)' lacks guidance on when to use different counts or what happens at boundaries.
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). Risk classifications exist (READ_ONLY, WRITE) but are not exposed to the MCP protocol, preventing agents from reasoning about safety.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | <=2025-11-25 | v2 |
Read robot pose from a Lappa HTTP simulator bridge.
List ROS2 action servers.
List ROS2 nodes.
List parameters (optional node filter).
List ROS2 services.
List ROS2 topics and message types.
Get or set ROS2 backend mode.
Inspect a node (publishers, subscribers, services).
Reset the mock turtlesim-like graph (mock mode only).
Call a ROS2 service.
Set a parameter value (JSON-encoded value).
Summarize mock TF frame count, roots, leaves, and maximum depth.
Return TF frame tree (mock: map→odom→base_link; live: /tf echo).
Echo recent messages from a topic.
Parse/report topic publish rates.
Detailed info for a topic (type, pubs, subs).
Publish a message to a topic.
Snapshot of a ROS2 topic: type, pub/sub counts, and last buffered messages. Addressable via the MCP resources protocol using a ``topic://<name>`` URI, e.g. ``topic://clock`` or ``topic://scan`` (leading slash optional; normalized internally). Note: the MCP SDK's URI template matcher binds a single path segment, so namespaced topics containing '/' (e.g. ``/turtle1/pose``) cannot be addressed via a literal ``topic://`` URI read but are fully supported when this resource function is invoked directly (e.g. from in-process code or tests).
Error handling lacks recovery guidance. Errors return {ok: false, error: '...'} but do not suggest next steps. E.g., 'Topic not found' should suggest 'Call ros2_list_topics() to see available topics.'
Resource URI template (topic://{topic_name}) cannot address namespaced topics with '/' (e.g., /turtle1/pose). Documentation acknowledges this but does not offer a workaround for agents.