unity-mcp
Verified Safeby CoplayDev
Overview
Enables AI assistants (LLMs) to control and automate tasks within the Unity Game Engine Editor through the Model Context Protocol (MCP).
Installation
uvx --from mcpforunityserver mcp-for-unity --transport http --http-url http://localhost:8080Environment Variables
- UNITY_MCP_DEFAULT_INSTANCE
- UNITY_MCP_SKIP_STARTUP_CONNECT
- UNITY_MCP_TELEMETRY_ENABLED
- UNITY_MCP_TRANSPORT
- UNITY_MCP_HTTP_URL
- UNITY_MCP_HTTP_HOST
- UNITY_MCP_HTTP_PORT
- UNITY_MCP_INSTANCE_TOKEN
- UNITY_MCP_RELOAD_MAX_WAIT_S
- UNITY_MCP_SESSION_RESOLVE_MAX_WAIT_S
- UNITY_MCP_SESSION_READY_WAIT_SECONDS
- DISABLE_TELEMETRY
- UNITY_MCP_DISABLE_TELEMETRY
- MCP_DISABLE_TELEMETRY
- LOG_LEVEL
Security Notes
The server listens on `0.0.0.0:8080` by default when using HTTP transport, making it publicly accessible if not behind a firewall. Telemetry data is sent to a third-party endpoint (`https://api-prod.coplay.dev/telemetry/events`) by default, though users can opt-out via environment variables. The use of `eval()` in `main.py` is an internal framework workaround for `typing` annotations, not directly for user input. Path sanitization is implemented for script operations to prevent traversal attacks. The server processes regular expressions from user input in tools like `script_apply_edits` and `find_in_file`; while Python-side compilation is used, complex or inefficient regex patterns could theoretically pose a ReDoS risk.
Similar Servers
cocos-mcp-server
Enables AI assistants to interact with the Cocos Creator editor through a Model Context Protocol (MCP) server, providing control over scene, node, component, asset, and project operations.
Unreal_mcp
High-performance bridge and automation server for Unreal Engine, enabling programmatic control, data processing, and asset authoring through a WebSocket API and optional WebAssembly acceleration.
UnityNaturalMCP
Integrates Unity Editor with Model Context Protocol (MCP) clients like AI coding assistants, enabling direct execution of Unity C# tools from these clients.
unity-mcp
Facilitate AI client interaction with the Unity Editor to automate development actions and workflows.