RealVirtual MCP
Unity MCP Server - AI agent integration for Unity Digital Twin simulations via MCP protocol
What is RealVirtual MCP?
RealVirtual MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to unity mcp server - ai agent integration for unity digital twin simulations via mcp protocol
Unity MCP Server - AI agent integration for Unity Digital Twin simulations via MCP protocol
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Unity MCP Server - AI agent integration for Unity Digital Tw
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx io-realvirtual-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use RealVirtual MCP
RealVirtual MCP is an open-source Unity package that implements a Model Context Protocol server, enabling AI agents like Claude or Cursor to control Unity Editor scenes, GameObjects, components, transforms, physics, prefabs, and industrial digital twin simulations in real time. Tools are defined in C# with a simple attribute and auto-discovered via reflection — no Python edits required.
Prerequisites
- Unity 6000.0 or newer installed
- Newtonsoft JSON Unity package (com.unity.nuget.newtonsoft-json)
- git installed and available in PATH
- An MCP-compatible AI client such as Claude Desktop or Claude Code
Install the Unity Package via Package Manager
Open Unity, go to Window > Package Manager, click the + button, choose 'Add package from git URL', and enter the repository URL. Unity will download and install the package automatically.
https://github.com/game4automation/io.realvirtual.mcp.gitClone the Python MCP Server
After installation a brain icon appears in the Unity toolbar. Click the gear icon to open the setup popup, then click 'Clone Python Server'. This downloads the companion Python server (~70 MB) into your project's StreamingAssets folder.
cd <your-project>/Assets/StreamingAssets
git clone https://github.com/game4automation/realvirtual-MCP.gitConfigure Your MCP Client
In the setup popup click 'Configure Claude' to automatically write the MCP server entry to Claude Desktop or Claude Code config. For manual setup, add the server entry to your client's configuration file pointing to the Python server.
Verify the WebSocket Connection
The brain icon in the Unity toolbar changes colour to indicate connection state. Open your MCP client and ask it to list available tools — it should enumerate the 60+ built-in Unity tools. The WebSocket server binds to port 18711 by default and auto-increments if the port is busy.
Extend with Custom C# Tools
Add the [McpTool] attribute to any public static method in your Unity scripts to expose it as an MCP tool. The server discovers tools via reflection on every recompile — no Python changes and no server restart needed.
[McpTool("Spawn an enemy at position")]
public static string SpawnEnemy(
[McpParam("Prefab name")] string prefab,
[McpParam("X position")] float x,
[McpParam("Z position")] float z)
{
// Your Unity code here - runs on main thread
}RealVirtual MCP Examples
Client configuration
Claude Desktop config entry that launches the Python MCP server. The server path points to the cloned realvirtual-MCP directory inside your Unity project's StreamingAssets folder.
{
"mcpServers": {
"realvirtual-mcp": {
"command": "python",
"args": ["<your-project>/Assets/StreamingAssets/realvirtual-MCP/server.py"]
}
}
}Prompts to try
Once connected, use these prompts in your AI client to control Unity scenes and objects.
- "List all GameObjects in the current scene hierarchy"
- "Create a new cube GameObject at position (0, 1, 0) and name it TestCube"
- "Take a screenshot of the Game view"
- "Play the simulation and report the current sim_status after 2 seconds"
- "Set the position of GameObject 'Player' to (5, 0, 5)"Troubleshooting RealVirtual MCP
Brain icon stays red / AI client cannot find tools
Ensure Unity is open and the WebSocket server is running on port 18711. Check Tools > realvirtual > MCP in the Unity menu and click 'Start Server'. Also verify that git is in PATH so the Python server cloned correctly.
Tools disappear after Unity recompiles scripts
This is normal — the package auto-reconnects after a domain reload. Wait a few seconds for Unity to finish recompiling and for the WebSocket server to restart, then retry. The brain icon will turn green when reconnected.
Package not found or fails to install from git URL
Confirm git is installed and accessible in the system PATH that Unity uses. On macOS, install git via Homebrew (brew install git) and restart Unity. Remove any stale lock entry for io.realvirtual.mcp from Packages/packages-lock.json and reimport.
Frequently Asked Questions about RealVirtual MCP
What is RealVirtual MCP?
RealVirtual MCP is a Model Context Protocol (MCP) server that unity mcp server - ai agent integration for unity digital twin simulations via mcp protocol It connects AI assistants to external tools and data sources through a standardized interface.
How do I install RealVirtual MCP?
Follow the installation instructions on the RealVirtual MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with RealVirtual MCP?
RealVirtual MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is RealVirtual MCP free to use?
Yes, RealVirtual MCP is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
RealVirtual MCP Alternatives — Similar Cloud Services Servers
Looking for alternatives to RealVirtual MCP? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up RealVirtual MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use RealVirtual MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.