UnityMCP
Provides tools for interacting with the Unity Editor, enabling AI agents to inspect scenes and assets, author content, run tests, profile performance, control play mode, and build projects, with optional support for Netcode for GameObjects and multiplayer play mode.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UnityMCPStart play mode"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
UnityMCP
UnityMCP is a local Streamable HTTP MCP server that exposes Unity Editor inspection, authoring, testing, profiling, play-mode, and build tools. Its core has no compile-time dependency on a game's scripts or on Netcode for GameObjects.
Requirements
Unity 6 (
6000.0or newer)A local MCP client such as Codex
The package dependencies declared in
package.json(Unity installs these through UPM)
Related MCP server: Unity-MCP-Vibe
Install
Use one of these approaches:
In Unity Package Manager, choose Add package from git URL and enter:
https://github.com/zloybest/UnityMCP.git#v0.22.3The repository must be accessible to Git on that computer.
For local development, copy this entire directory into the other project's
Packages/com.zloybest.unitymcpdirectory. Keeppackage.json, the assembly definition, source files, and.metafiles together.
Do not copy only the .cs files: the package manifest supplies required Unity packages,
and the assembly definition prevents accidental references to the host game's assemblies.
The complete command and protocol reference is in
Documentation~/UnityMCP.md.
Configure Unity
Wait for Unity to finish importing and compiling.
Open Tools > Unity MCP > Control Window.
Leave Auto Start enabled or start the server manually.
Choose a free port. The default is
8090; use a different port for each concurrently open Unity project.Click Restart after changing the port.
Confirm the endpoint shows
http://127.0.0.1:<port>/.
Settings are stored per Unity project in ProjectSettings/UnityMCPSettings.asset.
When Unity Multiplayer Play Mode launches additional Editor instances, UnityMCP keeps
the endpoint exclusively in the main Editor. Additional Editors detect Unity's virtual
project launch marker (and CurrentPlayer.IsMainEditor when available) and suppress
server startup, preventing a clone from capturing the configured port during domain
reload.
Requests from non-loopback addresses are rejected.
Configure Codex
Run this once, replacing the name/port if necessary:
codex mcp add UnityMCP --url http://127.0.0.1:8090/Equivalent config.toml configuration:
[mcp_servers.UnityMCP]
url = "http://127.0.0.1:8090/"
startup_timeout_sec = 10.0
tool_timeout_sec = 180.0Use a distinct server name (for example UnityMCP_OtherGame) when registering more
than one Unity project. Restart Codex or begin a new session after changing MCP config,
then call the ping tool to verify the connection.
Optional integrations
Netcode tools discover Netcode for GameObjects at runtime. Without NGO, status/list commands return empty state and start commands report that the integration is absent.
Projects with a compatible
GameManagersession API automatically keep the relay/session-code flow; otherwise host/client start falls back to NGONetworkManager.devtools_toggle_f3anddevtools_toggle_f4are compatibility tools. They discover supported DevTools types at runtime and returnnot_foundin projects without them.Scripted input tools use Unity Input System, installed as a package dependency.
play_startkeeps its no-argument default solo behavior. On Unity versions that provide the Play Mode Framework, passplayModeConfigas a configuration asset path or exact asset name to start that configuration. Multiplayer Play Mode scenario assets are supported without a compile-time dependency on the MPM package.
Updating
Update the Git package through Package Manager, or replace the copied package directory
with a newer complete version. Reopen Unity and verify ping reports the expected version.
Development and tests
To work on the package locally, use Package Manager's Add package from disk command
and select this repository's package.json. Add com.zloybest.unitymcp to the host
project's testables array to expose the package's Edit Mode tests in Unity Test Runner.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP Unity Server to integrate Unity Editor game engine with different AI Model clients (e.g. Claude Desktop, Windsurf, Cursor)571,855MIT
- Flicense-qualityDmaintenanceA native C# MCP server that gives AI agents real-time control and visual analysis of the Unity Editor, enabling dynamic code execution, scene manipulation, and debugging without external dependencies.6
- Flicense-qualityBmaintenanceMCP server that lets AI agents drive the full Unity lifecycle on macOS without opening the Unity Editor.2
- Alicense-qualityAmaintenanceUnity Editor adapter for the DCC MCP ecosystem, providing tools to inspect and modify Unity projects, scenes, builds, and diagnostics through a WebSocket bridge.MIT
Related MCP Connectors
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
MCP server for interacting with the Supabase platform
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zloybest/UnityMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server