Unity MCP icon

Unity MCP

AI-AssistedFOSS · MIT

Open-source Model Context Protocol bridge for Unity Editor

Free (MIT) · CoplayDev & Contributors · Check whether final shipped assets contain ML-generated output under Valve's Pre-Generated guidelines.

AI
AI-Assisted
IP
Commercial-Safe IP
Engines
Unity
Platforms
Windows · macOS · Linux · CLI
Version
0.9
Technical Summary

Unity MCP is a free, MIT-licensed open-source Unity Package Manager plugin and Model Context Protocol relay created by CoplayDev and contributors. Supporting Windows, macOS, Linux, and CLI workflows, it connects Cursor, Claude Code, and Windsurf to the live Unity Editor to edit GameObjects, C# scripts, Prefabs, and Console logs.

Technical Overview

Architecture and Production Workflow

Coding agents editing .cs files outside Unity operate half-blind: they cannot trigger domain reloads, see Inspector-serialized references, inspect broken Prefab overrides, or read NullReferenceException stack traces thrown during Play Mode. Unity MCP (CoplayDev/unity-mcp) closes that feedback loop through an editor-only UPM (Unity Package Manager) C# package paired with a local Python/TypeScript MCP server.

Once added via git URL in Packages/manifest.json, external MCP clients (Claude Code, Cursor, Windsurf, VS Code Copilot) gain structured editor tools over a local socket:

  • Hierarchy, Prefab & Material Manipulation: Agents create and reparent GameObject trees, attach components, wire SerializedProperty object references across Inspector slots, configure URP/HDRP Material properties, and save .prefab or ScriptableObject .asset files without fragile YAML text hacking.
  • Autonomous Compile & Play-Mode Loop: After writing a C# script, the agent triggers AssetDatabase refresh, reads live Unity Console compiler diagnostics (CS0103, CS0246), fixes syntax errors automatically, and executes Unity Test Runner EditMode/PlayMode suites.
  • Editor Menu & Custom Tool Invocation: Exposes MenuItem execution so agents can bake NavMeshes, rebuild Addressables groups, or run custom studio validation windows.

Pricing, Licensing, and Commercial Rights

Unity MCP is 100% free and open source under the MIT License, with zero seat fees, cloud relays, or runtime SDK bloat. Because its C# assemblies reside strictly inside Editor assembly definitions (includePlatforms: ["Editor"]), Unity strips the entire package automatically when compiling standalone Windows, macOS, Linux, iOS, Android, or console player builds, leaving zero shipped AI dependencies.

Strengths and Tradeoffs in Studio Pipelines

Pipeline DimensionEngineering StrengthLimitations & Alternatives
Closed-Loop DebuggingAgent writes C#, triggers domain reload, reads Console errors, and runs NUnit tests autonomouslyHeavy domain reloads in massive 50 GB Unity projects still pause socket responses for several seconds
Safe YAML HandlingUses official UnityEditor.SerializedObject APIs rather than corrupting .unity scene YAMLRequires Python/uv or Node installed locally alongside your IDE
Zero Subscription CostFree MIT bridge reuses your existing Claude Code or Cursor subscriptionDevelopers wanting a zero-config GUI with built-in rollback snapshots can evaluate Bezi ($20/mo)

AI Transparency & Steam Disclosure

AI-Assisted Workflow

Authoring tool featuring optional ML-powered helpers (physics auto-posing, denoising, upscaling, or code autocomplete).

Steamworks guidance: Check whether final shipped assets contain ML-generated output under Valve's Pre-Generated guidelines.

Technical FAQ about Unity MCP

Does Unity MCP get compiled into our final commercial Steam or console build?
No. Unity MCP's C# scripts live strictly inside Editor-only assembly definitions (`.asmdef`). When you build your standalone IL2CPP or Mono player for Steam, mobile, or consoles, Unity excludes the package completely with zero runtime footprint.
Which Unity versions are compatible with CoplayDev's Unity MCP?
Unity MCP supports modern LTS releases including Unity 2021.3 LTS, Unity 2022.3 LTS, and Unity 6 (6000.0+) across Windows, macOS, and Linux workstations, functioning identically across Built-in, Universal (URP), and High Definition (HDRP) render pipelines.
Why use Unity MCP instead of letting Cursor edit `.unity` and `.prefab` YAML files directly?
Raw text edits to `.unity` scenes and `.prefab` YAML files frequently break internal `fileID` and `guid` cross-references, corrupting scenes. Unity MCP routes every hierarchy and Inspector edit through official `UnityEditor` APIs and registers proper Undo steps.

More tools like Unity MCP