Model or dataset
CoderGamester/mcp-unity avatar
CoderGamester/mcp-unity

mcp-unity: Giving an AI Assistant Hands Inside the Unity Editor

Model Context Protocol (MCP) plugin to connect with Unity Editor — designed for Cursor, Claude Code, Codex, Windsurf and other IDEs

1,905 stars242 forksC#MIT

At a glance

What is it?
CoderGamester/mcp-unity is an MIT-licensed Unity package plus a Node.js MCP server that lets Cursor, Claude Code, Codex CLI, Windsurf and Copilot drive the Unity Editor through named tools. The tool list is broad enough to be useful and broad enough to be dangerous, so the real question is which parts of your project you let an agent touch.
Who is it for?
Adopt mcp-unity if you already drive Unity through an MCP-capable assistant and want it to read scene structure, run EditMode tests, recompile scripts and create prefabs without you leaving the chat. Do not adopt it for unattended agents on a shared or unversioned project: update_gameobject, update_component, delete_scene and add_package all write to the project, and the README does not describe an undo, approval or dry-run step.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 13 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap mcp-unity fills between a chat window and the Unity Editor

An AI assistant writing C# for Unity has no way to see what the project actually contains. It can read the files you paste, but it cannot tell you what components sit on the Player object, whether the active scene is dirty, or which scenes are loaded. Every answer about project state has to come from you. mcp-unity closes that gap by exposing Editor operations as MCP tools, so the assistant asks the Editor rather than guessing. The README frames the project as "a bridge between Unity and a Node.js server that implements the MCP protocol", and the audience is correspondingly narrow: developers already using an MCP-capable client such as Cursor, Windsurf, Claude Code, Codex CLI, GitHub Copilot, Google Antigravity or OpenCode. If your workflow is a plain editor and a terminal, this package adds a process and a dependency without changing how you work. The value is concentrated in the moment an agent needs ground truth about a scene rather than a plausible reconstruction of one.

Unity package plus Node.js server: the two halves of the bridge

The repository is a C# Unity package with a Node.js server beside it, and the split matters when something breaks. The C# side lives inside the Editor and performs the work: executing menu items, reading and writing GameObjects and components, loading and saving scenes, running the Test Runner. The Node.js side speaks MCP to your assistant and relays requests into Unity. That means two failure domains. If a tool call returns nothing useful, the fault could be in the assistant's tool selection, in the Node server, or in the Editor-side handler, and the README does not map symptoms to layers. The tool names are descriptive enough to debug by hand: select_gameobject and get_gameobject read state, while update_gameobject, update_component, add_package, create_prefab, create_scene, delete_scene and save_scene change it. get_scene_info is the cheapest way to confirm the channel is alive, because it only reports the active scene name, path, dirty state and the list of loaded scenes. get_console_logs, with pagination, is the other low-risk probe. Start there before you let an agent near a write tool.

What the MCP tool list actually lets an agent do

The README enumerates the tools and pairs most of them with an example prompt, which makes the intended granularity clear. Scene work: create_scene saves a new scene to a specified path, load_scene takes a path or name with optional additive loading, unload_scene removes one, delete_scene also strips the scene from Build Settings, and save_scene can save in place or Save As to a new path. Object work: update_gameobject edits name, tag, layer and active or static state, and creates the object if it is missing; update_component edits component fields and adds the component when absent; add_asset_to_scene pulls a prefab from the AssetDatabase into the current scene; create_prefab builds a prefab with an optional MonoBehaviour script and serialized field values. Beyond that, add_package installs from the Unity Package Manager, run_tests drives the Unity Test Runner, recompile_scripts forces a recompile, and execute_menu_item runs anything tagged with the MenuItem attribute. That last one is the widest door in the list, because it is not limited to the operations the author enumerated. The README's own example is "Execute the menu item 'GameObject/Create Empty' to create a new empty GameObject", but the mechanism accepts any MenuItem, including ones registered by third-party Editor extensions.

Getting it running: package, Node.js, and an MCP client

The README's badges point at two prerequisites: the Unity Editor archive and a Node.js download, so the Node.js server is not optional. Beyond naming those two components, the supplied material does not include the exact install commands, the MCP client configuration block, or the port and transport settings the server listens on. I am not going to invent them. Treat the repository README as the source for the setup sequence and expect to configure your assistant's MCP server entry by hand. One configuration detail is documented: the package adds the Unity Library/PackedCache folder to the workspace of VSCode-like IDEs (Visual Studio Code, Cursor, Windsurf, Google Antigravity). That is a workspace change, not a runtime one, and it exists so the assistant can resolve Unity package types for autocompletion. It is also the one feature here that works without the Node server running. Everything else depends on the bridge being up, which is why get_scene_info is worth calling first.

