mcp-ros2-logs — let AI agents debug your ROS2 logs across nodes
Open-source MCP server merges logs from multiple nodes, enabling AI to reconstruct failure chains from USB timeouts to planner crashes.
Developer spanchal001 has released mcp-ros2-logs, an open-source Model Context Protocol (MCP) server designed to solve a critical pain point in robotics development. ROS2, the Robot Operating System, writes logs for each software node to a separate file, making it tedious to trace cascading failures across components like sensor drivers, collision checkers, and motion planners. This new tool merges those disparate log files into a unified timeline and exposes a suite of 12 query tools through the MCP standard, allowing AI coding assistants like Claude Code, GitHub Copilot, and Cursor to interact with the data using natural language.
Users install it via `pipx install mcp-ros2-logs` and register it with their AI assistant. They can then ask questions like “show me all errors” or “correlate errors with bag topics.” The server can parse ROS2 bag files (.db3/.mcap) to extract topic metadata, enabling powerful correlations between log errors and system events. It also performs statistical anomaly detection to spot rate spikes or new error patterns. A key feature is that it operates without requiring ROS2 to be installed; it reads files directly from disk.
In a practical example, pointing an AI agent at logs from a run where a lidar USB connection failed allows the system to reconstruct the full causal chain: USB timeout, stopped /scan messages, failed collision checker, and aborted motion planner. This entire diagnostic process, which would require manual timestamp correlation across multiple files, is completed by the AI in roughly 10 seconds. The project is available on GitHub and PyPI, offering a significant efficiency boost for developers debugging complex, multi-node robotic systems.
- Unifies ROS2 logs from separate node files into a queryable timeline via 12 MCP tools for AI agents.
- Correlates log errors with ROS2 bag file topics and performs statistical anomaly detection without needing ROS2 installed.
- Can reconstruct complex failure chains (e.g., from sensor dropout to planner abort) in about 10 seconds using natural language queries.
Why It Matters
Dramatically accelerates robotics debugging by turning hours of manual log correlation into a 10-second AI-powered query, boosting developer productivity.