unity-mcp

MCP.Pizza Chef: CoplayDev

MCP for Unity installs as a Unity package and then wires itself up to whichever assistants it finds, including Claude, Cursor, VS Code, Windsurf, and Cline. From there your assistant can create scenes and objects, write and fix C# scripts, manage assets, run your tests, and build the project, across roughly forty-seven separate actions. It is free under the MIT license and works with Unity 2021.3 through 6.x, alongside Python 3.10 or newer.

Coding

Use This MCP server To

Create a scene with the objects I describe Add a cube with physics at the center of the scene Fix a C# script that is throwing errors Run my Unity tests and tell me what failed Import and organize assets without clicking around Build the project without leaving the conversation

README

Unity MCP ✨

Connect your Unity Editor to LLMs using the Model Context Protocol.

Unity MCP acts as a bridge, allowing AI assistants (like Claude, Cursor) to interact directly with your Unity Editor via a local MCP (Model Context Protocol) Client. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.


UnityMCP Workflow

Key Features 🚀

  • 🗣️ Natural Language Control: Instruct your LLM to perform Unity tasks.
  • 🛠️ Powerful Tools: Manage assets, scenes, materials, scripts, and editor functions.
  • 🤖 Automation: Automate repetitive Unity workflows.
  • 🧩 Extensible: Designed to work with various MCP Clients.
Expand for Available Tools...

Your LLM can use functions like:

  • read_console: Gets messages from or clears the console.
  • manage_script: Manages C# scripts (create, read, update, delete).
  • manage_editor: Controls and queries the editor's state and settings.
  • manage_scene: Manages scenes (load, save, create, get hierarchy, etc.).
  • manage_asset: Performs asset operations (import, create, modify, delete, etc.).
  • manage_gameobject: Manages GameObjects: create, modify, delete, find, and component operations.
  • execute_menu_item: Executes a menu item via its path (e.g., "File/Save Project").

How It Works 🤔

Unity MCP connects your tools using two components:

  1. Unity MCP Bridge: A Unity package running inside the Editor. (Installed via Package Manager).
  2. Unity MCP Server: A Python server that runs locally, communicating between the Unity Bridge and your MCP Client. (Installed manually).

Flow: [Your LLM via MCP Client] <-> [Unity MCP Server (Python)] <-> [Unity MCP Bridge (Unity Editor)]


Installation ⚙️

Note: The setup is constantly improving as we update the package. Check back if you randomly start to run into issues.

Prerequisites

unity-mcp FAQ

Which apps does it work with?
Any MCP client, including Claude Desktop and Claude Code, Cursor, VS Code, Windsurf, Cline, and Gemini CLI.
Do I need a key?
No key of its own — it is free under the MIT license. You need Unity, Python 3.10 or newer, and the uv tool installed.
Which Unity versions work?
Unity 2021.3 LTS through 6.x.
Can I use this to fix a bug in my game?
Yes — your assistant can read the errors, edit the script that caused them, and run your tests again.
How hard is setup?
Paste one address into Unity's Package Manager, then click Configure All Detected Clients from the MCP for Unity menu.
Does Unity have to be open?
Yes — the bridge lives inside the editor, so your project must be open for anything to happen.