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_gameobjecttobatch_executefor 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:
- Right-clicking in Hierarchy
- Selecting 3D Object → Cube
- Opening the Inspector
- Finding the MeshRenderer
- Creating a new Material
- Setting the color to red
- Adding a Rigidbody component
- 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) │
└─────────────────┘
- Unity Package: A C# package that runs inside Unity Editor, exposing an HTTP server on
localhost:8080 - MCP Server: A Python server that translates MCP commands to Unity HTTP calls
- AI Client: Claude Desktop, Cursor, or any MCP-compatible assistant
When you ask Claude to create an object, it:
- Recognizes this is a Unity task
- Calls the
manage_gameobjecttool with appropriate parameters - MCP server forwards the request to Unity’s local HTTP endpoint
- Unity executes the action in the editor
- 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
- In Unity:
Window > MCP for Unity - Click Start Server
- 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
| Tool | Description |
|---|---|
manage_gameobject | Create, modify, delete, duplicate GameObjects |
manage_scene | Load, save, create scenes; manage scene hierarchy |
manage_components | Add, remove, configure any Unity component |
find_gameobjects | Query objects by name, tag, layer, or component |
manage_prefabs | Create, instantiate, and modify prefabs |
Asset Pipeline
| Tool | Description |
|---|---|
manage_asset | Import, create, modify, delete project assets |
manage_material | Create and configure materials |
manage_texture | Import and modify textures |
manage_shader | Work with shaders and shader graphs |
manage_vfx | Control Visual Effect Graph assets |
Code and Scripting
| Tool | Description |
|---|---|
manage_script | Create, read, modify C# scripts |
create_script | Generate new MonoBehaviour scripts |
validate_script | Check scripts for compilation errors |
apply_text_edits | Make precise code modifications |
script_apply_edits | Apply structured edits to script files |
Editor and Automation
| Tool | Description |
|---|---|
manage_editor | Control editor state, play mode, selection |
execute_menu_item | Trigger any Unity menu command |
batch_execute | Run multiple operations in sequence (10-100x faster) |
run_tests | Execute unit and integration tests |
read_console | Check console logs and errors |
refresh_unity | Force asset database refresh |
ScriptableObjects and Data
| Tool | Description |
|---|---|
manage_scriptable_object | Create 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:
- Create a new GameObject named “Player”
- Add a CapsuleCollider component
- Add a CharacterController component
- Generate a new C# script called “PlayerController”
- Implement WASD movement and jump logic
- Attach the script to the player
- 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:
- Creates 5 platform cubes with increasing Y positions
- Creates 4 ramp objects connecting them
- Creates 5 materials with distinct colors
- Applies materials to each platform
- Creates a goal trigger object
- Generates a script that logs on trigger enter
- 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:
- Find all objects with the “Enemy” tag
- Add HealthComponent to each
- Set health to 100
- Apply outline shader
- 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:
- Ask Claude to check
unity_instancesresource - Use
set_active_instancewith the project identifier (e.g.,MyGame@abc123) - All subsequent commands route to that instance
Roslyn Script Validation
For strict code validation that catches undefined types and namespaces before runtime:
- Install NuGetForUnity
- Add
Microsoft.CodeAnalysisv5.0 via NuGet - Add
USE_ROSLYNto Scripting Define Symbols - 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_executefor 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
- Check
Window > MCP for Unitystatus - Ensure the HTTP server shows “Running”
- Verify no firewall blocks localhost:8080
- Try restarting Unity
Server Not Starting
- Verify
uv --versionworks in terminal - Check Python 3.10+ is installed
- Review terminal output for error messages
- Try running the server manually:
uvx --from mcpforunityserver mcp-for-unity
AI Client Not Recognizing Unity Tools
- Restart your AI client after configuration
- Verify the config file syntax (JSON is strict about commas)
- Check the MCP server is running
- 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:
- MCP for Unity (this project): Free, open-source, MIT licensed
- Coplay: Premium AI assistant with deeper Unity integration
- 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 instancesmenu_items- Available Unity menu commandseditor_state- Current editor state (play mode, selection, etc.)project_info- Project settings and configurationprefab_api- Prefab-related operations reference
Most Useful Tools:
manage_gameobject- Core object manipulationmanage_script- Code generation and editingbatch_execute- Multiple operations in one call (fast)find_gameobjects- Query objects by various criteriaread_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:
- GitHub: github.com/CoplayDev/unity-mcp
- Discord: discord.gg/y4p8KfzrN4
- Coplay Website: coplay.dev
- Unity Asset Store: MCP for Unity
- Academic Citation: Wu, Shutong and Barnett, Justin P. “MCP-Unity: Protocol-Driven Framework for Interactive 3D Authoring” (ACM SIGGRAPH Asia 2025)