Skip to content

realvirtual.io MCP Server

Give AI agents full control over your Unity Editor — scenes, GameObjects, components, simulation, digital twins, and more.

MCP Server running in Unity with 91 tools available for AI agents

The realvirtual MCP Server is a free, open-source Unity package that implements the Model Context Protocol (MCP). It lets AI agents like Claude, Cursor, or any MCP-compatible client interact with Unity in real time.

The package works with any Unity project — including industrial digital twins, robotics simulation, and virtual commissioning.

AI Agent (Claude Desktop / Claude Code / Cursor)
|
| MCP Protocol (stdio or SSE)
v
Python MCP Server
|
| WebSocket (JSON, Port 18711)
v
Unity Package (C# WebSocket server + tool registry)

The package runs a WebSocket server inside the Unity Editor. When an AI agent sends a tool call, the Python MCP server forwards it over WebSocket to Unity, which executes it on the main thread and returns the result.

  • Works with any Unity project — Not tied to a specific framework or asset
  • Zero Python knowledge needed — Define tools in C#, the language you’re already using
  • Auto-discovery — Tools are found via reflection, no manual registration
  • 90+ built-in tools — Scene, GameObjects, components, transforms, simulation, screenshots, and more
  • Extensible in minutes — Add [McpTool] to any static method and it’s available to AI agents
  • Self-contained — Ships with embedded Python 3.12, no system Python required
  • One-click setup — Download Python server and configure Claude from the Unity toolbar
  • Survives domain reloads — Auto-reconnects after Unity recompiles scripts
  • Multi-instance support — Run multiple Unity instances, each with its own MCP server

When combined with the realvirtual framework, you get additional MCP tools purpose-built for industrial digital twins and virtual commissioning:

  • Drives — Control motors, actuators, conveyors
  • Sensors — Read industrial sensors
  • PLC Signals — Read/write PLC I/O
  • Robot IK — Inverse kinematics control

This enables AI agents to operate complete virtual factory simulations — move robots, control conveyors, read sensors, and interact with PLC programs in real time.

The toolbar brain icon shows connection state:

ColorMeaning
GrayServer stopped
YellowServer running, no clients connected
GreenClient(s) connected

The activity label next to it shows the currently executing tool call with elapsed time.