Provides an MCP endpoint to drive Unity tasks via LLMs, enabling asset, scene, and script management through connected clients.
Configuration
View docs{
"mcpServers": {
"coplaydev-unity-mcp": {
"url": "http://localhost:8080/mcp",
"headers": {
"DISABLE_TELEMETRY": "true"
}
}
}
}You can run MCP for Unity as an agent that connects Unity Editor tasks with large language models. This server enables natural language control over Unity workflows, letting you manage assets, scenes, scripts, and editor operations through MCP clients that you trust.
Start by ensuring you have Unity 2021.3 LTS or newer, Python 3.10 or newer with uv installed, and an MCP client such as Claude, Cursor, Windsurf, or VS Code Copilot. Open Unity and enable the MCP for Unity integration, then start the server to expose an MCP endpoint. From your MCP client, configure the connection and then begin issuing natural language prompts to perform Unity tasks, such as creating objects, editing scripts, or adjusting scene settings.
Prerequisites you need before installing the MCP server:
Install the MCP for Unity package in Unity using one of the following methods. Choose the method that matches your preference for installation and updates.
Manual configuration lets you specify how to run the MCP server locally if auto-discovery is not available. Use the HTTP configuration for straightforward, localhost-based setups, or the stdio configuration for local runtimes driven by a command.
Two common configuration methods are shown for local testing and development. Ensure the HTTP endpoint is accessible as described, and confirm the stdio command line you use matches the exact runtime you employ to start the server.
If you encounter issues connecting the Unity Bridge, verify the MCP status in the Unity window, check that the HTTP server started on the expected port, and ensure the client is configured to connect to the correct URL. Review logs for hints about misconfigurations or missing dependencies.
Apply textual edits to Unity-related scripts or configuration files.
Execute multiple MCP actions in a batch for speed and efficiency.
Create a new Unity script file from a prompt.
Inspect the current request context to aid debugging.
Remove an existing script from the project.
Run a custom tool defined in the MCP tool suite.
Trigger a Unity editor menu item programmatically.
Search for GameObjects matching given criteria.
Search within project files for specific content.
Retrieve a SHA or version identifier for assets or scripts.
Run or retrieve results for a test job.
Control and edit animation assets and states.
Handle Unity assets such as imports, updates, and organization.
Configure and adjust cameras, including Cinemachine support.
Manage Unity components on GameObjects.
Tune graphics settings, volumes, post-processing, and rendering features.
Interact with Unity editor preferences and settings.
Modify GameObjects, hierarchy, and properties.
Create and modify materials and shaders.
Work with prefabs, their instances, and hierarchies.
Edit ProBuilder meshes and workflows.
Edit scenes, lighting, and scene-wide settings.
Edit and manage script code and metadata.
Inspect or modify script capabilities and references.
Handle ScriptableObjects and their data.
Edit shader graphs and shader properties.
Manage texture assets and settings.
Toggle and access editor tools and modes.
Adjust Unity UI elements and layouts.
Control visual effects components and assets.
Read Unity console output for debugging.
Refresh or reload Unity project state.
Execute project or tool tests to verify behavior.
Apply scripted edits to code files.
Route subsequent commands to a selected Unity instance.
Validate script syntax and namespace usage.