Unity-MCP: an AI-powered bridge connecting LLM agents to the Unity Editor and runtime for automated game development
Unity-MCP: an AI-powered bridge connecting LLM agents to the Unity Editor and runtime for automated game development
What it solves
Unity MCP provides a way to connect AI agents (like Claude, Cursor, or Windsurf) directly to the Unity game engine. It solves the problem of AI being isolated from the actual game environment, allowing AI to not only write code but to actively manipulate the Unity Editor, manage assets, and even interact with a compiled game at runtime for debugging or NPC behavior.
How it works
The project implements the Model Context Protocol (MCP), acting as a bridge between an AI agent and Unity. It provides a set of "tools" (over 70 built-in) that the AI can call to perform actions in Unity. These tools are categorized into Project & Assets, Scene & Hierarchy, Scripting & Editor, and Profiling & Diagnostics. It can be deployed locally via stdio or remotely via HTTP, and it supports the automatic generation of "skills" based on the project's specific environment.
Who it’s for
Game developers using Unity who want to automate their workflow, use AI for real-time level building, debugging, and testing, or integrate LLMs directly into their game's runtime for dynamic gameplay elements.
Highlights
- Editor & Runtime Support: Works both in the Unity Editor and inside compiled games.
- Extensive Toolset: Includes 70+ built-in tools for asset management, scene manipulation, and profiling.
- Agent Agnostic: Compatible with various AI agents from providers like Anthropic, OpenAI, and Microsoft.
- Dynamic Code Execution: Can compile and execute C# code dynamically using Roslyn.
- Customizable: Allows developers to create their own custom tools and MCP prompts within their project code.
- Flexible Deployment: Supports both local (stdio) and remote (http) configurations, including Docker deployment.
Sources
- undefinedIvanMurzak/Unity-MCP