The write tools have no documented guardrail

Nothing in the README describes an undo step, a confirmation prompt, a dry-run mode or a permission scope. An agent that can call update_component can attach a Rigidbody and set its mass, which is exactly the documented example, and an agent that can call delete_scene can remove a scene and drop it from Build Settings in one request. The README also does not state whether the Editor's own undo stack captures these changes, so you should not assume Ctrl+Z recovers an agent edit. add_package is a second-order risk: installing a package changes the project manifest and can trigger a recompile, and a recompile mid-session can invalidate the state the agent was reasoning about. recompile_scripts makes that explicit and available on demand. The practical consequence is that this is a tool for a repository under version control, on a machine where you are watching, not for an agent left running against a shared project. None of this is unusual for an Editor bridge, but the README presents the tools without discussing the boundary, and that omission is the thing to notice.

Where mcp-unity is the wrong tool

Three cases. First, headless or CI work: the package is built around the Unity Editor, and the README describes Editor operations, so a build server that never opens the Editor gets nothing from it. Second, projects where the assistant is expected to write code but not to mutate the scene graph. If your review process treats scene and prefab files as artifacts a human edits, an agent calling create_prefab or add_asset_to_scene produces binary or serialized diffs that are unpleasant to review, and the tool list gives it every reason to do so. Third, teams without a shared Editor version or a shared Node.js version. The bridge sits between two runtimes, and the material does not document compatibility ranges for either, so a version mismatch is a debugging problem you own. For a solo developer on a versioned project who wants an assistant to inspect scenes and run tests, none of these apply. For a team that wants an agent to reason about Unity code without touching project state, the read-only subset (get_gameobject, get_scene_info, get_console_logs) is the honest scope, and you should check whether your MCP client can restrict an agent to that subset.

Alternatives, and the difference in approach

The obvious alternative is to skip MCP entirely and use Unity's own command-line interface together with the Test Runner's batch mode: an agent writes a script, you run Unity with -batchmode and -executeMethod, and it reads the log. That approach is headless, reproducible and CI-friendly, and it never gives the assistant a live handle on a running Editor. It is also slower per iteration and blind to interactive state, since a batch-mode run starts from a fresh Editor and cannot report the dirty flag on the scene you have open. mcp-unity trades that reproducibility for immediacy: the agent acts on the Editor instance you are sitting in, sees the same loaded scenes, and gets results back inside the conversation. The other alternative is to keep the assistant out of the Editor and paste the relevant hierarchy, component values and console output into the chat yourself. That costs you time and accuracy, but it keeps every mutation behind your own hands. The choice is between a live, stateful, write-capable channel and a slow, stateless, read-only one. mcp-unity is firmly the first.

Licence, maintenance and what upgrading costs you

The repository is MIT-licensed, which permits commercial use and modification provided the copyright notice and permission notice are retained. That is a statement about the licence text, not legal advice; if you redistribute the package inside a product, have someone check the notice requirements against your distribution. Maintenance is active: the last push is dated 2026-09-03, and the release history shows 1.3.0 in April 2026, 1.4.0 in July 2026 and 1.5.0 in September 2026. That cadence, roughly one release per quarter, is the number that should inform your upgrade plan. A Unity package that changes on a quarterly rhythm will occasionally move tool names, arguments or the server's expectations, and because the assistant's prompts are written against those names, an upgrade can silently change what a saved prompt does. The README is translated into Simplified Chinese and Japanese alongside English, which suggests a user base outside the author's own locale and a reason for the author to keep the English version current. The cost of adopting mcp-unity is not the licence. It is the second runtime you now maintain and the prompt text you will rewrite when the tool surface shifts.

Editorial conclusion

Adopt mcp-unity if you already drive Unity through an MCP-capable assistant and want it to read scene structure, run EditMode tests, recompile scripts and create prefabs without you leaving the chat. Do not adopt it for unattended agents on a shared or unversioned project: update_gameobject, update_component, delete_scene and add_package all write to the project, and the README does not describe an undo, approval or dry-run step. Before wiring it into a team repository, verify three things yourself: that only the intended IDE is configured to reach the server, that your project is under version control so every agent edit is diffable, and that the Node.js version you have installed matches what the package expects.

Official sources

  1. CoderGamester/mcp-unity on GitHub
  2. Issues
  3. License: MIT
  4. README
  5. Releases
Community notes

Community notes