MCP for Unity

Agent skill by CoplayDev · for Claude Code, Claude Desktop, Codex, Cursor, VS Code, Windsurf, Cline and Gemini CLI

A free MIT Unity package and MCP server that lets Claude, Codex, Cursor, VS Code and other MCP clients control the Unity Editor: create scenes and GameObjects, edit C# scripts, manage assets, run tests, profile and build.

Install

openupm add com.coplaydev.unity-mcp

Run it in a terminal, then start a new agent session so the skill loads. Read the repo's README and scripts before you install: skills run with your agent's permissions.

What it does

MCP for Unity connects AI assistants to the Unity Editor through the Model Context Protocol. You describe what you want in plain language and the agent creates scenes and GameObjects, edits C# scripts, manages assets, runs tests, profiles and builds, with 50 focused MCP tool entry points.

You add the package in Unity's Package Manager from the repo's Git URL (or through OpenUPM), then use Window > MCP for Unity > Configure All Detected Clients to set up the agents on your machine. It works with any MCP client, including Claude Desktop, Claude Code, Codex, Cursor, VS Code, Windsurf, Cline and Gemini CLI, and it supports Unity 2021.3 LTS through Unity 6. The server needs Python 3.10 or newer through uv.

Advanced options include routing to several open Unity instances, tool groups for VFX, animation, UI and testing, Roslyn script validation and a remote-hosted server with authentication. It is maintained by Aura, which also sells a separate paid Unity and Unreal assistant, and it is not affiliated with Unity Technologies.

Install and setup

You need Unity 2021.3 LTS or newer (the README lists 2021.3 LTS to Unity 6.x), Python 3.10 or newer with the uv package manager, and an MCP client. The setup wizard that opens after import checks for Python and uv and walks you through installing them if they're missing.

