Install And Connect
Install stable Unity MCP (ykh09242) 2.6.0, then connect an MCP client to your Editor. This is a Git-distributed fork of CoplayDev/unity-mcp, not an upstream release or a hosted AI service.
Before you start
- Unity 2021.3 or newer. The declared minimum is not runtime certification for every Editor; see the release verification and limits.
- Git available to Unity Package Manager.
- Python 3.11+ and
uv/uvxavailable to Unity. - An MCP client. Use a client you already have; client configuration describes the package's configurators without requiring a specific provider.
Coming from upstream? First follow Migrate To The Fork. Never co-install com.coplaydev.unity-mcp and com.ykh09242.unity-mcp: assembly names and asset GUIDs are shared.
1. Install the Unity package
In Window > Package Manager, choose + > Add package from git URL:
https://github.com/ykh09242/unity-mcp.git?path=/MCPForUnity#ykh09242-v2.6.0
This tag identifies stable 2.6.0. For a commit-addressed install, replace the tag after # with the full 40-character package commit SHA recorded in the verified release notes.
#beta follows a moving development branch; its name does not make the stable release a beta. The installed package's mcpServerSource selects its matching Python source independently. Do not substitute an inherited upstream tag or a PyPI package. See version and update policy.
2. Start the local connection
- Let the package import and fix any Unity compilation errors first.
- Open Window > Unity MCP (ykh09242) > Toggle MCP Window. For dependency checks, open Local Setup Window from the same menu.
- In Editor connection, choose a Transport and start the Editor session.
- Local HTTP uses a shared server. Click Start Server and wait for it to become reachable before configuring clients. If the Editor has not connected automatically, click Connect. Keep local HTTP on loopback unless you are setting up a trusted tunnel.
- Stdio uses a server process launched by your MCP client. Select Stdio and click Start Session to enable the Editor bridge. If a transport mismatch offers Switch to stdio and connect, clicking it changes the transport and starts the bridge.
- Confirm that Session shows Session Active for your project.
In stdio mode, Start Session enables the Unity-side bridge. The MCP client launches the Python server from its configuration when it connects in the next step.
You can close the MCP window after connecting. Closing a window does not stop the server or disconnect the bridge. Use the explicit server/session controls when you intend to stop them. The HTTP auto-start setting in Advanced is a separate, optional background-start preference; it does not require an open MCP window. Unity can still restore tabs that were left open in its saved Editor layout.
The 1.1.1 release includes redesigned windows and manual setup: the package does not open it automatically on Editor startup. Start HTTP on Editor Startup remains optional and works without opening the MCP window. Editor Coroutines is resolved as a package dependency for UPM waits; server connections remain independent of window lifetime.
Unity package 2.6.0 selects Python server 2.6.0 through its installed
mcpServerSource pin and retains the Python 3.11+ requirement introduced in 1.1.4.
Install a supported interpreter with uv python install 3.11, clear unintended
server source overrides, and regenerate existing stdio client configurations
after updating. Custom commands selecting Python 3.10 must also be updated.
Update the Unity package and its pinned Python server together. The internal
stdio TCP bridge now authenticates each connection; old unauthenticated clients
cannot connect to the new Editor bridge. External MCP still uses standard stdio
or HTTP. Blender Bridge operations now require explicit blender_bridge consent
in the Editor, including panel/menu calls. Custom tools with model serialization
hooks must follow the bounded-response restrictions in the
1.2.0 release notes.
The 1.1.3 Windows Filename too long fix remains: the server installs from a commit-addressed GitHub archive without a Git checkout or global Git/OS changes. The archive is cached for repeat launches. Release CI does not launch a native Editor, verify Editor rendering, or install the UPM package into a real project; see the release notes for exact startup, compile and runtime-evidence limits.
3. Configure your client
Under AI client setup, choose your client under Selected client and click Configure. Review the result, then reconnect or restart the client to load the configuration. If your client requires manual setup, use the matching manual client configuration.
For Codex, Unity uses the CODEX_HOME inherited by the Editor, falling back to
~/.codex when it is unset or empty. Detection and configuration use that root's
config.toml; skill setup defaults to skills/unity-mcp-skill under the same root.
Setup shows the resolved configuration destination, and the skill installer shows
its editable destination. Existing custom skill destinations are preserved.
Launch Unity with the intended environment before opening Setup.
Local HTTP rotates X-Unity-MCP-Token each server launch. Since 1.2.1, verified Codex and Claude Code clients use generated token-file helpers: configure once after upgrading, then reconnect when necessary without copying a new token. Older or unverified CLIs should use stdio. Other clients still use static headers and need Configure plus reconnection after a server restart. Native CLI and Unity connections look up the current token automatically. Never commit token files or token-bearing client configurations.
For unsupported clients, use Manual Client Configuration. For a manually launched Python server, see Server README. Hosted HTTPS/API-key deployment is a different mode: Remote Server Auth.
4. Verify before editing
Ask your assistant:
Read
mcpforunity://instances, show the available Editor IDs, and read the project info and active scene for the Editor I choose. Do not modify anything yet.
Use the returned Name@hash as unity_instance on each tool call and _meta.unity_instance on each resource read. Stateful legacy sessions can retain a default Editor; modern sessionless clients cannot. See Multi-Instance Routing.
For a local HTTP command-line check, bind both calls to your exact project and compare the returned scene path with your saved active scene.
unity-mcp --instance "Project@0123456789abcdef" --expect-project "/work/Project" --format json doctor
unity-mcp --instance "Project@0123456789abcdef" --expect-project "/work/Project" --format json scene active
If the doctor reports source_mismatch, restart the selected client server with
the package's mcpServerSource pin and rerun the doctor. A
comparison_unknown diagnosis leaves the server revision unverified. Verify
that the host actually launched the pinned installation, then check the active
scene's exact path and isLoaded fields.
Tool discovery selection is separate from the default Editor. Supported modern scopes can retain project-bound tool choices; modern HTTP using the existing API-key layer cannot change selection. For that mode, set UNITY_MCP_TOOL_PROFILE=full in the server environment, restart and reconnect to expose tools allowed by the Editor. See Tool Visibility And Groups.
Then try Your First Prompt in a disposable or saved scene. Enable only the needed tools and review consent and safe operation.
If a step fails
| Symptom | Next check |
|---|---|
| Package Manager rejects the Git URL | Git/PATH and the exact URL; Git troubleshooting. |
| Python server does not start | Dependency paths and Library/MCPForUnity/Logs/server-launch-<port>.log. |
| HTTP returns 401 | Current launch token; reconfigure after restart. |
| HTTP returns 403 | Browser-origin headers are unsupported; use a native client. |
| Server responds but no Editor is listed | Check for Unity compile errors and confirm the client and Editor use the same transport. For stdio, confirm that Session Active appears in Unity, then reconnect the client and read mcpforunity://instances again. |
| Multiple Editors are listed | Send the chosen unity_instance explicitly. |
Continue with Troubleshooting; report fork issues at ykh09242/unity-mcp.