The MCP Server acts as the bridge between the AI Client (Claude, Cursor, etc.) and the Unity Editor/Game.
AI Client MCP Server Unity Plugin
- Client Connection: The AI Client connects to the Server using either
stdio(standard input/output pipe) orstreamableHttp. - Plugin Connection: The Unity Plugin connects to the Server via TCP/WebSockets on a specified port (default:
8080).
The Unity Plugin automatically downloads and runs the appropriate server binary for your OS. No manual setup required. Configuration is done via the Unity Editor window.
See Docker Deployment. Best for cloud hosting or isolated environments.
You can run the server manually if you need advanced control or debugging.
Download from Releases.
# HTTP mode (default transport)
./unity-mcp-server --port 8080 --client-transport streamableHttp
# STDIO mode (for piping to MCP clients like Claude Desktop)
./unity-mcp-server --port 8080 --client-transport stdioAll arguments can be provided as CLI flags or equivalent environment variables:
| Environment Variable | CLI Argument | Description | Default |
|---|---|---|---|
MCP_PLUGIN_PORT |
--port |
Port for both the AI Client (HTTP) and Unity Plugin (SignalR) connections. | 8080 |
MCP_PLUGIN_CLIENT_TRANSPORT |
--client-transport |
Protocol for AI Client connection: streamableHttp or stdio. |
streamableHttp |
MCP_PLUGIN_CLIENT_TIMEOUT |
--plugin-timeout |
Timeout in ms for plugin responses. | 10000 |
MCP_AUTHORIZATION |
--authorization |
Authentication mode for incoming Client connections: none or required. |
none |
MCP_PLUGIN_TOKEN |
--token |
Bearer token required from the Client when --authorization=required. Ignored when none. |
(unset) |
The server is built on .NET 9, utilizing:
- ASP.NET Core for HTTP/WebSockets.
- SignalR for communication between Server and Plugin.
- Model Context Protocol SDK for implementing MCP protocol.
- ReflectorNet for dynamic assembly analysis (used by the plugin).
- MCP Plugin .NET for the MCP proxy implementation.