Union - Unity MCP Server
An MCP server for managing and interacting with Unity projects.
Union βΎοΈ - The Unity MCP Server
A Model Context Protocol server for Unity

Key Features
-
πΌοΈ Multimodal Vision: Your agent can see what you see. It can view the scene, look through any camera, watch play mode, and inspect asset thumbnails.
-
π Powerful Search: Go beyond the project panel with simultaneous search across the hierarchy and project assets.
-
βοΈ Superior Code Analysis: Leverage Unity's own compiler for code analysis that is more accurate than your agent's linter.
-
β© Quick Start: Get running in seconds with a single
mcp.jsonconfiguration file. -
π οΈ Extensible: Add your own project-specific tools with minimal boilerplate.
-
π Always Current: Kept up-to-date with the latest MCP protocol version β currently
2025-06-18via the Official MCP C# SDK.
Compatibility
| Name | Compatible | Notes |
|---|---|---|
| Models | ||
| GPT-4.1 | β | |
| Claude 4 Sonnet | β | |
| Claude 4 Opus | β | |
| Gemini 2.5 Pro | β | |
| Gemini 2.5 Flash | β | |
| o3 | β | No image understanding |
| o4-mini | β | |
| Unity Versions | ||
| Unity 6000.0.x | β | Higher versions should be fine. Lower versions may work but untested. |
| Agents | ||
| Cursor | β | |
| Rider AI | β | |
| Claude Desktop | β | |
| Claude Code | β | Terminal requires Screen & System Audio Recording permissions on Mac |
| Operating Systems | ||
| Windows | β | |
| Mac | β | |
| Ubuntu | β | Untested |
Setup
1. Install node.js
2. Configure mcp.json
{
"mcpServers": {
"unity": {
"command": "npx",
"args": ["-y", "@nurture-tech/unity-mcp-runner", "-unityPath", "<path to unity editor>", "-projectPath", "<path to unity project>"]
}
}
}
This will automatically install the is.nurture.mcp package in your unity project. Feel free to commit those changes to source control.
About the Tools
Meet your Unity AI toolbox.
| Tool | Description |
|---|---|
| Assets | |
get_asset_contents | Get the full contents of an asset or sub-asset. |
copy_asset | Copy an asset to a new path. |
import_asset | Import an asset from the filesystem into Unity. |
get_asset_importer | Get the importer settings for an asset. |
| Prefabs | |
open_prefab | Open a Unity prefab in isolation mode so that it can be edited. |
| Scenes | |
open_scene | Open a scene |
close_scene | Close an open scene |
save_scene | Save the current scene. If the scene is not dirty, this will do nothing. |
get_game_object | Get the details of a game object in a loaded scene or prefab by its hierarchy path. |
test_active_scene | Test the active scene by entering play mode and running for a given number of seconds. |
| Scripting | |
create_script | Create or replace a C# code file at the given path. This also checks to make sure the script compiles. |
execute_code | Execute code inside the Unity editor. |
get_type_info | Get public fields and methods on a Unity fully qualified type name, including the assembly. |
| Search | |
search | Search project assets and scene objects. |
| Editor State | |
get_state | Get the state of the Unity Editor. |
get_selection | Get the objects the user has currently selected in the editor. |
| Vision | |
focus_game_object | Focus on a game object in the scene view. |
screenshot | Retrieve a preview of what is focused in the scene view. |
Known Issues
-
The Google External Dependency Manager (EDMU) causes Unity to hang forever on startup when launched via Cursor on Windows. This is under investigation.
-
The
test_active_scenetool sometimes fails with the error messageMaximum call stack size exceeded. -
The
searchtool occasionally fails with the error messageSearch index is not ready yet. Please try again later.
Adding Project-Specific Tools
Union uses the official C# MCP SDK.
-
Create a static class to hold your tools. Add the
[McpServerToolType]annotation to the class. -
Declare static methods to implement each tool. Add the
[McpServerTool]annotation to each method. -
Reference the Services directory for examples.
-
You will likely need to quit unity and restart your agent in order for it to see the new tools.
Usage Tips
Here are some tips to get the most out of Union:
-
π Launch through your agent: Always launch Unity through your AI agent's MCP integration. Launching Unity from the Hub will prevent the MCP server from connecting.
-
π Per-project setup: If your agent supports it, configure the MCP server in your per-project settings. This allows you to seamlessly switch between Unity projects.
-
βοΈ Command-line arguments: You can pass additional arguments to Unity for advanced scenarios like running in
-batchmodeor-nographicsfor CI/CD pipelines. Add a--separator before the Unity-specific arguments:{ "mcpServers": { "unity": { "command": "npx", "args": [ "-y", "@nurture-tech/unity-mcp-runner" "-unityPath", "<path to unity editor>", "-projectPath", ".", "--", "-batchmode", "-nographics" ] } } } -
β οΈ Important: Do not use the
-logFilecommand-line argument. The MCP server relies on Unity's standard output for communication. -
π₯οΈ Split screen for vision: For tools like
screenshot, ensure the Unity editor is visible on your screen otherwise it will end up screenshotting the foreground window.
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
TeamCity
MCP server for TeamCity, integrates with Claude Desktop and Cursor.
Flowise
Integrate with the Flowise API to create predictions and manage chatflows and assistants.
Jetbrains Index Intelligence MCP Plugin
Allows AI-powered coding assistants to tap into your JetBrains IDEβs semantic code index and refactoring engine β giving them true code intelligence (symbol lookup, references, refactors, diagnostics, etc.) via MCP.
XcodeBuildMCP
Popular MCP server that enables AI agents to scaffold, build, run and test iOS, macOS, visionOS and watchOS apps or simulators and wired and wireless devices. It has powerful UI-automation capabilities like controlling the simulator, capturing run-time logs, as well as taking screenshots and viewing the accessibility hierarchy.
AgentOps MCP
An MCP server for AgentOps, providing observability and evaluation tools for AI agents.
Kite Trading MCP Server
An MCP server for the Zerodha Kite Connect API, featuring fully automated authentication without manual token handling.
MCP Configuration Editor
Edit the mcp.json configuration file for tools like AWS Q Developer and Claude Desktop.
Agent Loop
An AI Agent with optional Human-in-the-Loop Safety and Model Context Protocol (MCP) integration.
WTP - Worktree Plus
Let agents manage Git worktrees via the wtp CLI.
Svelte Documentation
Remote server (SSE/Streamable) for the latest Svelte and SvelteKit documentation