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. Automatically captures logs, errors, and return values.
How to use it
Project documentation lists execute_csharp_script_in_unity_editor for the UnityCodeMCPServer MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), then check which tools your installed version makes available. Tool availability can depend on configuration and credentials. A server handshake does not verify this tool’s behavior. See the full listing for setup details.
FULL UNITYCODEMCPSERVER LISTINGOther tools in UnityCodeMCPServer (7)
Enter Unity Play Mode, pause time and return immediately after triggering the transition. Intended to be used before gameplay automation tools.
Exit Unity Play Mode, unpause time, and return immediately after triggering the transition.
Capture the current Unity Game View as an image without routing screenshot capture through gameplay input calls.
Returns information about the current Unity Editor project and the UnityCodeMcpServer settings.
Temporarily unpause time, simulate configured Input System actions, collect logs, and pause again when finished.
Read Unity Editor Console logs with configurable entry limits (1-1000, default 200)
Run Unity tests via TestRunnerApi. Supports EditMode, PlayMode, or both. Can run all tests or filter by fully qualified test names.