mcp-unity MCP Server
Overview
Model Context Protocol (MCP) plugin to connect with Unity Editor — designed for Cursor, Claude Code, Codex, Windsurf and other IDEs
From the project README: "MCP Unity is an implementation of the Model Context Protocol for Unity Editor, allowing AI assistants to interact with your Unity projects. This package provides a bridge between Unity and a Node.js server that implements the MCP protocol, enabling AI agents like Cursor, Windsurf, Claude Code, Codex CLI, GitHub Copilot, Google Antigravity, and OpenCode to execute operations within the Unity Editor."
What it can do
The README lists these tools and features:
- execute_menu_item: Executes Unity menu items (functions tagged with the MenuItem attribute)
- select_gameobject: Selects game objects in the Unity hierarchy by path or instance ID
- update_gameobject: Updates a GameObject's core properties (name, tag, layer, active/static state), or creates the GameObject if it does not exist
- update_component: Updates component fields on a GameObject or adds it to the GameObject if it does not contain the component
- add_package: Installs new packages in the Unity Package Manager
- run_tests: Runs tests using the Unity Test Runner
- send_console_log: Send a console log to Unity
- add_asset_to_scene: Adds an asset from the AssetDatabase to the Unity scene
- create_prefab: Creates a prefab with optional MonoBehaviour script and serialized field values
- create_scene: Creates a new scene and saves it to the specified path
- load_scene: Loads a scene by path or name, with optional additive loading
- delete_scene: Deletes a scene by path or name and removes it from Build Settings
- get_gameobject: Gets detailed information about a specific GameObject including all components
- get_console_logs: Retrieves logs from the Unity console with pagination support
- recompile_scripts: Recompiles all scripts in the Unity project
- save_scene: Saves the current active scene, with optional Save As to a new path
- get_scene_info: Gets information about the active scene including name, path, dirty state, and all loaded scenes
- unload_scene: Unloads a scene from the hierarchy (does not delete the scene asset)
- duplicate_gameobject: Duplicates a GameObject in the scene with optional renaming and reparenting
- delete_gameobject: Deletes a GameObject from the scene
- reparent_gameobject: Changes the parent of a GameObject in the hierarchy
- move_gameobject: Moves a GameObject to a new position (local or world space)
- rotate_gameobject: Rotates a GameObject to a new rotation (local or world space, Euler angles or quaternion)
- scale_gameobject: Scales a GameObject to a new local scale
- set_transform: Sets position, rotation, and scale of a GameObject in a single operation
Install and configure
These commands were found in the project's own README. We checked each package name against the public registry.
brew install node@18
(not a registry package: check the source before running it)
npm install
(not a registry package: check the source before running it)
npx @modelcontextprotocol/inspector node Server~/build/index.js
(@modelcontextprotocol/inspector found on npm, latest 2.13.0)
npm i -g wscat
(wscat found on npm, latest 6.1.0)
Environment variables:
| Variable | Required | Description |
|---|---|---|
MCP_UNITY_ALLOW_BATCH_MODE |
see README | - |
LOGGING_FILE |
see README | - |
UNITY_HOST |
see README | - |
Requirements
The README mentions setup for these clients: Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Zed.
Limitations and things to check
Before you connect it:
- Read the code or the documentation of the tools it exposes, and note what each tool can do.
- Grant the smallest permissions you can: limit folders, API scopes and database roles.
- Keep credentials in environment variables or a secrets manager, never in a shared config file.
- Run it in a container or a separate user account if it can execute code or touch files.
Release history
The most recent releases published on GitHub:
- 1.5.0 (2026-09-03): ### 🔐 Security - Fixed cross-site WebSocket hijacking against the Unity Editor bridge. Browser-originated handshakes are now rejected, and every native bridge connection must authenticate with a per-project 256-bit token (382a43a). - Added strict token discovery through MCP_UNITY_AUTH_TOKEN…
- 1.4.0 (2026-07-24): ### 🆕 What is New - Added the Unity Dashboard MCP App with Play Mode controls, scene hierarchy browsing, console and package views, GameObject selection, focus filtering, an inspector panel, and bidirectional agent context. The release includes the show_unity_dashboard tool, ui://unity-dashboard…
- 1.3.0 (2026-04-26): ## What's Changed ### 🆕 What is New - Add scene management tools for create, load, delete, save, unload, and scene info (#80, #97) - Add recompile_scripts with concurrent request support and improved compiler log handling (#83) - Add get_gameobject tool and richer GameObject resource details (#87)…
Known issues and troubleshooting
These are the most discussed threads on the project's issue tracker. They show what other users ran into; read them before you install, and check whether they are still open.
- Unity disconnects from node (closed, 22 comments)
- Failed to create client (Missing UNITY_PORT) (closed, 18 comments)
- i cant connect cursor (closed, 14 comments)
- Failed to start WebSocket server: Port is already in use (open, 13 comments)
- mcp-use compatibility (closed, 12 comments)
Maintenance and community
The repository has 34 contributors, 137 commits in the last 12 months, 7 open issues and pull requests. It is maintained by Miguel Tomas, a GitHub user with 16 public repositories and 71 followers. GitHub's community checks found no security policy file, no contribution guidelines, no code of conduct. The npm package has 6 maintainers, 22 direct dependencies and was downloaded 731,794 times in the last week.
Frequently asked questions
Is mcp-unity free to use?
The repository is released under the MIT license.
When was mcp-unity last updated?
The last commit was on 2026-10-11, and the project is marked active by our 12-month check.
Which AI clients does mcp-unity work with?
Its README gives setup notes for Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Zed. Other MCP-compatible clients may also work, but the project does not say so.
Sources
This page combines data from:
- mcp-unity on GitHub
- npm package
@modelcontextprotocol/inspector
Security snapshot
Automated checks on public data, last run Oct 31, 2026. This is not a security audit. Read the code and decide which permissions to grant before you connect any MCP server.