Unitycodemcpserver MCP Server

See [the full cities workflow example and transcript](Assets/Plugins/UnityCodeMcpServer/Documentation~/Examples/UsageExample_CitiesWorkflow.md).

Local serverstdioPython

What is the Unitycodemcpserver MCP server?

See the full cities workflow example and transcript. The unitycodemcpserver mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 12 defined tools rather than through you.

Adding it to your client

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

Its toolset

Everything the assistant can do here goes through one of these:

  • execute_csharp_script_in_unity_editor — Perform any task by executing generated C# scripts in Unity Editor context. Full access to UnityEngine, UnityEditor APIs, and reflection
  • read_unity_console_logs — Read Unity Editor Console logs with configurable entry limits (1-1000, default 200)
  • run_unity_tests — Run Unity tests via TestRunnerApi. Supports EditMode, PlayMode, or both. Can run all tests or filter by fully qualified test names
  • enter_play_mode — Enter Unity Play Mode, pause time and return immediately after triggering the transition. Intended to be used before gameplay automation tools
  • play_unity_game — Temporarily unpause time, simulate configured Input System actions, collect logs, and pause again when finished
  • get_unity_game_view_window_screenshot — Capture the current Unity Game View as an image without routing screenshot capture through gameplay input calls
  • exit_play_mode — Exit Unity Play Mode, unpause time, and return immediately after triggering the transition
  • get_unity_info — Returns information about the current Unity Editor project and the UnityCodeMcpServer settings
  • Requirements — The Requirements tool exposed by this server
  • Installation — 1. Install uv: - Follow instructions at https://docs.astral.sh/uv/getting-started/installation
  • STDIO — The unity-code-mcp-stdio bridge forwards STDIO traffic to Unity through .unityCodeMcpServer/messages
  • General — The General tool exposed by this server

Configuration

  • Unity 2022.3 LTS or higher (tested on 2022.3.62f3 and 6000.2.7f2) - uv (Python package manager) for the bundled STDIO bridge: https://docs.astral.sh/uv/.

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 12 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Unitycodemcpserver.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the unitycodemcpserver mcp server does with a few real requests.

When to reach for it

This sits in the monitoring and observability group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Unitycodemcpserver's toolset — execute_csharp_script_in_unity_editor, read_unity_console_logs, run_unity_tests and 9 more — is a fair guide to whether it matches your workflow. It is maintained by signal-loop; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
execute_csharp_script_in_unity_editorPerform any task by executing generated C# scripts in Unity Editor context. Full access to UnityEngine, UnityEditor APIs, and reflection. Automatically captures logs, errors, and return values.
read_unity_console_logsRead Unity Editor Console logs with configurable entry limits (1-1000, default 200)
run_unity_testsRun Unity tests via TestRunnerApi. Supports EditMode, PlayMode, or both. Can run all tests or filter by fully qualified test names.
enter_play_modeEnter Unity Play Mode, pause time and return immediately after triggering the transition. Intended to be used before gameplay automation tools.
play_unity_gameTemporarily unpause time, simulate configured Input System actions, collect logs, and pause again when finished.
get_unity_game_view_window_screenshotCapture the current Unity Game View as an image without routing screenshot capture through gameplay input calls.
exit_play_modeExit Unity Play Mode, unpause time, and return immediately after triggering the transition.
get_unity_infoReturns information about the current Unity Editor project and the UnityCodeMcpServer settings.
RequirementsThe Requirements tool exposed by this server.
Installation1. Install uv: - Follow instructions at https://docs.astral.sh/uv/getting-started/installation
STDIOThe unity-code-mcp-stdio bridge forwards STDIO traffic to Unity through .unityCodeMcpServer/messages.
GeneralThe General tool exposed by this server.

Configuration

  • Unity 2022.3 LTS or higher (tested on 2022.3.62f3 and 6000.2.7f2) - uv (Python package manager) for the bundled STDIO bridge: https://docs.astral.sh/uv/.

Example prompts to try

  • Use Unitycodemcpserver to execute csharp script in unity editor.
  • Use Unitycodemcpserver to read unity console logs.
  • Use Unitycodemcpserver to run unity tests.

Frequently asked questions

It connects Unitycodemcpserver to MCP-compatible AI assistants such as Claude and Cursor, exposing 12 tools (execute_csharp_script_in_unity_editor, read_unity_console_logs, run_unity_tests, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Unitycodemcpserver directly.