Back to Home
CoplayDev icon

unity-mcp

Verified Safe

by CoplayDev

Overview

Enables AI assistants (LLMs) to control and automate tasks within the Unity Game Engine Editor through the Model Context Protocol (MCP).

Installation

Run Command
uvx --from mcpforunityserver mcp-for-unity --transport http --http-url http://localhost:8080

Environment 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

Stats

Interest Score100
Security Score7
Cost ClassMedium
Avg Tokens2000
Stars5079
Forks644
Last Update2026-01-19

Tags

UnityAIGame DevelopmentAutomationLLM Agent