TL;DR

Unity MCP is an open-source bridge that connects AI assistants (Claude, Cursor, VS Code Copilot, Windsurf) directly to your Unity Editor using the Model Context Protocol. Key highlights:

  • Natural language game development: Tell Claude “Create a red cube with physics” and watch it happen in Unity
  • Full editor control: Manage assets, scenes, materials, scripts, prefabs, and VFX through AI
  • 25+ powerful tools: From manage_gameobject to batch_execute for complex operations
  • Multi-client support: Works with Claude Desktop, Cursor, VS Code Copilot, Windsurf, and more
  • Automation-ready: Automate repetitive workflows, run tests, and batch operations
  • Active development: v9.4.4 released February 2026, 5,800+ stars, 700+ forks
  • MIT licensed: Free for commercial and personal use

Install: Window > Package Manager > Add package from git URL → paste https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main


What is Unity MCP?

Game development has always been a dance between creativity and technical complexity. You have an idea - maybe a platformer with dynamic lighting, or an RPG with procedural dungeons - but translating that vision into working code requires navigating Unity’s vast API, remembering component hierarchies, and wrestling with editor workflows.

Unity MCP changes this equation. It’s a bridge that lets AI assistants understand and control your Unity Editor, turning natural language into actual game development actions.

Instead of:

  1. Right-clicking in Hierarchy
  2. Selecting 3D Object → Cube
  3. Opening the Inspector
  4. Finding the MeshRenderer
  5. Creating a new Material
  6. Setting the color to red
  7. Adding a Rigidbody component
  8. Configuring mass and drag values

You simply tell Claude: “Create a red cube with physics at position 0, 5, 0 that will fall when I hit play.”

The AI understands your intent, uses Unity MCP’s tools to execute the sequence, and reports back. Your red cube appears in the scene, complete with Rigidbody, ready to fall.

This isn’t a gimmick or demo - it’s a production-ready tool that’s been adopted by game studios and indie developers alike. With over 5,800 GitHub stars and 700+ forks, Unity MCP represents one of the most significant applications of the Model Context Protocol to creative tooling.

How It Works: The MCP Architecture

Unity MCP leverages Anthropic’s Model Context Protocol (MCP), a standardized way for AI assistants to interact with external tools. Here’s the architecture:

