# Realsense Ros Mcp

> Intel RealSense ROS2 MCP Server - 封装 realsense2_camera 的 ROS2 接口，提供 25 个 MCP tools

- **Type:** MCP server
- **Install:** `agentstack add mcp-ros-claw-realsense-ros-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ros-claw](https://agentstack.voostack.com/s/ros-claw)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ros-claw](https://github.com/ros-claw)
- **Source:** https://github.com/ros-claw/realsense-ros-mcp

## Install

```sh
agentstack add mcp-ros-claw-realsense-ros-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# realsense-ros-mcp

[](https://www.python.org/downloads/)
[](https://docs.ros.org/en/humble/)
[](https://opensource.org/licenses/MIT)
[](https://www.intelrealsense.com/)

🌐 **English** | [中文](./README.zh.md)

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

---

## Quick Start

### Prerequisites

```bash
# 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

```bash
# 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`:

```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:

```json
{
  "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

```python
# 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

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

# Run tests
cd tests
python demo_ros_capture.py
```

---

## Related Projects

- [librealsense-mcp](https://github.com/ros-claw/librealsense-mcp) — Direct SDK version of RealSense MCP Server
- [realsense-ros](https://github.com/IntelRealSense/realsense-ros) — Official ROS2 RealSense package

---

## License

MIT License - See [LICENSE](LICENSE)

---

**Made with ❤️ for the ROS2 robotics community**

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ros-claw](https://github.com/ros-claw)
- **Source:** [ros-claw/realsense-ros-mcp](https://github.com/ros-claw/realsense-ros-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ros-claw-realsense-ros-mcp
- Seller: https://agentstack.voostack.com/s/ros-claw
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
