Introduction

The Model Context Protocol (MCP) represents a breakthrough in AI-system integration, enabling AI assistants to interact with external tools and services through a standardized interface. When applied to industrial robotics, MCP transforms how we control Universal Robots, allowing natural language commands to control sophisticated robotic systems safely and efficiently.

This tutorial will guide you through setting up and using the Universal Robot MCP server, enabling AI assistants like Claude, ChatGPT, and other MCP-compatible clients to control UR robots through simple conversational commands. You’ll learn installation, configuration, basic operations, and advanced safety features.

Requirements:

  • Computer with Python 3.8+ (Windows, macOS, or Linux)
  • MCP-compatible client (LM Studio, VS Code + Cline, Cursor, or Zed)
  • Universal Robot (UR3/UR5/UR10/UR16/UR20/UR30) or simulation environment
  • Network connection between computer and robot
  • Basic understanding of robot safety procedures

Note: The Universal Robot MCP server is currently under active development and testing. Please exercise caution when using it with production systems.

Github Repository
PyPI Package

Model Context Protocol

Model Context Protocol (MCP) is an open standard developed by Anthropic for connecting AI assistants to external data sources and tools. Instead of creating custom integrations for each system, MCP provides a universal protocol that enables AI models to securely access content repositories, business tools, and development environments.

Think of MCP as a standardized bridge that allows AI assistants to break free from information silos and access real-world data. For robotics applications, this means AI can directly control physical systems like Universal Robots while maintaining context across different tools and datasets.

Introducing the Model Context Protocol

Universal Robot MCP

The Universal Robot MCP server is a specialized implementation that bridges AI assistants with Universal Robots industrial arms. This server provides secure, real-time control capabilities while maintaining the safety standards required for industrial automation.

Key Features:

  • Robot Connection Management: Establish and maintain stable connections to UR robots
  • Real-time Status Monitoring: Track joint positions, poses, and system health
  • Motion Control: Execute both joint-based and linear movements with precision
  • Safety Integration: Built-in collision detection and movement validation
  • Simulation Mode: Test robot programs without physical hardware

Available MCP Tools:

  • connect_robot - Establish connection to Universal Robot
  • disconnect_robot - Safely disconnect from robot
  • get_robot_status - Retrieve current robot state and position
  • move_robot_joints - Control individual joint angles
  • move_robot_linear - Execute Cartesian coordinate movements

The server supports all Universal Robot models (UR3, UR5, UR10, UR16, UR20, UR30) and maintains compatibility with UR software versions 3.0 and above.

Step 1: Install MCP Client

You need an MCP-compatible client to communicate with the Universal Robot MCP server. Several options are available (in no particular order):

LM Studio

Free local AI application with native MCP support (v0.3.17+).

  1. Download from lmstudio.ai
  2. Install and launch the application
  3. MCP support is built-in

LM Studio MCP Documentation

VS Code

Microsoft’s development environment with MCP support.

  1. Install Visual Studio Code
  2. Configure MCP servers through settings
  3. Use with GitHub Copilot or other AI extensions

VS Code MCP Documentation

Cline

AI coding assistant extension with MCP integration.

  1. Download from cline.bot
  2. Install as VS Code extension or use standalone
  3. Configure MCP servers through extension settings

Cline MCP Documentation

Cursor

AI code editor with MCP support.

  1. Download from cursor.com
  2. Create account (free tier available)
  3. Configure MCP in Settings > Features > MCP

Cursor MCP Documentation

OpenCode

Terminal-based AI coding assistant with MCP integration.

  1. Download from opencode.ai
  2. Supports multiple AI models (OpenAI, Claude, Gemini)
  3. Configure MCP servers through config file

OpenCode MCP Documentation

Zed

Open-source editor with basic MCP support.

  1. Download from zed.dev
  2. Currently supports prompt templates
  3. Full tool support in development

Zed MCP Documentation

Claude Desktop

Official desktop app from Anthropic with native MCP support.

  1. Download from claude.ai/desktop
  2. Requires Claude Pro subscription for MCP features
  3. Configure MCP servers through app settings

Choose the client that fits your workflow and proceed to the next step.

Step 2: (Optional) Install uv

Depending on your configuration method choice, you may need to install additional tools:

If you want to use uvx (isolated execution):

1
2
3
4
5
# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# On Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
1
2
3
4
5
# With Homebrew (macOS only)
# First install Homebrew if you don't have it:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Then install uv:
brew install uv
1
2
3
4
5
# With pip
pip install uv

# With pipx
pipx install uv

If you want to use pip method:

Ensure you have Python 3.8+ installed with pip. No additional installation needed.

Update uv (if installed via standalone installer):

1
uv self update

uvx is included with uv and provides isolated Python package execution.

