Skip to main content
MCP server CX Codex

Unity-MCP — Unity MCP server for Claude Code: editor and in-game AI

Connects Claude, Claude, Cursor and other MCP clients to Unity: the agent drives the editor, writes code, and runs inside your compiled game.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env UNITY_MCP_PORT=<UNITY_MCP_PORT> --env UNITY_MCP_PLUGIN_TIMEOUT=<UNITY_MCP_PLUGIN_TIMEOUT> --env UNITY_MCP_CLIENT_TRANSPORT=<UNITY_MCP_CLIENT_TRANSPORT> --transport stdio unity-mcp-server -- docker run -i --rm -e UNITY_MCP_PORT -e UNITY_MCP_PLUGIN_TIMEOUT -e UNITY_MCP_CLIENT_TRANSPORT docker.io/ivanmurzakdev/unity-mcp-server:0.17.1
Open on GitHub

What Unity-MCP does

The server links an MCP client to Unity Editor and to the runtime of a built game. From the agent you call editor tools, generate mechanics and tests, and in runtime you can wire an LLM straight into the game for NPC behaviour or debugging. Skills are generated for your OS, Unity version and the plugins in the project.

Two pieces are involved: the MCP server and a Unity plugin. The server runs in Docker (docker.io/ivanmurzakdev/unity-mcp-server:0.17.1) over stdio locally or http remotely. The plugin goes into the project via the .unitypackage installer or the CLI: npm install -g unity-mcp-cli, then unity-mcp-cli install-plugin ./MyUnityProject and unity-mcp-cli login, which opens the browser for an OAuth device flow.

You need Docker and three environment variables: UNITY_MCP_PORT, UNITY_MCP_PLUGIN_TIMEOUT, UNITY_MCP_CLIENT_TRANSPORT. If Docker is not running the server never starts, so check that first when a connection fails. Custom tools can be written in your own project code.

What it helps with

  • drive Unity scenes and objects from an agent chat
  • generate a game mechanic together with its tests
  • run an LLM inside the compiled game for NPCs
  • let an agent find and fix a bug in the project
  • build a skill set matching the Unity version and project plugins

Example prompts for the agent

  • connect to Unity and list the objects in the current scene
  • create a player movement script and attach it to the Player object
  • switch to runtime mode and hook an LLM into the NPC behaviour

How to install Unity-MCP

Platform CLI

claude mcp add --env UNITY_MCP_PORT=<UNITY_MCP_PORT> --env UNITY_MCP_PLUGIN_TIMEOUT=<UNITY_MCP_PLUGIN_TIMEOUT> --env UNITY_MCP_CLIENT_TRANSPORT=<UNITY_MCP_CLIENT_TRANSPORT> --transport stdio unity-mcp-server -- docker run -i --rm -e UNITY_MCP_PORT -e UNITY_MCP_PLUGIN_TIMEOUT -e UNITY_MCP_CLIENT_TRANSPORT docker.io/ivanmurzakdev/unity-mcp-server:0.17.1

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Unity-MCP

How do I install Unity-MCP in Claude?

Add the server with `claude mcp add --env UNITY_MCP_PORT=<UNITY_MCP_PORT> --env UNITY_MCP_PLUGIN_TIMEOUT=<UNITY_MCP_PLUGIN_TIMEOUT> --env UNITY_MCP_CLIENT_TRANSPORT=<UNITY_MCP_CLIENT_TRANSPORT> --transport stdio unity-mcp-server -- docker run -i --rm -e UNITY_MCP_PORT -e UNITY_MCP_PLUGIN_TIMEOUT -e UNITY_MCP_CLIENT_TRANSPORT docker.io/ivanmurzakdev/unity-mcp-server:0.17.1. The Unity plugin is installed separately, through the installer or unity-mcp-cli install-plugin`.

What does Unity-MCP do?

It gives an AI agent access to Unity Editor and to the game runtime over MCP. The agent calls editor tools, writes code and tests, and inside a compiled game it can talk to an LLM directly.

What do I need to run Unity-MCP?

Docker to run the server, plus the plugin installed in the Unity project. The server takes UNITY_MCP_PORT, UNITY_MCP_PLUGIN_TIMEOUT and UNITY_MCP_CLIENT_TRANSPORT.

Similar MCP servers

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor