Provides an AI-driven bridge and tools to interact with Unity, enabling in-editor and runtime AI workflows via MCP clients.
Configuration
View docs{
"mcpServers": {
"ivanmurzak-unity-mcp": {
"url": "http://localhost:8080",
"headers": {
"UNITY_MCP_HOST": "http://localhost:8080",
"UNITY_MCP_TOKEN": "YOUR_TOKEN",
"UNITY_MCP_TOOLS": "tool1,tool2",
"UNITY_MCP_AUTH_OPTION": "required",
"UNITY_MCP_KEEP_CONNECTED": "true"
}
}
}
}Unity MCP is an AI-powered bridge that lets you connect language models to Unity for in-editor and runtime AI-assisted development. It enables you to run AI agents, generate code, debug, and control Unity workflows directly from your MCP client, with flexible deployment options for local and remote setups.
To use Unity MCP, install the plugin, choose an MCP client, and configure the connection. You can run the MCP server locally or host it remotely, then connect your MCP client to the server endpoint. Once connected, you can issue natural language commands to perform Unity operations, generate code, create assets, modify scenes, and debug in real time. In runtime usage, you can run AI-powered logic inside your compiled game to drive NPC behavior or automate gameplay scenarios.
Prerequisites: ensure you have a Unity project and a supported MCP client ready. You may also run the server in a container or as a binary. Follow these concrete steps to get started.
Step 1: Install Unity MCP Plugin
- Option A: Import the installer package into your Unity project
- Option B: Install via OpenUPM if you prefer package management
Step 2: Install MCP Client
- Select one client to use as the chat interface with the LLM (Claude Code, Claude Desktop, Cursor, Windsurf, etc.)
Step 3: Configure MCP Client
- In Unity, open Window/AI Game Developer β MCP
- Click Configure and connect to the MCP server endpoint
Optionally you can run the MCP server in a Docker container or as a standalone binary. Use the commands shown in the server setup section to connect your client to the server.Configuration, security, and troubleshooting notes follow to help you run Unity MCP reliably across environments. This includes environment variables, port configuration, and transport choices for local or cloud deployments.
Copy the asset at path and stores it at newPath
Creates a new folder in the specified parent folder
Delete the assets at paths from the project
Search the asset database using the search filter string
Search the built-in assets of the Unity Editor
Get asset data from the asset file including all serializable fields and properties
Create new material asset with default parameters
Modify asset file in the project
Move the assets at paths in the project (also used for rename)
Close currently opened prefab
Create a prefab from a GameObject in the current active scene
Instantiates prefab in the current active scene
Open prefab edit mode for a specific GameObject
Save a prefab in prefab editing mode
Refreshes the AssetDatabase
List all available shaders in the project assets and packages
Install a package from the Unity Package Manager registry, Git URL, or local path
List all packages installed in the Unity project (UPM packages)
Remove (uninstall) a package from the Unity project
Search for packages in both Unity Package Manager registry and installed packages
Add Component to GameObject
Destroy one or many components from target GameObject
Get detailed information about a specific Component on a GameObject
List C# class names extended from UnityEngine.Component
Modify a specific Component on a GameObject
Create a new GameObject in opened Prefab or in a Scene
Destroy GameObject and all nested GameObjects recursively
Duplicate GameObjects in opened Prefab or in a Scene
Finds specific GameObject by provided information
Modify GameObjects and/or attached component's fields and properties
Set parent GameObject to list of GameObjects
Get data of the specified Unity Object
Modify the specified Unity Object
Create new scene in the project assets
Retrieves the list of root GameObjects in the specified scene
Returns the list of currently opened scenes in Unity Editor
Open scene from the project asset file
Save opened scene to the asset file
Set the specified opened scene as the active scene
Unload scene from the opened scenes in Unity Editor
Captures a screenshot from a camera and returns it as an image
Captures a screenshot from the Unity Editor Game View
Captures a screenshot from the Unity Editor Scene View
Retrieves Unity Editor logs with filtering options
Returns information about the Unity Editor application state (playmode, paused, compilation)
Control the Unity Editor application state (start/stop/pause playmode)
Get information about the current Selection in the Unity Editor
Set the current Selection in the Unity Editor
Call any C# method with input parameters and return results
Find method in the project using C# Reflection (even private methods)
Delete the script file(s)
Compiles and executes C# code dynamically using Roslyn
Reads the content of a script file
Updates or creates script file with the provided C# code
Execute Unity tests (EditMode/PlayMode) with filtering and detailed results
Animation tooling and control within Unity
Particle system tooling and manipulation
ProBuilder tooling for geometry and level design