ROSClaw UR ROS2 MCP Server
Integrates with ROS2 to control a Universal Robots UR5/UR5e robotic arm, providing tools for joint and Cartesian motion, gripper control, pick-and-place sequences, status resources, and safety limit enforcement via ROS2 topics and services.
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.
rosclaw-ur-ros2-mcp
π English | δΈζ
ROSClaw MCP Server for Universal Robots UR5/UR5e Robotic Arm via ROS2.
Part of the ROSClaw Embodied Intelligence Operating System.
Overview
This MCP server enables LLM agents to control a UR5/UR5e robotic arm through the Model Context Protocol. It integrates with ROS2 (Robot Operating System 2) and supports MoveIt 2 for motion planning.
LLM Agent ββMCPβββΊ rosclaw-ur-ros2-mcp ββROS2βββΊ UR5/UR5eRelated MCP server: ROS MCP
SDK Information
Property | Value |
SDK Name | Universal Robots ROS2 Driver |
SDK Version | 2.4.0+ |
Protocol | ROS2 (Robot Operating System 2) |
Source Repository | |
Documentation | |
ROS2 Version | Humble / Jazzy |
License | Apache-2.0 |
Generated | 2026-04-07 |
Hardware Specification
Specification | Value |
Robot Model | Universal Robots UR5 / UR5e |
Degrees of Freedom | 6 |
Payload | 5 kg (UR5) / 5 kg (UR5e) |
Reach | 850 mm |
Repeatability | Β±0.03 mm (UR5e) |
Weight | 20.5 kg (UR5) / 20.5 kg (UR5e) |
Footprint | Γ 149 mm |
Joint Range | Β±360Β° (all joints) |
Max Joint Speed | 3.15 rad/s (base joints), 6.28 rad/s (wrist) |
Protocol | ROS2 Topics & Services |
Controller | UR Control Box (CB3 or e-Series) |
Joint Configuration
Joint | Type | Range | Max Speed |
shoulder_pan | Revolute | Β±360Β° | 3.15 rad/s |
shoulder_lift | Revolute | Β±360Β° | 3.15 rad/s |
elbow | Revolute | Β±360Β° | 3.15 rad/s |
wrist_1 | Revolute | Β±360Β° | 6.28 rad/s |
wrist_2 | Revolute | Β±360Β° | 6.28 rad/s |
wrist_3 | Revolute | Β±360Β° | 6.28 rad/s |
Features
6-DOF joint control: Direct joint position commands
Cartesian control: End-effector pose (with MoveIt IK)
Gripper control: Open/close with force control
Pick & Place: High-level pick and place sequences
Safety guards: Joint limits and workspace limits enforced
ROS2 integration: Native rclpy node, subscribes to
/joint_statesAsync design: Background ROS2 spin thread
Installation
# Requires ROS2 Humble or Jazzy
source /opt/ros/humble/setup.bash
# Clone
git clone https://github.com/ros-claw/rosclaw-ur-ros2-mcp.git
cd rosclaw-ur-ros2-mcp
# Install with uv (recommended)
uv venv --python /usr/bin/python3.10
source .venv/bin/activate
uv pip install -e .
# Or with pip
pip install -e .Dependencies
# Install UR ROS2 driver
sudo apt install ros-humble-ur
# Launch UR5 driver (real robot)
ros2 launch ur_robot_driver ur_control.launch.py \
ur_type:=ur5 robot_ip:=192.168.1.102
# Or simulation
ros2 launch ur_simulation_gazebo ur_sim_control.launch.pyQuick Start
Run as MCP Server
source /opt/ros/humble/setup.bash
python src/ur_mcp_server.pyClaude Desktop Configuration
{
"mcpServers": {
"rosclaw-ur": {
"command": "bash",
"args": ["-c", "source /opt/ros/humble/setup.bash && python /path/to/rosclaw-ur-ros2-mcp/src/ur_mcp_server.py"],
"transportType": "stdio",
"description": "UR5 via ROS2",
"sdk_version": "2.4.0+",
"sdk_source": "https://github.com/UniversalRobots/Universal_Robots_ROS2_Driver"
}
}
}Available Tools
Tool | Description |
| Connect to UR5 via ROS2 |
| Disconnect from UR5 |
| Move to safe home position |
| Move a single joint |
| Move multiple joints simultaneously |
| Move end-effector to Cartesian pose |
| Close gripper with force control |
| Open gripper |
| Pick object at specified position |
| Place object at specified position |
| Stop all robot motion |
Available Resources
Resource | Description |
| Joint positions, velocities, EE pose |
| Joint limits and velocity limits |
| Workspace (cylinder) limits |
| ROS2 connection status |
| SDK metadata and version |
Joint Reference
Joint | Range | Max Velocity |
shoulder_pan_joint | Β±360Β° | 3.15 rad/s |
shoulder_lift_joint | Β±360Β° | 3.15 rad/s |
elbow_joint | Β±360Β° | 3.15 rad/s |
wrist_1_joint | Β±360Β° | 6.28 rad/s |
wrist_2_joint | Β±360Β° | 6.28 rad/s |
wrist_3_joint | Β±360Β° | 6.28 rad/s |
Workspace
Cylindrical workspace:
Radius: 0.0 β 0.85 m
Height: 0.05 β 1.2 mHome Position
HOME = {
"shoulder_pan_joint": 0.0,
"shoulder_lift_joint": -1.57, # -90Β°
"elbow_joint": 0.0,
"wrist_1_joint": -1.57,
"wrist_2_joint": 0.0,
"wrist_3_joint": 0.0,
}Safety Information
WARNING: This MCP server controls a 20+ kg industrial robot arm. Improper use can cause:
Serious injury or death
Equipment damage
Property damage
Safety Features
Feature | Description |
Joint Limits | Β±360Β° enforced in software |
Velocity Limits | Base: 3.15 rad/s, Wrist: 6.28 rad/s |
Workspace Limits | Cylinder: 0.85m radius, 0.05-1.2m height |
Emergency Stop | Physical E-stop on pendant and controller |
Safety Levels
Level | Color | Description | Example |
CRITICAL | π΄ | Immediate danger | Collision, excessive force |
HIGH | π | Potential damage | Near workspace boundary |
MEDIUM | π‘ | Caution needed | High-speed motion |
LOW | π’ | Informational | Normal operation |
Emergency Procedures
Immediate Stop: Press physical E-stop button
Power Off: Disconnect controller power if needed
Reset: Release E-stop and restart program
ROS2 Topics
Topic | Type | Description |
| sensor_msgs/JointState | Joint positions, velocities, efforts |
| tf2_msgs/TFMessage | Transform tree |
| std_msgs/Float64MultiArray | Joint commands |
Error Handling
Error Codes
Code | Name | Severity | Description |
-1 | CONNECTION_FAILED | π error | ROS2 node initialization failed |
-2 | INVALID_JOINT | π error | Unknown joint name |
-3 | JOINT_LIMIT | π΄ critical | Position outside limits |
-4 | WORKSPACE_VIOLATION | π΄ critical | Pose outside workspace |
-5 | SPEED_LIMIT | π error | Speed exceeds maximum |
-6 | PROTECTIVE_STOP | π΄ critical | Robot in protective stop |
Troubleshooting
Issue | Possible Cause | Solution |
Connection failed | ROS2 not running | Start ROS2 daemon |
Connection failed | Driver not launched | Launch UR ROS2 driver |
Command rejected | Protective stop | Release E-stop, unlock |
Command rejected | Joint limit | Check joint position limits |
Slow response | Network latency | Check Ethernet connection |
Dependencies
Python 3.10+
ROS2 Humble or Jazzy
mcp[fastmcp]β MCP frameworkrclpyβ ROS2 Python client librarygeometry_msgs,sensor_msgs,std_msgsβ ROS2 message typesmoveit_msgsβ MoveIt 2 (for IK planning)
Architecture
ur_mcp_server.py
βββ SDK_METADATA β SDK version and source info
βββ UR5State β Robot state dataclass
βββ UR5ROS2Bridge β ROS2 Node (extends rclpy.Node)
β βββ _joint_state_callback() β /joint_states subscriber
β βββ publish_joint_command() β /joint_group_position_controller publisher
β βββ _validate_joint_positions() β Safety check
β βββ _validate_cartesian_pose() β Workspace check
βββ MCP Tools β FastMCP tool definitionsReferences
License
MIT License β See LICENSE
The underlying UR ROS2 Driver is licensed under Apache-2.0.
Part of ROSClaw
rosclaw β Core framework (see arXiv paper)
rosclaw-g1-dds-mcp β Unitree G1 (DDS)
rosclaw-ur-ros2-mcp β UR5 arm (ROS2)
rosclaw-gimbal-mcp β GCU Gimbal (Serial)
rosclaw-ur-rtde-mcp β UR5 via RTDE
Generated by ROSClaw SDK-to-MCP Transformer
SDK Version: Universal Robots ROS2 Driver 2.4.0+ | Protocol: ROS2
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
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Give the physical world an API: cameras become typed endpoints your agent can read and act on.
Zero-auth ROS 2 Humanoid, Q3 Proxemics, 3-Level Voice Arbiter, A2A-MCP Bridge & W3C VC 2.0.
Connect Claude, Cursor, Codex, and other AI tools to your robotics mission data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to control Universal Robots through real-time connection management, status monitoring, and precise joint/linear motion control. Provides safe robot operation with built-in collision detection and simulation mode for development without physical hardware.6GPL 3.0
- AlicenseAqualityDmaintenanceEnables controlling robots in ROS environments through natural language, supporting topics, services, actions, and GUI tools.2436MIT
- AlicenseNot gradedqualityDmaintenanceEnables large language models to interact with ROS robots seamlessly, allowing natural language control, real-time sensor monitoring, and autonomous task execution without modifying existing robot code.Apache 2.0
- AlicenseAqualityBmaintenanceEnables LLM coding agents to inspect, control, and verify remote ROS2 robotics applications without a local ROS2 installation, supporting topics, services, actions, parameters, TF transforms, and automated test suites.16Apache 2.0