MCP ROS Bags
Provides tools for querying and analyzing ROS 1 and ROS 2 bag files, including bag management, message retrieval, trajectory extraction, LiDAR and image processing, transform tree queries, logging analysis, search, and visualization.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP ROS Bags
A Model Context Protocol (MCP) server for analyzing and querying ROS bag files. This server enables Claude and other MCP-compatible tools to interact with robot data stored in ROS bags.
Overview
This MCP server provides comprehensive tools for ROS bag analysis, supporting both ROS 1 and ROS 2 bag formats (.bag, .db3, .mcap). It enables AI assistants to query robot trajectories, sensor data, transforms, and logging information from recorded robot sessions.
Key Features
Bag Management: List, inspect, and query ROS bag files
Message Querying: Get messages by topic, timestamp, or time range
Trajectory Analysis: Extract robot paths, waypoints, and motion profiles
Sensor Data: Analyze laserscan topics, images
Transform Trees: Query coordinate transforms and frame relationships
Logging Analysis: Search and analyze ROS log messages
Visualization: Generate plots and visual representations of data
Search & Discovery: Find objects, patterns, and correlations in data
Related MCP server: MCAP MCP Server
Installation
Clone the repository:
git clone https://github.com/binabik-ai/mcp-rosbags.git cd mcp-rosbagsCreate and activate a Python virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtOptional: Install with ROS 2 support:
pip install -e .[ros2]
Configuration
Claude Desktop Configuration
Add this to your Claude Desktop configuration file:
{
"mcpServers": {
"rosbag_reader": {
"command": "/path/to/your/venv/bin/python",
"args": ["/path/to/mcp-rosbags/src/server.py"],
"env": {
"PYTHONPATH": "/path/to/mcp-rosbags/src",
"MCP_ROSBAG_DIR": "/path/to/your/rosbags",
"MCP_ROSBAG_CONFIG": "/path/to/mcp-rosbags/src/config"
}
}
}
}Environment Variables
MCP_ROSBAG_DIR: Default directory containing ROS bag files (default:./rosbags)MCP_ROSBAG_CONFIG: Configuration directory (default:./config)
Server Configuration
The server uses configuration files in the src/config/ directory:
server_config.yaml: Main server configuration (caching, timeouts, etc.)message_schemas.yaml: Schema definitions for message field extraction
Usage
With Claude Desktop
After configuration, restart Claude Desktop and you can interact with your ROS bags:
"List all ROS bags in my directory"
"Show me the trajectory from the /odom topic"
"Find all error messages in the logs"
"Extract an image from the /camera/image topic at timestamp 1234567890 and describe what you see"Tools Overview
The server provides the following categories of tools:
Core Tools
set_bag_path: Set current bag file or directorylist_bags: List available ROS bag filesbag_info: Get detailed bag informationget_message_at_time: Get message at specific timestampget_messages_in_range: Get messages within time range
Analysis Tools
Trajectory: Extract robot paths, analyze motion patterns
LiDAR: Process laserscan data, e.g., to detect obstacles
Images: Extract and process camera images
Transforms: Query coordinate transforms and frame trees
Logging: Search and analyze ROS log messages
Visualization: Generate plots and visual data representations
Search Tools
Pattern matching in message data
Correlation analysis between topics
Time-based data alignment
Architecture
src/
├── server.py # Main MCP server
├── config/ # Configuration files
│ ├── server_config.yaml # Server settings
│ └── message_schemas.yaml # Message field schemas
├── core/ # Core utilities
│ ├── cache_manager.py # Caching system
│ ├── message_utils.py # Message processing
│ └── schema_manager.py # Schema handling
└── extractors/ # Specialized analysis tools
├── bag_management.py # Bag operations
├── image.py # Image processing
├── lidar.py # LiDAR analysis
├── logging.py # Log analysis
├── search.py # Search and correlation
├── tf_tree.py # Transform trees
├── trajectory.py # Path analysis
└── visualization.py # Data visualizationSupported Message Types
The server supports standard ROS message types including:
Navigation:
nav_msgs/Odometry,nav_msgs/PathGeometry:
geometry_msgs/PoseStamped,geometry_msgs/TwistSensors:
sensor_msgs/LaserScan,sensor_msgs/PointCloud2,sensor_msgs/ImageTransforms:
tf2_msgs/TFMessage,geometry_msgs/TransformStampedDiagnostics:
diagnostic_msgs/DiagnosticArrayLogging:
rcl_interfaces/Log
Performance Features
Intelligent Caching: Configurable caching system for frequently accessed data
Schema-based Extraction: Efficient field extraction using predefined schemas
License
This project is licensed under the Apache License 2.0. See LICENSE for details.
Support
Issues: Report bugs and request features on GitHub Issues
Contact: dev@binabik.ai
Acknowledgments
Built with the Model Context Protocol and the rosbags library.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Cross-tool persistent memory and context for AI assistants over MCP.
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI tools to interact with ROS2 robotics systems through natural language commands. Supports topic publishing/subscribing, service calls, message analysis, and auto-discovery of ROS2 interfaces for debugging and controlling robots.Mozilla Public 2.0
- AlicenseAqualityDmaintenanceEnables querying robot MCAP recordings with SQL via natural language, allowing topic listing, schema inspection, and cross-sensor correlation without a database.64GPL 3.0
- AlicenseAqualityDmaintenanceEnables AI agents to analyze ROS2 log files across multiple nodes by merging them into a unified timeline and providing smart query tools, without requiring ROS2 installation.114MIT
- AlicenseNot gradedqualityCmaintenanceEnables agents to inspect and analyze ROS recordings through MCP tools and resources, including topic indexing, frame/point-cloud/depth sampling, IMU/odometry series, calibration, and exportable clips, previews, and reports. It provides bounded queries and materialization of analysis artifacts without requiring a ROS installation.MIT