Get Homebrew | uv official repository

Step 3: Configure UR MCP

Now configure the Universal Robot MCP server in your chosen MCP client:

  1. Open LM Studio and go to the Program tab
  2. Click Install > Edit mcp.json to open the configuration file
  3. Add the Universal Robot MCP server configuration:
1
2
3
4
5
6
7
8
{
"mcpServers": {
"universal-robot": {
"command": "uvx",
"args": ["universal-robot-mcp"]
}
}
}
  1. Create a .vscode/mcp.json file in your workspace, or
  2. Run “MCP: Open User Configuration” for global setup
  3. Add the server configuration:
1
2
3
4
5
6
7
8
9
10
{
"servers": {
"universal-robot": {
"command": "uvx",
"args": [
"universal-robot-mcp"
]
}
}
}
  1. Click the MCP Servers icon in Cline
  2. Click “Configure MCP Servers”
  3. Add the server configuration:
1
2
3
4
5
6
7
8
{
"mcpServers": {
"universal-robot": {
"command": "uvx",
"args": ["universal-robot-mcp"]
}
}
}
  1. Go to Settings > Features > MCP
  2. Click “Add Custom MCP” or edit the mcp.json file
  3. Add the configuration:
1
2
3
4
5
6
7
8
{
"mcpServers": {
"universal-robot": {
"command": "uvx",
"args": ["universal-robot-mcp"]
}
}
}
  1. Edit your OpenCode config file
  2. Add under the mcp section:
1
2
3
4
5
6
7
8
9
10
{
"mcp": {
"universal-robot": {
"command": "uvx",
"args": [
"universal-robot-mcp"
]
}
}
}
  1. Open Claude Desktop settings
  2. Navigate to MCP configuration
  3. Add the server:
1
2
3
4
5
6
7
8
{
"mcpServers": {
"universal-robot": {
"command": "uvx",
"args": ["universal-robot-mcp"]
}
}
}

Configuration Options:

You can choose between two methods:

  1. uvx method (uses the configurations shown above)
  2. pip method - Replace the command with:
1
2
3
4
5
"command": "python",
"args": [
"-m",
"universal_robot_mcp.server"
]

Note: pip method requires pre-installing with pip install universal-robot-mcp.

Optional Configuration:

To specify a custom robot IP address, add an env section to your configuration:

1
2
3
4
5
6
7
8
9
{
"command": "uvx",
"args": [
"universal-robot-mcp"
],
"env": {
"ROBOT_IP": "192.168.1.100"
}
}

Replace 192.168.1.100 with your robot’s actual IP address. If not specified, the server will use the default IP 192.168.1.100.

Next Steps:

  • Save the configuration file
  • Restart your MCP client
  • The Universal Robot MCP server will be available as a tool

Step 4: Basic Usage

Once configured, you can start controlling your Universal Robot through natural language commands:

Connect to Your Robot:

1
"Connect to the robot at IP address 192.168.1.100"

Basic Commands:

1
2
3
4
5
"What is the current status of the robot?"
"Move joint 1 to 45 degrees"
"Move the robot to position x=0.3, y=0.2, z=0.5"
"Return the robot to home position"
"Stop the robot immediately"

Connecting to Different Systems:

  • Real Robot: Use the robot’s actual IP address
  • URSim Simulator: Use 127.0.0.1 or localhost
  • Polyscope: Check robot’s IP in Installation > General

Example:

1
2
3
4
5
You: "Connect to the Universal Robot"
AI: ✅ Connected successfully. Robot is ready.

You: "Move up by 5 centimeters"
AI: ✅ Movement completed.

Universal Robot MCP Usage

Using with Other MCP Servers:

The Universal Robot MCP server can be used alongside other MCP servers in the same client. For example, you can combine it with file system tools, web scrapers, or database connectors to create powerful automation workflows:

1
2
3
"Take a photo with the camera MCP server, then move the robot to inspect the part"
"Read the CSV file and move the robot to each coordinate listed"
"Get the current time and schedule the robot movement accordingly"

Conclusion

You’ve successfully learned how to set up and use the Universal Robot MCP server to control UR robots through AI assistants. This integration enables natural language control of industrial robots while maintaining safety standards and precision.

Key Benefits:

  • Natural language robot control through AI assistants
  • Multi-client support across different development environments
  • Built-in safety features for industrial applications
  • Seamless integration with other MCP servers

Next Steps:

  • Explore advanced robot programming through conversational AI
  • Combine with vision systems and sensors through additional MCP servers
  • Develop custom automation workflows using natural language commands

Resources:

The Universal Robot MCP server represents the future of human-robot interaction, where complex industrial automation becomes accessible through simple conversation. Start experimenting with your UR robot today and discover new possibilities in AI-driven automation.