rosclaw-ur-rtde-mcp
MCP server for controlling Universal Robots arms and Robotiq grippers via RTDE protocol, enabling motion, force, I/O, and gripper operations.
README
rosclaw-ur-rtde-mcp
🌐 English | 中文
ROSClaw MCP Server for Universal Robots — using ur_rtde (RTDE protocol, direct TCP, no ROS2 required). With Robotiq Gripper support (port 63352 via UR Cap).
Part of the ROSClaw Embodied Intelligence Operating System.
SDK Information
| Property | Value |
|---|---|
| SDK Name | ur_rtde |
| SDK Version | 1.0.0+ |
| Protocol | RTDE (Real-Time Data Exchange) |
| Source Repository | gitlab.com/sdurobotics/ur_rtde |
| Documentation | ur_rtde Docs |
| License | MIT |
| Generated | 2026-04-07 |
Hardware Specification
| Specification | Value |
|---|---|
| Supported Robots | UR3, UR5, UR10, UR16, UR20 |
| Controller Types | CB3 Series, e-Series |
| Protocol | RTDE over TCP |
| Robot Port | 30004 (RTDE) |
| Dashboard Port | 29999 |
| Gripper Port | 63352 (Robotiq via UR Cap) |
| Max Joint Speed | 3.14 rad/s |
| Max Tool Speed | 3.0 m/s |
| Max Joint Acceleration | 40 rad/s² |
PolyScope Compatibility
| PolyScope Version | Compatibility | Notes |
|---|---|---|
| 5.6.0+ | ✅ Full | All features supported |
| 3.x - 5.5.x | ✅ Compatible | Some dashboard features return "N/A" |
| CB3 Series | ✅ Compatible | Tested on PolyScope 3.15.8 |
| e-Series | ✅ Compatible | Recommended for best performance |
Features
| Category | Tools |
|---|---|
| Connection | connect_robot, disconnect_robot |
| Robot Lifecycle | get_robot_info, robot_power_control, unlock_protective_stop, restart_safety |
| Motion | move_joint, move_linear, move_joint_ik (NEW), stop_motion, servo_joint, speed_joint |
| Force Control | force_mode, force_mode_stop, zero_ft_sensor |
| Teaching | teach_mode, jog |
| Kinematics | get_inverse_kinematics |
| Payload | set_payload |
| I/O | set_digital_output, set_speed_slider, set_analog_output, get_digital_io_state |
| State | get_robot_state, get_tcp_pose, get_joint_positions, get_tcp_force |
| Robotiq Gripper | connect_gripper, disconnect_gripper, gripper_activate, gripper_open, gripper_close, gripper_move, gripper_get_status |
| SDK Info | get_sdk_info |
MCP Resources: robot://status, robot://connection, robot://sdk_info
Quick Start
# Install dependencies
pip install ur-rtde mcp
# Run MCP server
python src/ur_rtde_mcp_server.py
# Or with uv
uv venv --python 3.11
source .venv/bin/activate
uv pip install ur-rtde mcp
python src/ur_rtde_mcp_server.py
Claude Desktop Configuration
Add to claude_desktop_config.json:
{
"mcpServers": {
"rosclaw-ur-rtde": {
"command": "python",
"args": ["/path/to/rosclaw-ur-rtde-mcp/src/ur_rtde_mcp_server.py"],
"transportType": "stdio",
"description": "UR via RTDE with Gripper Support",
"sdk_version": "1.0.0+",
"sdk_source": "https://gitlab.com/sdurobotics/ur_rtde"
}
}
}
LLM Usage Example — Robot Arm
User: Connect to the robot at 192.168.1.100, move to home position, then check TCP force.
LLM calls:
1. connect_robot("192.168.1.100")
2. robot_power_control("brake_release") # if needed
3. move_joint([0, -1.57, 0, -1.57, 0, 0]) # home position
4. get_tcp_force()
LLM Usage Example — Robotiq Gripper
User: Connect to the robot and gripper, then pick up an object.
LLM calls:
1. connect_robot("192.168.1.100")
2. connect_gripper() # Connects to same IP, port 63352
3. gripper_activate() # Activates + auto-calibrates
4. gripper_open() # Open before picking
5. move_joint([...]) # Move above object
6. gripper_close(speed=128, force=100) # Close with controlled force
7. move_joint([...]) # Move to drop position
8. gripper_open() # Release object
moveJ_IK — Cartesian Pose Control (NEW)
The move_joint_ik tool moves the robot to a Cartesian pose using inverse kinematics (faster than moveL, more intuitive than joint angles).
# Move to specific Cartesian pose [x, y, z, rx, ry, rz]
move_joint_ik(
pose=[-0.212, 0.319, 0.41, -3.1416, 0, 0], # meters + rotation vector
speed=0.5, # rad/s (conservative)
acceleration=0.8 # rad/s²
)
Use Case: When you know the desired TCP position in Cartesian space but don't want to calculate joint angles manually.
Safety Information
WARNING: This MCP server controls an industrial robot arm. Improper use can cause:
- Serious injury or death
- Equipment damage
- Property damage
Safety Features
| Feature | Description |
|---|---|
| Joint Velocity | Max 3.14 rad/s enforced |
| Tool Velocity | Max 3.0 m/s enforced |
| Joint Acceleration | Max 40 rad/s² enforced |
| Protective Stop Check | check_safe_to_move() blocks commands during stop |
| Emergency Stop | Physical E-stop on pendant |
Safety Levels
| Level | Color | Description | Example |
|---|---|---|---|
| CRITICAL | 🔴 | Immediate danger | Collision, protective stop |
| HIGH | 🟠 | Potential damage | Near joint limits |
| MEDIUM | 🟡 | Caution needed | Force mode active |
| LOW | 🟢 | Informational | Status check |
Emergency Procedures
- Immediate Stop: Press physical E-stop or call
stop_motion() - Protective Stop: Wait 5s, then call
unlock_protective_stop() - Power Off: Use
robot_power_control("power_off")if needed
Error Handling
Error Codes
| Code | Name | Severity | Description |
|---|---|---|---|
| -1 | CONNECTION_FAILED | 🟠 error | RTDE connection failed |
| -2 | TIMEOUT | 🟠 error | Command response timeout |
| -3 | INVALID_PARAMETER | 🟠 error | Invalid joint angle or pose |
| -4 | SAFETY_VIOLATION | 🔴 critical | Exceeds velocity/acceleration limits |
| -5 | PROTECTIVE_STOP | 🔴 critical | Robot in protective stop |
| -6 | NOT_INITIALIZED | 🟠 error | Not connected to robot |
Troubleshooting
| Issue | Possible Cause | Solution |
|---|---|---|
| Connection failed | Wrong IP | Verify robot IP address |
| Connection failed | Network issue | Check Ethernet cable |
| Command rejected | Protective stop | Unlock protective stop |
| Command rejected | Not in remote | Enable remote control mode |
| Gripper not responding | UR Cap not installed | Install Robotiq_grippers cap |
| Slow motion | Speed slider | Check speed slider setting |
Hardware Requirements
- Universal Robots: UR3, UR5, UR10, UR16, UR20 (CB3 or e-Series)
- Communication: RTDE over TCP port 30004
- Optional - Robotiq Gripper: TCP port 63352 (via Robotiq_grippers UR Cap)
- Optional - F/T Sensor: Required for
force_modeandzero_ft_sensor
Gripper Position
| Position | Value | Description |
|---|---|---|
| 0 | Fully open | Fingers at maximum spread |
| 255 | Fully closed | Fingers fully closed |
| 128 | Halfway | 50% closure |
Use gripper_move(position=64, speed=255, force=100) for precise positioning.
Architecture
LLM (Claude)
│ MCP tools (semantic level)
▼
ur_rtde_mcp_server.py (FastMCP, stdio)
│
ur_rtde_bridge.py (thread-safe wrapper, threading.Lock)
├───────────────────────────────────────┐
│ │
ur_rtde Python bindings robotiq_gripper.py
│ TCP port 30004 │ TCP port 63352
▼ ▼
UR Robot Controller (RTDE) Robotiq Gripper (UR Cap)
File Structure
rosclaw-ur-rtde-mcp/
├── src/
│ ├── ur_rtde_mcp_server.py # MCP server with FastMCP (~600 lines)
│ ├── ur_rtde_bridge.py # Thread-safe bridge for RTDE/IO/Dashboard (~270 lines)
│ └── robotiq_gripper.py # Robotiq gripper direct TCP control (297 lines)
├── tests/
│ ├── test_ur_rtde_bridge.py # Unit tests for bridge (15 passed)
│ ├── test_robotiq_gripper.py # Unit tests for gripper (15 passed)
│ ├── system_test_moveJ_IK.py # System test for moveJ_IK feature (hardware required)
│ ├── full_function_test.py # Complete system test for all MCP tools (hardware required)
│ ├── diagnose_failures.py # Diagnostic tool for troubleshooting
│ └── failure_analysis_report.md # Analysis of test failures
├── config/
│ └── mcp_config.json # MCP client configuration
├── pyproject.toml
├── README.md
└── LICENSE
Testing
Unit Tests (No Hardware Required)
# Run all unit tests (30 total, no hardware required)
pytest tests/test_ur_rtde_bridge.py tests/test_robotiq_gripper.py -v
# Run specific test file
pytest tests/test_ur_rtde_bridge.py -v
pytest tests/test_robotiq_gripper.py -v
System Tests (Hardware Required)
⚠️ Warning: These tests require a real UR robot. Ensure safety before running.
# Test moveJ_IK feature (requires robot at ROBOT_IP in the script)
python tests/system_test_moveJ_IK.py
# Full functional test of all MCP tools
python tests/full_function_test.py
# Diagnostic tool for troubleshooting
python tests/diagnose_failures.py
Test Reports
System tests generate timestamped reports:
ur5_system_test_report_YYYYMMDD_HHMMSS.txtur5_full_test_report_YYYYMMDD_HHMMSS.txt
References
- ur_rtde GitLab
- ur_rtde Documentation
- Universal Robots RTDE Guide
- Robotiq Gripper Manual
- MCP Protocol
Changelog
v0.2.0 (2025-03-25)
- ✨ NEW: Added
moveJ_IKmethod toURRTDEBridgefor Cartesian pose control via IK - ✨ NEW: Added comprehensive system tests for hardware validation
- ✨ NEW: Added diagnostic tools for troubleshooting
- ✨ NEW: Added SDK metadata and
get_sdk_info()tool - 🐛 FIX:
get_robot_infonow handles PolyScope < 5.6.0 gracefully - 📚 DOC: Updated README with compatibility matrix and new features
v0.1.0 (Initial Release)
- Initial MCP server implementation
- Support for UR robots via RTDE protocol
- Robotiq gripper support
- Thread-safe bridge implementation
License
MIT License — See LICENSE
The underlying ur_rtde library is also MIT licensed.
Part of ROSClaw
- rosclaw — Core framework (see arXiv paper)
- rosclaw-g1-dds-mcp — Unitree G1 humanoid
- rosclaw-ur-ros2-mcp — UR5 via ROS2/MoveIt
- rosclaw-gimbal-mcp — GCU gimbal
- rosclaw-ur-rtde-mcp — UR via RTDE (this repo)
Generated by ROSClaw SDK-to-MCP Transformer
SDK Version: ur_rtde 1.0.0+ | Protocol: RTDE (TCP) | With Robotiq Gripper Support
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。