Skip to main content
Glama

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.0 or 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:

  1. In Unity Package Manager, choose Add package from git URL and enter:

    https://github.com/zloybest/UnityMCP.git#v0.22.3

    The repository must be accessible to Git on that computer.

  2. For local development, copy this entire directory into the other project's Packages/com.zloybest.unitymcp directory. Keep package.json, the assembly definition, source files, and .meta files 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

  1. Wait for Unity to finish importing and compiling.

  2. Open Tools > Unity MCP > Control Window.

  3. Leave Auto Start enabled or start the server manually.

  4. Choose a free port. The default is 8090; use a different port for each concurrently open Unity project.

  5. Click Restart after changing the port.

  6. 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.0

Use 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 GameManager session API automatically keep the relay/session-code flow; otherwise host/client start falls back to NGO NetworkManager.

  • devtools_toggle_f3 and devtools_toggle_f4 are compatibility tools. They discover supported DevTools types at runtime and return not_found in projects without them.

  • Scripted input tools use Unity Input System, installed as a package dependency.

  • play_start keeps its no-argument default solo behavior. On Unity versions that provide the Play Mode Framework, pass playModeConfig as 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.

F
license - not found
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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