┌─────────────────┐     HTTP/stdio     ┌─────────────────┐
│   AI Assistant  │ ←─────────────────→ │   MCP Server    │
│ (Claude/Cursor) │                     │  (Python/uvx)   │
└─────────────────┘                     └────────┬────────┘

                                        HTTP (localhost:8080)

                                        ┌────────▼────────┐
                                        │  Unity Editor   │
                                        │   (C# Plugin)   │
                                        └─────────────────┘
  1. Unity Package: A C# package that runs inside Unity Editor, exposing an HTTP server on localhost:8080
  2. MCP Server: A Python server that translates MCP commands to Unity HTTP calls
  3. AI Client: Claude Desktop, Cursor, or any MCP-compatible assistant

When you ask Claude to create an object, it:

  1. Recognizes this is a Unity task
  2. Calls the manage_gameobject tool with appropriate parameters
  3. MCP server forwards the request to Unity’s local HTTP endpoint
  4. Unity executes the action in the editor
  5. Results flow back through the chain

The beauty is that AI assistants can maintain context across operations. Create a character, then ask to “give them a walking animation” - the AI remembers what you created and applies changes to the correct object.

Installation: Three Simple Steps

Prerequisites

Before installing, ensure you have:

  • Unity 2021.3 LTS or newer - Download Unity
  • Python 3.10+ with uv - Install uv
  • An MCP Client - Claude Desktop, Cursor, VS Code Copilot, or Windsurf

Step 1: Install the Unity Package

In Unity, navigate to: Window > Package Manager > + > Add package from git URL...

Enter:

https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main

For bleeding-edge features, use the beta branch:

https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#beta

Alternative installation methods include:

  • Unity Asset Store: Search “MCP for Unity” in the Asset Store
  • OpenUPM: openupm add com.coplaydev.unity-mcp

Step 2: Start the Server

  1. In Unity: Window > MCP for Unity
  2. Click Start Server
  3. Wait for the HTTP server to launch on localhost:8080

Step 3: Connect Your AI Client

Select your MCP client from the dropdown in the Unity MCP window and click Configure. The plugin will automatically update your client’s configuration.

For Claude Desktop, this adds to your claude_desktop_config.json:

{
  "mcpServers": {
    "unityMCP": {
      "url": "http://localhost:8080/mcp"
    }
  }
}

For VS Code Copilot:

{
  "servers": {
    "unityMCP": {
      "type": "http",
      "url": "http://localhost:8080/mcp"
    }
  }
}

Look for the 🟢 “Connected ✓” indicator. You’re ready to develop with AI.

Available Tools: Your AI Development Arsenal

Unity MCP exposes 25+ tools that cover every aspect of game development. Here’s what your AI assistant can do:

Scene and Object Management

ToolDescription
manage_gameobjectCreate, modify, delete, duplicate GameObjects
manage_sceneLoad, save, create scenes; manage scene hierarchy
manage_componentsAdd, remove, configure any Unity component
find_gameobjectsQuery objects by name, tag, layer, or component
manage_prefabsCreate, instantiate, and modify prefabs

Asset Pipeline

ToolDescription
manage_assetImport, create, modify, delete project assets
manage_materialCreate and configure materials
manage_textureImport and modify textures
manage_shaderWork with shaders and shader graphs
manage_vfxControl Visual Effect Graph assets

Code and Scripting

ToolDescription
manage_scriptCreate, read, modify C# scripts
create_scriptGenerate new MonoBehaviour scripts
validate_scriptCheck scripts for compilation errors
apply_text_editsMake precise code modifications
script_apply_editsApply structured edits to script files

Editor and Automation

ToolDescription
manage_editorControl editor state, play mode, selection
execute_menu_itemTrigger any Unity menu command
batch_executeRun multiple operations in sequence (10-100x faster)
run_testsExecute unit and integration tests
read_consoleCheck console logs and errors
refresh_unityForce asset database refresh

ScriptableObjects and Data

ToolDescription
manage_scriptable_objectCreate and modify ScriptableObjects

Practical Examples: AI-Powered Workflows

Let’s see Unity MCP in action with real development scenarios.

Example 1: Building a Player Character

Prompt to Claude:

“Create a player character with a capsule collider, character controller, and a basic movement script that uses WASD for movement and Space for jumping.”

Claude will:

  1. Create a new GameObject named “Player”
  2. Add a CapsuleCollider component
  3. Add a CharacterController component
  4. Generate a new C# script called “PlayerController”
  5. Implement WASD movement and jump logic
  6. Attach the script to the player
  7. Report the completed setup

All in one request. The resulting script handles input, applies movement with gravity, and includes jump functionality.

Example 2: Creating a Level with Obstacles

Prompt:

“Build a simple obstacle course with 5 platforms at increasing heights, connected by ramps. Each platform should be a different color. Add a goal trigger at the end that logs ‘Level Complete’ when entered.”

Claude orchestrates:

  1. Creates 5 platform cubes with increasing Y positions
  2. Creates 4 ramp objects connecting them
  3. Creates 5 materials with distinct colors
  4. Applies materials to each platform
  5. Creates a goal trigger object
  6. Generates a script that logs on trigger enter
  7. Attaches the script with proper trigger configuration

Example 3: Batch Operations for Polish

One of Unity MCP’s killer features is batch_execute, which runs multiple operations in a single call:

Prompt:

“For all objects tagged ‘Enemy’, add a health component with 100 HP, a red outline shader, and enable mesh shadows.”

Instead of 30+ individual API calls, Claude uses batch_execute to:

  1. Find all objects with the “Enemy” tag
  2. Add HealthComponent to each
  3. Set health to 100
  4. Apply outline shader
  5. Configure shadow settings

This runs 10-100x faster than sequential calls, crucial for large scenes.

Example 4: Testing and Validation

Prompt:

“Run all unit tests in the PlayerTests assembly and tell me which ones failed.”

Claude executes run_tests, waits for completion with get_test_job, and provides a detailed report of passed and failed tests with error messages.

Advanced Features

Multiple Unity Instances

Working on multiple Unity projects simultaneously? Unity MCP supports instance switching:

  1. Ask Claude to check unity_instances resource
  2. Use set_active_instance with the project identifier (e.g., MyGame@abc123)
  3. All subsequent commands route to that instance

Roslyn Script Validation

For strict code validation that catches undefined types and namespaces before runtime:

  1. Install NuGetForUnity
  2. Add Microsoft.CodeAnalysis v5.0 via NuGet
  3. Add USE_ROSLYN to Scripting Define Symbols
  4. Restart Unity

Now validate_script provides compiler-level accuracy, catching errors that would otherwise only appear at build time.

Custom MCP Tools

Unity MCP is extensible. You can create custom tools that expose project-specific functionality:

[MCPTool("spawn_enemy")]
public static string SpawnEnemy(string enemyType, Vector3 position)
{
    // Your custom enemy spawning logic
    var prefab = Resources.Load<GameObject>($"Enemies/{enemyType}");
    Instantiate(prefab, position, Quaternion.identity);
    return $"Spawned {enemyType} at {position}";
}

Claude can now call spawn_enemy with natural language: “Spawn a goblin at position 10, 0, 5.”

Performance Considerations

Unity MCP is designed for interactive development, not runtime use:

  • Editor-only: The bridge runs in Unity Editor, not in builds
  • Local network: All communication stays on localhost
  • Batch for scale: Use batch_execute for operations on many objects
  • Async operations: Long tasks like asset imports run asynchronously

For large projects with thousands of objects, consider breaking operations into logical batches and using queries to work with specific subsets.

Troubleshooting Common Issues

Unity Bridge Not Connecting

  1. Check Window > MCP for Unity status
  2. Ensure the HTTP server shows “Running”
  3. Verify no firewall blocks localhost:8080
  4. Try restarting Unity

Server Not Starting

  1. Verify uv --version works in terminal
  2. Check Python 3.10+ is installed
  3. Review terminal output for error messages
  4. Try running the server manually: uvx --from mcpforunityserver mcp-for-unity

AI Client Not Recognizing Unity Tools

  1. Restart your AI client after configuration
  2. Verify the config file syntax (JSON is strict about commas)
  3. Check the MCP server is running
  4. Try the HTTP URL directly: curl http://localhost:8080/mcp

The Coplay Ecosystem

Unity MCP is maintained by Coplay, which offers three AI tools for Unity:

  1. MCP for Unity (this project): Free, open-source, MIT licensed
  2. Coplay: Premium AI assistant with deeper Unity integration
  3. Coplay MCP: Additional MCP server for Coplay-specific tools

For most developers, the free MCP for Unity provides everything needed. The premium Coplay adds features like visual editing assistance and tighter IDE integration.

For AI Agents

Repository: github.com/CoplayDev/unity-mcp

Quick Commands:

# Check if Unity package is installed
# In Unity: Window > Package Manager, search "MCP for Unity"

# Start server (from Unity)
# Window > MCP for Unity > Start Server

# Configure Claude Desktop
# The plugin auto-updates claude_desktop_config.json

# Manual server run (for debugging)
uvx --from mcpforunityserver mcp-for-unity --transport http --port 8080

Key Resources:

  • unity_instances - List running Unity Editor instances
  • menu_items - Available Unity menu commands
  • editor_state - Current editor state (play mode, selection, etc.)
  • project_info - Project settings and configuration
  • prefab_api - Prefab-related operations reference

Most Useful Tools:

  1. manage_gameobject - Core object manipulation
  2. manage_script - Code generation and editing
  3. batch_execute - Multiple operations in one call (fast)
  4. find_gameobjects - Query objects by various criteria
  5. read_console - Check for errors and warnings

Configuration Paths:

  • macOS Claude: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows Claude: %APPDATA%\Claude\claude_desktop_config.json
  • Cursor: ~/.cursor/mcp.json
  • VS Code: Settings JSON under MCP configuration

Performance Tip: Always prefer batch_execute when doing more than 3 operations. Individual tool calls have HTTP overhead; batching reduces this to a single round-trip.

Compatibility: Unity 2021.3 LTS through Unity 6, all platforms. Requires MCP-compatible AI client.


Conclusion

Unity MCP represents a fundamental shift in how we interact with game development tools. Instead of memorizing API calls and navigating complex UIs, you describe what you want and let AI handle the implementation details.

This isn’t about replacing game developers - it’s about amplifying them. Junior developers can learn by seeing how AI translates requests into Unity actions. Senior developers can automate tedious tasks and focus on creative decisions. Teams can standardize workflows through documented AI prompts.

With 5,800+ stars and active development (v9.4.4 just released), Unity MCP is ready for production use. The MIT license means you can use it commercially without restrictions.

Whether you’re prototyping a game jam entry or building a commercial title, Unity MCP is worth adding to your toolkit. The barrier to entry is low (three steps to install), and the productivity gains are immediate.

Give your AI assistant control of Unity. You might be surprised how natural game development becomes.


Links: