com.IvanMurzak.Unity.MCP.Server
1.0.0
dotnet tool install --global com.IvanMurzak.Unity.MCP.Server --version 1.0.0
dotnet new tool-manifest
dotnet tool install --local com.IvanMurzak.Unity.MCP.Server --version 1.0.0
#tool dotnet:?package=com.IvanMurzak.Unity.MCP.Server&version=1.0.0
nuke :add-package com.IvanMurzak.Unity.MCP.Server --version 1.0.0
Unity MCP server
Model Context Protocol implementation for Unity Editor and for games made with Unity.
Topology
- Client is the MCP client, such as VS Code, Cursor, Claude Desktop, Claude Code etc.
- Server is the MCP server, this is Unity-MCP server implementation which works closely in pair with Unity MCP Plugin
- Plugin is the Unity-MCP Plugin, this is deeply connected with Unity Editor and runtime game build SDK, that exposes API for the Server and lets the AI magic to happen. It utilizes advanced reflection by using ReflectorNet
Connection chain
Client ↔ Server ↔ Plugin (Unity Editor / Game Build)
Launch
Unity-MCP server is developed with idea of flexibility in mind, that is why it has many launch options.
Option: Using Docker (recommended)
Default launch
The default the transport method is http
, that is why the port 8080
should be forwarded.
docker run --rm -p 8080:8080 -p 60606:60606 ivanmurzakdev/unity-mcp-server
MCP client config:
{
"mcpServers": {
"Unity-MCP": {
"url": "http://localhost:8080"
}
}
}
Use STDIO
The 8080
port is not needed for STDIO, because it uses the STDIO to communicate with Client. It is a good setup for using in a client with automatic installation and launching. Because this docker command loads the image from docker hub and launches immediately.
docker run -t --rm -e UNITY_MCP_CLIENT_TRANSPORT=stdio -p 60606:60606 ivanmurzakdev/unity-mcp-server
MCP client config:
{
"mcpServers": {
"Unity-MCP": {
"command": "docker",
"args": [
"run",
"-t",
"--rm",
"-e",
"UNITY_MCP_CLIENT_TRANSPORT=stdio",
"-p",
"60606:60606",
"ivanmurzakdev/unity-mcp-server"
]
}
}
}
Custom plugin port
docker run --rm -e UNITY_MCP_PLUGIN_PORT=123 -p 8080:8080 -p 123:123 ivanmurzakdev/unity-mcp-server
MCP client config:
{
"mcpServers": {
"Unity-MCP": {
"url": "http://localhost:8080"
}
}
}
Port forwarding is need for the launch with docker -p 8080:8080
for client and -p 60606:60606
for plugin.
Option: Using binary file
Download binary from the GitHub releases page. Unpack the zip archive and use command line to simply launch binary of the server for your target operation system and CPU architecture.
Default launch (STDIO)
./unity-mcp-server --client-transport stdio
MCP client config:
{
"mcpServers": {
"Unity-MCP": {
"command": "C:/Projects/Unity/Unity-MCP/Unity-MCP-Plugin/Library/mcp-server/win-x64/unity-mcp-server.exe",
"args": [
"--client-transport=stdio"
]
}
}
}
Launch STDIO (Local)
Launch server with STDIO transport type for local usage on the same machine with Unity Editor.
./unity-mcp-server --plugin-port 60606 --plugin-timeout 10000 --client-transport stdio
MCP client config:
{
"mcpServers": {
"Unity-MCP": {
"command": "C:/Projects/Unity/Unity-MCP/Unity-MCP-Plugin/Library/mcp-server/win-x64/unity-mcp-server.exe",
"args": [
"--plugin-port=60606",
"--plugin-timeout=10000",
"--client-transport=stdio"
]
}
}
}
Launch HTTP(S) (Local OR Remote)
Launch server with HTTP transport type for local OR remote usage using HTTP(S) url.
./unity-mcp-server --plugin-port 60606 --plugin-timeout 10000 --client-transport http
MCP client config:
{
"mcpServers": {
"Unity-MCP": {
"command": "C:/Projects/Unity/Unity-MCP/Unity-MCP-Plugin/Library/mcp-server/win-x64/unity-mcp-server.exe",
"args": [
"--plugin-port=60606",
"--plugin-timeout=10000",
"--client-transport=http"
]
}
}
}
Variables
Doesn't matter what launch option you choose, all of them support custom configuration using both Environment Variables and Command Line Arguments. It would work with default values, if you just need to launch it, don't waste your time for the variables. Just make sure Unity Plugin also has default values, especially the --plugin-port
, they should be equal.
Environment Variable | Command Line Args | Description |
---|---|---|
UNITY_MCP_PLUGIN_PORT |
--plugin-port |
Plugin → Server connection port (default: 60606) |
UNITY_MCP_PLUGIN_TIMEOUT |
--plugin-timeout |
Plugin → Server connection timeout (ms) (default: 10000) |
UNITY_MCP_CLIENT_PORT |
--client-port |
Client → Server connection port (default: 8080) |
UNITY_MCP_CLIENT_TRANSPORT |
--client-transport |
Client → Server transport type: stdio or http (default: http ) |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last Updated |
---|---|---|
0.18.1 | 34 | 10/4/2025 |
Initial release of Unity MCP Server as a global dotnet tool