UnityMCP is a Unity Editor plugin implementing the Model Context Protocol, enabling seamless integration between Unity and AI assistants. It offers real-time editor state monitoring, remote command execution, and logging capabilities.
UnityMCP is a Unity Editor plugin that integrates the Model Context Protocol (MCP), facilitating communication between Unity and AI assistants. It offers real-time editor state monitoring, remote command execution, and logging.
Architecture:
The project includes:
get_editor_state
(retrieves editor state), execute_editor_command
(executes C# code), and get_logs
(retrieves and filters logs).Installation:
Install via Smithery or manually. Requires Unity 2022.3+, Node.js 18+, and npm 9+.
Usage:
Start the server and connect from Unity via the Debug Window. Execute commands like centering objects or toggling play mode using C# code.
Technical Details:
WebSocket communication on port 8080 with JSON messages. Includes command timeout protection, error handling, and log buffer management. Licensed under MIT License.
Arodoid/UnityMCP
January 15, 2025
March 28, 2025
C#