Skip to main content
Glama
realsense-ros-mcp
by ros-claw

realsense-ros-mcp

Python 3.8+ ROS2 Humble License: MIT RealSense

🌐 English | δΈ­ζ–‡

Intel RealSense ROS2 MCP Server β€” wraps the realsense2_camera ROS2 interface, providing 25 MCP tools for AI assistants to control Intel RealSense depth cameras via ROS2.


Features

ROS2 Node Management

  • launch_camera β€” Launch realsense2_camera ROS2 node

  • stop_camera β€” Stop camera node

  • list_active_cameras β€” List active camera processes

Topic Operations

  • list_topics β€” List ROS2 topics

  • get_topic_info β€” Get topic type and publishers

  • get_topic_hz β€” Measure topic publishing frequency

  • capture_color_image β€” Capture color image from topic

  • capture_depth_image β€” Capture depth image from topic

  • capture_rgbd β€” Capture aligned RGBD image pair

  • capture_infrared β€” Capture infrared image

  • get_imu_data β€” Get IMU data

  • capture_pointcloud β€” Capture point cloud (PLY/PCD)

Service Calls

  • get_device_info β€” Call DeviceInfo service

Parameter Control

  • get_camera_parameters β€” Get all parameters

  • set_camera_parameter β€” Set parameter

  • enable_filter β€” Enable/disable filters

  • set_depth_profile β€” Set depth stream resolution and FPS

  • set_color_profile β€” Set color stream resolution and FPS

TF and Calibration

  • get_camera_info β€” Get CameraInfo (intrinsics)

  • get_tf β€” Query TF transform

  • get_extrinsics β€” Get extrinsics

Multi-Camera

  • launch_multi_cameras β€” Batch launch multiple cameras

  • capture_multi_frames β€” Multi-camera synchronized capture

ROS2 Diagnostics

  • check_ros2_status β€” Check ROS2 environment

  • list_ros2_nodes β€” List all nodes


Related MCP server: OpticMCP

Quick Start

Prerequisites

# Install ROS2 Humble (Ubuntu 22.04)
# See: https://docs.ros.org/en/humble/Installation.html

# Install realsense2_camera package
sudo apt install ros-humble-realsense2-camera

# Or install from source
# cd ~/ros2_ws/src
# git clone https://github.com/IntelRealSense/realsense-ros.git -b ros2-development
# cd ..
# rosdep install -i --from-path src --rosdistro humble -y
# colcon build

Installation

# Ensure ROS2 is sourced
source /opt/ros/humble/setup.bash

# Install Python dependencies
pip install -r requirements.txt

# Test server
python mcp_server.py --test

# Run server (stdio)
python mcp_server.py

# Demo (without MCP)
python tests/demo_ros_capture.py

MCP Configuration

Add to OpenClaw config.yaml:

mcp:
  servers:
    realsense-ros:
      command: bash
      args: ["-c", "source /opt/ros/humble/setup.bash && python3 /path/to/realsense-ros-mcp/mcp_server.py"]

Or use Claude Desktop configuration:

{
  "mcpServers": {
    "realsense-ros": {
      "command": "bash",
      "args": ["-c", "source /opt/ros/humble/setup.bash && python3 /path/to/realsense-ros-mcp/mcp_server.py"]
    }
  }
}

Hardware Requirements

  • Intel RealSense D400/L500 series cameras

    • D435/D435i (recommended)

    • D455

    • D415

    • L515

  • ROS2 Humble (Ubuntu 22.04)

  • realsense2_camera package installed

  • USB 3.0 connection (required)

  • Python 3.8+


Usage Examples

# Check ROS2 status
check_ros2_status()

# Launch camera node
launch_camera(serial="12345", namespace="camera")

# List topics
list_topics()
# Returns: ["/camera/color/image_raw", "/camera/depth/image_rect_raw", ...]

# Capture color image
capture_color_image(topic="/camera/color/image_raw", filename="color.png")

# Get camera parameters
get_camera_parameters(node_namespace="camera")

# Set parameter
set_camera_parameter(node_namespace="camera", param_name="depth_module.emitter_enabled", param_value=True)

# Stop camera
stop_camera(namespace="camera")

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     MCP Client                          β”‚
β”‚              (Claude / OpenClaw / etc.)                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ stdio
                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                realsense-ros-mcp                        β”‚
β”‚              (mcp_server.py / FastMCP)                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   bridge.py                             β”‚
β”‚        (ROS2Bridge - rclpy / ros2cli integration)       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚              ROS2 Humble + realsense2_camera            β”‚
β”‚              (ROS2 nodes / topics / services)           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚ USB 3.0
                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚             Intel RealSense Camera                      β”‚
β”‚                (D435/D455/L515/etc.)                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Comparison with librealsense-mcp

Feature

librealsense-mcp

realsense-ros-mcp

Low-level

pyrealsense2 direct calls

ROS2 topics/services

Dependencies

pyrealsense2

ROS2 Humble + realsense2_camera

Use Case

Standalone apps, lightweight

ROS2 robotics integration

TF Support

❌

βœ…

Point Cloud Format

PLY

PLY / PCD

Filters

SDK built-in

ROS2 dynamic parameter config

Multi-camera

Manual management

ROS2 native support


Testing

# Ensure ROS2 environment is set
source /opt/ros/humble/setup.bash

# Run tests
cd tests
python demo_ros_capture.py


License

MIT License - See LICENSE


Made with ❀️ for the ROS2 robotics community

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables 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
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables interaction with local camera devices to capture and process images. It allows LLMs to access video devices with configurable settings such as resolution, orientation, and image format.
      1
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      rm_mcp bridges ROS Noetic and ROS 2 with Model Context Protocol, providing AI Agents with structured 'eyes' (state & system inspection) and 'hands' (controller actuation, signal injection, rosbag recording, and automated PID response analysis) for robotics debugging.
      26
      -