ros2-inspector-mcp logo

ros2-inspector-mcp

by 0xmoteUpdated Nov 18, 2026

ROS 2 static analysis for AI agents: validate URDF/xacro models, inspect Python and XML launch files, diagnose DDS QoS mismatches, and check TF trees against REP-105. No ROS installation required.

ros2
urdf
robotics
+7
|

ROS 2 Inspector — catch robot-description bugs before ros2 launch does

ROS 2 failures are famously unhelpful: one wrong <parent link> crashes robot_state_publisher deep inside KDL, a QoS mismatch leaves a topic silently empty, and a TF tree that breaks REP-105 answers with "Lookup would require extrapolation into the future". This server turns those opaque failures into structured findings — a code, a line number and a concrete fix.

Everything is pure static analysis in TypeScript: no ROS 2 installation, no DDS middleware, no robot on the bench, no network calls. That makes it deterministic, fast, and safe to run on robot code an AI agent just generated.

Tools

validate_urdf — Is this URDF structurally sound, and where exactly does it break? Builds the link/joint tree, finds the root link, and reports: XML errors with line numbers, duplicate link/joint names, undefined or missing parent/child links, multiple parents, multiple roots, kinematic cycles with the full path, orphan links, zero or negative mass, missing or non-positive-definite inertia, missing or inverted joint limits, missing effort/velocity limits, bad geometry (mesh without filename, zero-size box/sphere/cylinder), undefined materials, and unexpanded xacro ($(find pkg), ${prefix}). Also returns a summary: link/joint counts, root and leaf links, tree depth, total mass, degrees of freedom, joint-type histogram.

inspect_ros2_launch — What does this launch file actually start, and which arguments are wrong? Parses Python (launch / launch_ros) and XML launch files without executing them. Extracts declared arguments (default, description, required, choices, used-or-not), Node / LifecycleNode / ComposableNode actions (package, executable, name, namespace, output, conditions), remappings, inline parameters and YAML parameter files, and includes with the arguments they pass. Warns about unused or undeclared arguments, duplicate node names in one namespace, nodes without an explicit name, missing package/executable, and ROS 1 syntax ROS 2 refuses to run (type=, <rosparam>, <machine>).

check_qos_compatibility — Why can these two nodes never talk to each other? Applies the DDS RxO matching rules used by rmw_qos_profile_check_compatible: reliability, durability, liveliness kind, liveliness lease and deadline. Reports each policy with publisher value, subscriber value, pass/fail, the rule that applies, and the fix — plus ready-to-paste rclpy, rclcpp and ros2 run snippets. Also flags history/depth mismatches that cause message loss without blocking the match. Named presets (default, sensor_data, parameters, services) let you compare real profiles without spelling out every field.

check_tf_rep105 — Is my TF tree a valid REP-105 map -> odom -> base_link tree? Accepts a URDF, an explicit list of {frame, parent} pairs taken from ros2 run tf2_tools view_frames or static transforms, or both merged. Reports missing map/odom, wrong parents, base_footprint mistakes, frames with several parents, cycles, disconnected frames, multiple roots, sensor frames that do not hang off the base frame, and naming violations. Returns the frame table, an ASCII tree diagram and ready-to-run static_transform_publisher commands for the missing links.

Who it is for

  • Robotics developers wiring up a new URDF, xacro model, Nav2 stack or sensor driver.
  • AI coding agents that need to validate the robot code they just wrote.
  • Reviewers and CI pipelines that want a robot-description lint step with machine-readable output.

Good to know

  • Read-only and offline by design: nothing to configure, no API keys, no robot access.
  • Every issue carries code, severity, message, element, line and suggestion, so CI can gate on it.
  • Each tool returns JSON plus a typed structuredContent block, so agents reason over issues instead of re-parsing prose.
  • MIT licensed, 95 unit tests, Streamable HTTP transport.

How will you use ros2-inspector-mcp?

In an AI agent

Claude, Codex, Cursor, VS Code… Choose →

From the terminal

mcpize CLI, pipelines, Skills. Choose →

In your code

TypeScript, Python, cURL. Choose →