Labsco
MCP SERVER

Unity MCP

by IvanMurzak

Let an AI build inside Unity — create GameObjects and prefabs, write and execute C#, run tests, take screenshots and read the profiler.

3D, CAD & Game Engines
Summary
Reflection and dynamic C# execution mean the tool list is not the limit.

`reflection-method-find` and `reflection-method-call` reach any C# method, public or private, and `script-execute` compiles and runs a snippet — so anything the shaped tools miss is still reachable. That is powerful and it is also the reason to think about `MCP_AUTHORIZATION`, which is `none` out of the box. Note the tool names shown in clients are titles like Assets / Find; the ids are the kebab-case forms.

What it is

A Unity plugin plus a server that sits between your AI client and the Unity Editor. The plugin connects to the server over TCP and the client connects over stdio or streamable HTTP, giving an assistant real editor operations rather than file edits it hopes compile.

What you get
  • Assets managed in the project: folders, find, copy, move, delete, read and modify, plus an AssetDatabase refresh — `assets-create-folder`, `assets-find`, `assets-copy`, `assets-move`, `assets-get-data`, `assets-modify`, `assets-refresh`
  • Materials, shaders and prefabs: create a material, list shaders and read shader data, instantiate a prefab into the scene, and open, save and close Prefab Mode — `assets-material-create`, `assets-shader-get-data`, `assets-prefab-instantiate`, `assets-prefab-create`, `assets-prefab-open`, `assets-prefab-save`
  • GameObjects and components: create, destroy, duplicate, find by name, tag or type, modify transform and state, reparent, and add, remove, read or modify components — `gameobject-create`, `gameobject-find`, `gameobject-modify`, `gameobject-set-parent`, `gameobject-component-add`, `gameobject-component-modify`
  • Scenes created, opened, saved, unloaded, set active and inspected — `scene-create`, `scene-open`, `scene-save`, `scene-get-data`, `scene-list-opened`
  • C# written, read, deleted, and a snippet compiled and run dynamically — `script-update-or-create`, `script-read`, `script-execute`
  • Package Manager operations against the registry, Git URLs or local paths — `package-add`, `package-list`, `package-remove`, `package-search`
  • Screenshots from a camera, the Game View, the Scene View, or one GameObject rendered in isolation — `screenshot-camera`, `screenshot-game-view`, `screenshot-scene-view`, `screenshot-isolated`
  • EditMode and PlayMode tests run with filters and detailed results, console logs read and cleared, play state read and set, and selection read and set — `tests-run`, `console-get-logs`, `editor-application-set-state`, `editor-selection-set`
  • Reflection escape hatches: find any C# method public or private and call it, and generate a JSON schema for a type — `reflection-method-find`, `reflection-method-call`, `type-get-json-schema`
  • Profiling: start and stop, capture a frame, and read memory, rendering and script statistics, with modules listed, toggled, cleared, saved and loaded — `profiler-start`, `profiler-capture-frame`, `profiler-get-memory-stats`, `profiler-get-rendering-stats`, `profiler-get-script-stats`, `profiler-save-data`
Requirements

The Unity plugin, installed from the `.unitypackage` installer, via `openupm add com.ivanmurzak.unity.mcp`, or with `npx unity-mcp-cli install-plugin ./MyUnityProject`. The plugin downloads and runs the matching server binary for your OS automatically; Docker and manual binary options exist too. The server listens on port 8080 by default, configurable with `MCP_PLUGIN_PORT`, and `MCP_PLUGIN_CLIENT_TRANSPORT` chooses `streamableHttp` or `stdio`. Client authentication is off by default — set `MCP_AUTHORIZATION` to `required` and supply `MCP_PLUGIN_TOKEN` to demand a bearer token.

Setup effort

One command — openupm add com.ivanmurzak.unity.mcp