Provides an MCP server to connect Unity with LLMs, enabling natural-language control of assets, scenes, and editor tasks.
Configuration
View docs{
"mcpServers": {
"coplaydev-unity-mcp": {
"url": "http://localhost:8080/mcp",
"headers": {
"DISABLE_TELEMETRY": "true"
}
}
}
}You can connect Unity to powerful AI assistants by running an MCP server inside Unity and using an MCP client to send natural-language prompts. This setup lets you manage assets, scenes, scripts, and editor tasks directly from your AI, speeding up development and automation.
Start by launching the MCP server inside Unity and connect your preferred MCP client. The server exposes an HTTP endpoint on localhost for quick setup, or you can run a local MCP process with a standard input/output (stdio) configuration. Once connected, you can instruct your AI to perform Unity tasks such as creating assets, building scenes, editing scripts, applying edits, and automating repetitive workflows. For best results, reference available tools like asset management, script management, scene operations, and editor commands to guide your prompts.
1) Open Unity and access MCP for Unity from the Window menu. 2) Start the server to launch the HTTP endpoint at localhost:8080. 3) Choose your MCP client from the dropdown and configure the connection. 4) Verify the status indicator shows Connected. 5) Connect your client. Some clients enable an MCP toggle in their settings; others auto-connect after configuration.
Ask your AI to create assets, edit scenes, generate scripts, modify materials, or automate workflows. You can say things like: “Create a red, blue and yellow cube,” or “Build a simple player controller,” and the AI will translate your prompt into Unity actions using the available tools.
Use batch operations when performing multiple tasks to improve speed. The system offers a variety of tools to interact with game objects, assets, scenes, and editor functions. When working with multiple Unity instances, set the active instance so subsequent actions target the correct editor.
Apply text edits to Unity scripts or assets through the MCP tools interface.
Execute a batch of MCP commands to perform multiple Unity actions efficiently.
Generate new C# scripts based on prompts and integrate them into the project.
Request and inspect the current context for debugging prompts.
Remove a script from the project safely.
Run a custom tool exposed by the MCP server.
Trigger Unity editor menu items via prompts.
Search for game objects matching criteria within the scene.
Search for text patterns inside project files.
Return the current commit or file checksum for integrity checks.
Query test jobs and their results.
Edit or manage animation components and controllers.
Manage assets in the project; import, move, or delete assets.
Modify components on game objects or prefabs.
Interact with the Unity editor state and settings.
Create, modify, or delete game objects in scenes.
Edit or create materials and shaders.
Manage prefab instances and their properties.
Create, modify, or save scenes.
Edit or manage existing scripts.
Inspect or modify script capabilities and validations.
Handle ScriptableObject assets and their data.
Edit or create shader code used by materials.
Manipulate textures used by assets and materials.
Control VFX assets and effects within Unity.
Read the Unity console output for debugging.
Refresh or reload Unity state to reflect changes.
Execute test suites and report results.
Apply scripted edits to code using automated changes.
Select which Unity instance receives subsequent commands.
Validate scripts for syntax and namespace correctness.