---
title: "MCP for Unity: Control the Unity Editor from Claude"
url: "https://mcpshelf.co/servers/unity-mcp"
description: "MCP for Unity connects Claude, Cursor and other clients to the Unity Editor: scenes, GameObjects, C# scripts, assets and tests. Package, config and our test."
updated: "2026-10-27"
site: "MCP Shelf"
---

# MCP for Unity

> Build scenes, edit C# scripts and run tests in the Unity Editor from a chat.

## At a glance

MCP for Unity comes in two parts: a Unity package that opens a bridge inside the Editor, and a Python server that your MCP client starts. With both running, the assistant can create and change GameObjects and scenes, write and fix C# scripts, manage assets and prefabs, read the console, run tests and start builds.

It started as justinpbarnett/unity-mcp and is now maintained by Coplay under CoplayDev/unity-mcp. The Editor package has a window that writes the client config for you, which is the easiest way to set it up.

|  |  |
| --- | --- |
| Made by | Coplay (CoplayDev), started by Justin P. Barnett |
| GitHub | https://github.com/CoplayDev/unity-mcp |
| Licence | MIT |
| PyPI package | [mcpforunityserver](https://pypi.org/project/mcpforunityserver/) 10.3.0 (4 Oct 2026) |
| GitHub stars | 15.4K |
| Downloads | 29 a week |
| Last commit | 19 Oct 2026 |
| Tools | 48 |
| Runs on | Your computer |
| Install check | Started in our test |
| Category | [Design, 3D and games](https://mcpshelf.co/categories/design-and-3d) |

**Our check:** We ran this exact config on 27 Oct 2026: it started and answered with 48 tools. The npm package called "unity-mcp" has no link to this project. The server is published to PyPI as mcpforunityserver, whose project links point back to CoplayDev/unity-mcp.

## Tools

We listed 48 tools on 27 Oct 2026. 6 only read; the rest can change things or run commands.

| Tool | Kind | What it is for |
| --- | --- | --- |
| `batch_execute` | runs | Runs many commands in one call, which is much faster for big changes. |
| `blender_bridge` | changes | Talks to a Blender instance running the BlenderMCP add-on: read its scene, take a viewport screenshot, run Python there and bring models across. |
| `debug_request_context` | reads | Prints details of the current MCP session, for debugging the connection. |
| `execute_code` | runs | Runs C# code inside the Editor with full access to the Unity APIs. |
| `execute_menu_item` | runs | Runs any Unity menu command by its path. |
| `find_gameobjects` | changes | Finds GameObjects by name, tag, layer, component or path and returns their IDs. |
| `find_in_file` | reads | Searches a file with a regular expression and returns matching lines. |
| `generate_audio` | changes | Generates sound effects or music with your own fal.ai key and imports them as audio clips. |
| `generate_image` | changes | Generates 2D images with your own fal.ai or OpenRouter key and imports them as textures or sprites. |
| `generate_model` | changes | Generates 3D models with your own Tripo, Meshy or fal key and imports them. |
| `import_model` | changes | Imports a model from Sketchfab, using your own Sketchfab token. |
| `import_model_file` | changes | Imports a model file that is already on disk, such as an FBX or glTF. |
| `manage_animation` | changes | Controls Animators and creates animation clips. |
| `manage_asset` | changes | Imports, creates, searches, moves and deletes assets. |
| `manage_build` | changes | Starts player builds, switches platform and manages build settings and profiles. |
| `manage_camera` | changes | Sets up cameras, including Cinemachine if it is installed. |
| `manage_components` | changes | Adds or removes components and sets their properties. |
| `manage_editor` | changes | Enters and leaves play mode, adds tags and layers, switches the active tool and runs undo and redo. |
| `manage_gameobject` | changes | Creates, changes, duplicates, moves and deletes GameObjects. |
| `manage_graphics` | changes | Changes volumes, post-processing, light baking and render pipeline settings. |
| `manage_material` | changes | Creates materials and sets colours, shaders and properties. |
| `manage_packages` | changes | Lists, installs and removes Unity packages and registries. |
| `manage_physics` | changes | Changes physics settings, collision layers, materials and joints, and runs physics queries. |
| `manage_prefabs` | changes | Creates prefabs from objects, edits their contents and saves them. |
| `manage_probuilder` | changes | Builds and edits ProBuilder meshes for quick level geometry. |
| `manage_profiler` | changes | Starts the profiler, reads counters, takes memory snapshots and opens the Frame Debugger. |
| `manage_scene` | changes | Opens, creates, saves and inspects scenes, including the hierarchy and build settings. |
| `refresh_unity` | changes | Refreshes the asset database and can wait for scripts to compile. |
| `apply_text_edits` | changes | Changes exact character ranges in a script. |
| `create_script` | runs | Creates a new C# script at a path in the project. |
| `delete_script` | runs | Deletes a C# script. |
| `validate_script` | runs | Checks a C# script and returns compiler diagnostics. |
| `manage_script` | runs | An older all-in-one script tool, kept for compatibility. |
| `manage_script_capabilities` | runs | Reports which script operations and limits the server supports. |
| `get_sha` | reads | Returns a script's hash and size without its contents, to detect changes. |
| `manage_scriptable_object` | changes | Creates and edits ScriptableObject assets field by field. |
| `manage_shader` | changes | Creates, reads, updates and deletes shader files. |
| `manage_texture` | changes | Generates simple textures such as fills, gradients and patterns. |
| `manage_tools` | changes | Shows and switches the optional tool groups for the session. |
| `manage_ui` | changes | Creates and edits UI Toolkit documents, styles and components. |
| `manage_vfx` | changes | Sets up particle systems, VFX Graph, line and trail renderers. |
| `read_console` | changes | Reads or clears messages in the Unity console. |
| `run_tests` | runs | Starts a Unity test run and returns a job ID. |
| `get_test_job` | reads | Checks on a test run started with run_tests. |
| `script_apply_edits` | runs | Edits a script by method or class rather than by line, which is safer for bigger changes. |
| `set_active_instance` | changes | Picks which Unity Editor to talk to when several are open. |
| `unity_docs` | reads | Looks up the official Unity documentation for a class or method. |
| `unity_reflect` | reads | Checks the live Unity C# API by reflection, so the model does not invent methods. |

### How clearly it describes its tools

48 of 48 tools have a description and 48 of 48 say whether they change things. The tool list takes at least ~10,200 tokens of context. Every tool says whether it only reads or can change things, so a client can ask before the risky ones. The tool list is large: switch off the tools you do not use if your client allows it.

## Set it up

1. In Unity, open Package Manager, choose Add package from git URL and paste https://github.com/CoplayDev/unity-mcp.git?path=/MCPForUnity#main
2. Open Window → MCP for Unity and click Configure All Detected Clients, or paste the config below into your client yourself.
3. Keep the Unity Editor open while you work: the server talks to the bridge inside it.

### Claude Desktop

Where: claude_desktop_config.json (Settings → Developer → Edit Config)

```json
{
  "mcpServers": {
    "unity-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "mcpforunityserver",
        "mcp-for-unity",
        "--transport",
        "stdio"
      ]
    }
  }
}
```

### Claude Code

Where: Your terminal, in the project folder

```bash
claude mcp add-json unity-mcp '{"command":"uvx","args":["--from","mcpforunityserver","mcp-for-unity","--transport","stdio"]}'
```

### Cursor

Where: ~/.cursor/mcp.json, or .cursor/mcp.json in a project

```json
{
  "mcpServers": {
    "unity-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "mcpforunityserver",
        "mcp-for-unity",
        "--transport",
        "stdio"
      ]
    }
  }
}
```

### VS Code

Where: .vscode/mcp.json in your project

```json
{
  "servers": {
    "unity-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "--from",
        "mcpforunityserver",
        "mcp-for-unity",
        "--transport",
        "stdio"
      ]
    }
  }
}
```

### Windsurf

Where: ~/.codeium/windsurf/mcp_config.json

```json
{
  "mcpServers": {
    "unity-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "mcpforunityserver",
        "mcp-for-unity",
        "--transport",
        "stdio"
      ]
    }
  }
}
```

### ChatGPT

Where: Not supported

ChatGPT only connects to remote servers by URL. This one runs on your computer, so use Claude, Cursor or VS Code.

## Settings

| Setting | Kind | Required | What it does |
| --- | --- | --- | --- |
| `--transport` | flag | yes | stdio for clients that start the server themselves, or http to run it on a port that clients connect to by URL. Example: `--transport stdio` |
| `--http-url` | flag | no | Where the HTTP server listens when you use --transport http. Clients then connect to the same address with /mcp on the end. Example: `--http-url http://localhost:8080` |
| `Window → MCP for Unity` | config | no | The Editor window that shows the bridge status, writes client configs (Configure All Detected Clients) and holds the API keys for the generation tools. |
| `Tool groups` | config | no | Optional sets of tools (VFX, animation, UI, testing and others) you can switch on and off, so the model only sees what the project needs. |

## What it can touch

**It can read**

- Scenes, GameObjects, assets and scripts in the open Unity project
- The Unity console and test results
- Unity's documentation and API

**It can change**

- Scenes, prefabs, materials and other assets
- C# scripts it creates, edits or deletes
- Project and Editor settings, packages and builds
- Whatever C# it runs through execute_code

**Safer setup:** Keep the project in version control and commit before a session, so every change shows up as a diff you can revert. Leave execute_code out of reach unless you need it.

## Before you start

- Unity 2021.3 LTS or newer, with the MCP for Unity package added
- Python 3.10 or newer and uv (for uvx)

## Good for

- Blocking out a scene or a prototype by describing it
- Fixing compile errors with the console output in front of the model
- Repetitive Editor work: renaming, wiring components, setting up prefabs

## If it does not work

**The client lists the tools but every call fails**
The Unity Editor has to be open with the MCP for Unity package installed. Check the bridge status in Window → MCP for Unity.

**uvx is not found when the client starts the server**
Install uv, then use the full path to uvx in the config, since desktop apps often do not see your shell's PATH.

**Changes go to the wrong Unity project**
With more than one Editor open, ask the model to call set_active_instance with the project you mean.

**Scripts are edited but nothing changes in the Editor**
Ask it to call refresh_unity and wait for compilation, then check read_console for compile errors.

## Similar servers

| Server | Tools | Runs on | Stars |
| --- | --- | --- | --- |
| [draw.io MCP](https://mcpshelf.co/servers/drawio) | 8 | Your computer or hosted | 5.7K |
| [AntV Chart MCP](https://mcpshelf.co/servers/antv-chart) | 27 | Your computer | 4.4K |
| [DaVinci Resolve MCP](https://mcpshelf.co/servers/davinci-resolve) | 37 | Your computer | 3.8K |
| [FreeCAD MCP](https://mcpshelf.co/servers/freecad) | 17 | Your computer | 3.1K |

## Questions

### Is it made by Unity?

No. It is an independent open source project, maintained by Coplay and sponsored by Aura, and not affiliated with Unity Technologies.

### Which Unity versions work?

Unity 2021.3 LTS up to Unity 6.

### Is it free?

Yes, it is MIT licensed. The image, audio and 3D model generation tools use your own keys for the providers they call, which bill you directly.

### Which clients can use it?

Any MCP client. The Editor window can write the config for Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and others.

Full docs on GitHub: https://github.com/CoplayDev/unity-mcp

---

From [MCP Shelf](https://mcpshelf.co/): A short shelf of MCP servers that are worth installing. Index for agents: https://mcpshelf.co/llms.txt

