unity-mcp-server
by akiojin
Overview
A server to enable AI agents or automated scripts to interact with and control the Unity Editor, performing tasks such as scene management, GameObject manipulation, asset management, input simulation, code editing, and extracting editor state.
Installation
docker compose upEnvironment Variables
- GITHUB_TOKEN
- UNITY_MCP_MCP_HOST
- UNITY_MCP_PORT
- UNITY_PROJECT_ROOT
- MAX_MCP_OUTPUT_TOKENS
- ENABLE_BACKGROUND_TASKS
- FORCE_AUTO_BACKGROUND_TASKS
- UNITY_MCP_TOOLS_ROOT
- UNITY_MCP_LOG_LEVEL
- UNITY_MCP_HTTP_ENABLED
- UNITY_MCP_HTTP_PORT
- UNITY_MCP_TELEMETRY_ENABLED
- UNITY_MCP_LSP_REQUEST_TIMEOUT_MS
Security Notes
The server downloads and executes C# Language Server Protocol (LSP) binaries from GitHub releases, relying on SHA256 checksums for integrity. A compromised GitHub release or manifest could lead to arbitrary code execution (supply-chain risk). It directly manipulates C# source files and can execute Unity Editor menu items, including file system operations and potentially sensitive actions. While some handlers implement safety checks (e.g., menu item blacklist, settings confirmation, C# syntax/LSP validation), the broad control over the Unity Editor presents a high-privilege attack surface if exploited. Communication is over TCP (local) and optionally HTTP. Running untrusted code is inherently risky.
Similar Servers
unity-mcp
Enables AI assistants (LLMs) to control and automate tasks within the Unity Game Engine Editor through the Model Context Protocol (MCP).
azure-devops-mcp
Provides a local Model Context Protocol (MCP) server that enables AI agents to interact with Azure DevOps, performing tasks such as managing work items, repositories, pipelines, test plans, wikis, and advanced security directly from a code editor.
cclsp
Integrate LLM-based coding agents with Language Server Protocol (LSP) servers to enable robust code navigation, symbol resolution, and refactoring across various programming languages.
UnrealGenAISupport
The plugin enables large language models (LLMs) to programmatically interact with and control Unreal Engine, facilitating generative AI applications in game development, such as spawning objects, manipulating scenes, and generating blueprints or Python scripts.