MCP ROS Bags logo

MCP ROS Bags

Organization
binabik-ai

MCP Server to interface with and analyze rosbags offline

Publisherbinabik-ai
Repositorymcp-rosbags
LanguagePython
Forks
3
Stars
29
Available tools
0
Transport typestdio
Categories
LicenseApache-2.0
Links
  • Connect tools to AI workflows

    MCP ROS Bags exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    29 stars and 3 forks from the linked repository.

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

Installation

  1. Clone the repository:

    bash
    git clone https://github.com/binabik-ai/mcp-rosbags.git
    cd mcp-rosbags
  2. Create and activate a Python virtual environment:

    bash
    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    bash
    pip install -r requirements.txt
  4. Optional: Install with ROS 2 support:

    bash
    pip install -e .[ros2]

Configuration

Claude Desktop Configuration

Add this to your Claude Desktop configuration file:

json
{
  "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 directory
  • list_bags: List available ROS bag files
  • bag_info: Get detailed bag information
  • get_message_at_time: Get message at specific timestamp
  • get_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 visualization

Supported Message Types

The server supports standard ROS message types including:

  • Navigation: nav_msgs/Odometry, nav_msgs/Path
  • Geometry: geometry_msgs/PoseStamped, geometry_msgs/Twist
  • Sensors: sensor_msgs/LaserScan, sensor_msgs/PointCloud2, sensor_msgs/Image
  • Transforms: tf2_msgs/TFMessage, geometry_msgs/TransformStamped
  • Diagnostics: diagnostic_msgs/DiagnosticArray
  • Logging: 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

Acknowledgments

Built with the Model Context Protocol and the rosbags library.

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "binabik-ai-mcp-rosbags": {
      "command": "",
      "args": []
    }
  }
}

Use MCP ROS Bags MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP ROS Bags is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP ROS Bags as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP ROS Bags MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "binabik-ai-mcp-rosbags": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-rosbags"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP ROS Bags MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP ROS Bags MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP ROS Bags to help me with this task?
MCP ROS Bags
Sure. I read it.
Here is what I found using MCP ROS Bags.

Frequently asked questions

What is the MCP ROS Bags MCP server used for?

MCP ROS Bags is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP ROS Bags MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP ROS Bags with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP ROS Bags MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP ROS Bags connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP ROS Bags MCP to TypingMind?

MCP ROS Bags runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP ROS Bags MCP provide in TypingMind?

MCP ROS Bags exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP ROS Bags MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP ROS Bags requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