3D MCP Cursor Visualization
Unity MCP Logo - AI-Powered Development Tool for Cursor IDE

Unity MCP

Model Context Protocol Integration

Overview

A powerful Unity Editor plugin that implements the Model Context Protocol (MCP), enabling seamless integration between Unity and AI assistants. It provides real-time editor state monitoring, remote command execution, and comprehensive logging capabilities.

Unity Features

  • Real-time Unity Editor state monitoring
  • Remote C# code execution in the Unity Editor
  • Comprehensive logging system
  • Editor state tracking and serialization
  • WebSocket-based communication
  • Automatic reconnection handling
  • Command timeout protection
  • Error handling and validation

Unity Setup & Configuration

Requirements

  • Unity 2022.3 or later
  • Node.js 18 or later
  • npm 9 or later
  • Claude Desktop or compatible MCP client

Installation Instructions

# Prerequisites
- Unity 2022.3 or later
- Node.js 18 or later
- npm 9 or later

# Unity Plugin Setup
1. Copy the UnityMCPPlugin folder to your Unity project's Assets directory
2. Open Unity Editor
3. Access the plugin through Window > UnityMCP > Debug Window

# MCP Server Setup
cd unity-mcp-server
npm install
npm run build

# Starting the Server
cd unity-mcp-server
node build/index.js

Configuration

# Claude Desktop Configuration
{
  "mcpServers": {
    "unity": {
      "command": "node",
      "args": ["path/to/unity-mcp-server/build/index.js"]
    }
  }
}

Unity Available Tools

  • get_editor_state
  • execute_editor_command
  • get_logs

Unity Required Inputs

command

Type
string
Description
C# code to execute in the Unity Editor
Required
No

format

Type
string
Description
Output format for editor state (Raw, scripts only, no scripts)
Required
No

filter

Type
string
Description
Filter for logs by type, content, or timestamp
Required
No

Unity Use Cases

  • Unity game development assistance
  • Automated scene manipulation
  • GameObject creation and modification
  • Script debugging and analysis
  • Editor automation
  • Scene hierarchy inspection
  • Project structure analysis
  • Log monitoring and filtering

Frequently Asked Questions

A powerful Unity Editor plugin that implements the Model Context Protocol (MCP), enabling seamless integration between Unity and AI assistants. It provides real-time editor state monitoring, remote command execution, and comprehensive logging capabilities.
Unity 2022.3 or later, Node.js 18 or later, npm 9 or later, Claude Desktop or compatible MCP clientView detailed requirements
Follow the installation instructions in the setup section above.View installation guide

Unity MCP provides the following tools:

  • get_editor_state
  • execute_editor_command
  • get_logs