There are three ways to add the package. The fastest is a Git URL: in Unity open Window > Package Manager, click the + button, choose Add package from git URL and paste https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main (or #beta for the newest beta features). This route needs git on your PATH. You can also get it from the Unity Asset Store and import it from My Assets, or run openupm add com.coplaydev.unity-mcp.

After import, the setup wizard opens. Once Python and uv show green, it lists the MCP clients it found on your machine. Pick the ones you want and click Configure Selected. You can come back any time through Window > MCP for Unity to start or stop the server, switch between HTTP and stdio, or run Configure All Detected Clients again, which is safe to repeat after an update. The status panel reads Connected when everything is wired up.

Claude Code, VS Code, Windsurf, Cline, Codex, Gemini CLI and the other CLI clients connect on their next launch. Cursor and Antigravity also need their own MCP toggle switched on after configuration (in Cursor, Settings > MCP, then enable the unityMCP server). If auto-configuration doesn't work for your client, the docs give a manual config: HTTP clients point at http://localhost:8080/mcp, and stdio clients such as Claude Desktop run the server through uvx.

A typical workflow

Open your project and a scene in Unity, check that the MCP for Unity panel says Connected, and talk to your agent in plain language. The README's first prompt is "Create a cube at the origin and add a Rigidbody." For a request like "create a red, blue and yellow cube spaced one unit apart", the docs show the agent inspecting the scene, creating the GameObjects, making materials and attaching them, usually in 5 to 15 seconds.

From there you build up. The docs' own escalating examples are adding a directional light and a camera aimed at the objects, writing a C# script that makes a cube bob up and down, attaching it and entering Play mode, and running all EditMode tests and reporting which fail. The install guide also suggests "Build a simple player controller with WASD movement and a double-jump" and asking which scripts in a folder reference Rigidbody.

When you're creating or changing many objects, the batch_execute tool runs several commands in one call. Its docs recommend it for repetitive work, since it cuts latency and token use compared with one call per object. The default batch size is 25 commands, configurable up to 100.

Only the core group of tools (scenes, scripts, assets and the editor) is on by default. When you need more, ask the agent to activate a group, for example "activate the vfx group so we can author shaders", and it calls manage_tools to switch it on for the rest of the session. The groups are animation, ui (UI Toolkit), vfx (VFX Graph, shaders and procedural textures), scripting_ext, testing, probuilder (needs Unity's ProBuilder package), profiling, docs (Unity API lookup) and asset_gen. Keeping unused groups off saves tokens and helps the agent pick the right tool.

Asset generation and other extras

Version 10, released June 30, 2026, added the asset_gen group. With your own provider keys, the agent can generate 3D models with Tripo, Meshy or fal, generate 2D images with fal.ai or OpenRouter, generate sound effects and music with fal.ai, import models from Sketchfab, and import a local FBX, OBJ or glTF file. A blender_bridge tool talks to a running Blender that has the BlenderMCP add-on connected, so you can hand models from Blender to Unity. Provider keys are stored in the Unity Editor.

Other advanced options are covered in the docs. Multi-instance routing lets one session drive several open Unity Editors, each identified by its product name and a short hash, and you pick one with set_active_instance. Optional Roslyn validation catches undefined namespaces, types and methods in AI-written C# before Unity compiles it, and installs with one click from the MCP for Unity window. A remote-hosted mode runs the server as a shared service with API key authentication, over HTTP only.

Gotchas

Commit your project to version control before a long session. The agent edits real scenes, scripts and assets in your project, so a clean commit is the easiest way to roll back anything you don't want. The v10 notes say higher-power tools sit in opt-in groups and file writes are limited to project assets, but that's no substitute for a backup.

Claude Desktop only supports stdio, so MCP for Unity configures it that way even if HTTP is selected elsewhere. The HTTP server uses port 8080 by default, which can clash with other services such as Tailscale; you can change the port in the MCP for Unity settings. If the Package Manager reports "Error when executing git command", install git, make sure it's on your PATH and restart Unity.

If cubes show up gray, your project probably uses URP or HDRP and the agent guessed the Standard shader. Tell it which pipeline you use, for example "This project uses URP, please use the URP/Lit shader." If you have more than one Unity Editor open and no active instance set, the server errors with the list of instances, so set one and retry. If tool calls succeed but nothing changes, check which tool groups are active.

The troubleshooting page lists two known clashes with Unity's own AI packages. On Unity 6.3 and newer with the Unity AI Assistant package, you can hit System.Collections.Immutable version conflicts; the fix is to install version 9.0.0 of that DLL in Assets/Plugins, or remove AI Assistant if you don't need it. On Unity 6.5, pre-release AI packages can make the Editor hang on load before MCP for Unity even starts, which the docs call a Unity bug.

The server collects anonymous usage telemetry, such as which tools you use, success rates, your Unity version and platform. The docs say it never collects your code, project names, file names or paths. Set DISABLE_TELEMETRY=true or UNITY_MCP_DISABLE_TELEMETRY=true to opt out.

Who it's for

MCP for Unity suits Unity developers who already use an MCP-capable agent such as Claude Code, Codex, Cursor, VS Code Copilot, Windsurf or Gemini CLI and want it to work in the open Editor, not just edit C# files. Its wide version range makes it one of the few bridges for projects still on Unity 2021.3 LTS, 2022 or 2023, where Unity's own MCP server, which needs Unity 6, isn't an option.

It's free and MIT licensed; you pay only for your AI client and, if you use asset generation, your own provider keys. It's maintained by Aura, which also sells a separate paid assistant called Aura for Unity, and it isn't affiliated with Unity Technologies. If you'd rather not run Python and uv next to Unity, look at the alternatives below.

Features

  • 50 MCP tools for scenes, GameObjects, scripts and assets
  • Runs tests, profiles and builds from the agent
  • One-click setup for detected MCP clients
  • Tool groups for VFX, animation, UI and testing
  • Routes to multiple open Unity instances

Limits

  • Needs Python 3.10+ and uv alongside Unity
  • Not affiliated with Unity Technologies
  • The agent must support MCP

Questions people ask

How do I install MCP for Unity?

In Unity, open Window > Package Manager, click +, choose Add package from git URL and paste https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main. You can also install it from the Unity Asset Store or with openupm add com.coplaydev.unity-mcp. The setup wizard then checks Python and uv and configures the MCP clients it finds; you can rerun it any time from Window > MCP for Unity > Configure All Detected Clients.

Which Unity versions does MCP for Unity support?

Unity 2021.3 LTS through Unity 6.x. It also needs Python 3.10 or newer through uv.

Which AI clients work with MCP for Unity?

Any MCP client. The configurator detects and sets up Claude Desktop, Claude Code, Cursor, VS Code with Copilot, GitHub Copilot CLI, Windsurf, Cline, Codex, Gemini CLI, Qwen Code, Antigravity and others. Claude Desktop connects over stdio; the rest use HTTP. Cursor and Antigravity need their own MCP toggle turned on after setup.

Is MCP for Unity free, and is it made by Unity?

It's free and open source under the MIT license. It's maintained by Aura, which also sells a separate paid Unity and Unreal assistant, and it isn't affiliated with Unity Technologies. Asset generation uses your own provider keys.

What's the difference between MCP for Unity, MCP Unity and Unity MCP?

They're three separate projects with similar names. MCP for Unity (CoplayDev) uses a Python server and supports Unity 2021.3 LTS to 6.x. MCP Unity (CoderGamester) uses a Node.js server and needs Unity 6 or later. Unity MCP, also called AI Game Developer (IvanMurzak), has 70+ tools, can run inside your built game, and its default setup signs in to a cloud endpoint. Unity also has its own official MCP server for Unity 6.

Why can't my agent find the VFX, animation or test tools?

Only the core tool group is on by default. Ask the agent to activate the group you need, such as vfx, animation, ui, testing, probuilder, profiling or asset_gen, and it will call manage_tools to switch it on for the session.

Can MCP for Unity generate 3D models, images or audio?

Yes, since version 10, through the opt-in asset_gen group with your own keys: 3D models with Tripo, Meshy or fal, images with fal.ai or OpenRouter, and sound effects and music with fal.ai. It can also import Sketchfab models and local FBX, OBJ or glTF files, and bridge to a running Blender with the BlenderMCP add-on.

Similar skills and which to pick

Browse all 74 agent skills