Repository navigation
Configuration
Everything is set in Window > AI Game Dev and saved per user in UserSettings/AI-Game-Developer-Config.json (created automatically; UserSettings/ is normally not committed). unity-mcp-cli configure edits the same file from a terminal.
| Mode | What happens | When to use |
|---|---|---|
| Cloud (default) | The plugin connects to https://ai-game.dev/mcp after you sign in with Authorize in the window or unity-mcp-cli login. It never starts a local server. |
Most users; the agent config points at the cloud endpoint. |
| Custom | The plugin uses the URL you set (host in the file). With a local URL it can download and start the local server itself. |
Offline work, self-hosted or Docker servers, CI. |
Cloud is the default because it needs no open ports and avoids port conflicts with other programs; it is free. The cloud relay is stateless: it routes tool calls between the AI client and the Editor without inspecting or persisting their contents, and records request and MCP event metadata such as tool names, timing and status (see the Privacy Policy). Custom is an equal option for offline or air-gapped work.
setup-mcp writes a per-project pinned endpoint (https://ai-game.dev/mcp/p/<pin>) by default, so an agent started in one project folder talks only to that project's Editor. Pass --no-pin for the shared endpoint.
Editing
hostin the file does not switch the mode. Select Custom in the window, or set"connectionMode": "Custom"while Unity is closed.
A tool can be shown (listed to the agent) or hidden (installed, not listed, still runs when called by name). The defaults are listed in AI Tools Reference. Change them:
- in the AI Game Dev window, per tool;
- by the agent, with the
tool-set-visibilitytool; - from a terminal:
unity-mcp-cli configure ./MyGame --list
unity-mcp-cli configure ./MyGame --enable-tools screenshot-scene-view,script-read
unity-mcp-cli configure ./MyGame --disable-all-prompts--enable-* / --disable-* exist for tools, prompts and resources, each with an --…-all-… form.
Environment variables and command-line arguments override the saved file in memory only; they are never written back.
| Variable | Values | Effect |
|---|---|---|
UNITY_MCP_CLOUD_URL |
URL | Server URL (UNITY_MCP_HOST is a legacy alias) |
UNITY_MCP_CONNECTION_MODE |
Cloud / Custom
|
Force the mode (a loopback URL implies Custom) |
UNITY_MCP_KEEP_CONNECTED |
true / false
|
Keep the connection active |
UNITY_MCP_AUTH_OPTION |
none / oauth / token
|
Authentication mode |
UNITY_MCP_TOKEN |
string | Token for token mode |
UNITY_MCP_TRANSPORT |
stdio / streamableHttp
|
Client transport the plugin configures |
UNITY_MCP_START_SERVER |
true / false
|
Keep a local server process running |
UNITY_MCP_TOOLS |
comma-separated ids | Show only these tools |
Each also works as an Editor command-line arg, -UNITY_MCP_…=<value> (short aliases: -url, -auth, -token); args win over environment variables. Example, a batch-mode Editor against a local server:
Unity -batchmode -nographics -projectPath ./MyGame \
-UNITY_MCP_CLOUD_URL=http://localhost:8080 \
-UNITY_MCP_KEEP_CONNECTED=trueunity-mcp-cli open sets the same variables from flags (--url, --keep-connected, --auth, --token, --tools, --transport, --start-server) and can start a windowless Editor with --headless.
If automatic setup does not fit, copy the JSON shown in the AI Game Dev window into your agent's MCP config. For a local server over stdio the command is the server binary the plugin downloaded:
"<project>/Library/mcp-server/<rid>/gamedev-mcp-server[.exe]" port=<port> client-transport=stdio
<rid> is one of win-x64, win-x86, win-arm64, osx-arm64, osx-x64, linux-x64, linux-arm64, and <port> is shown in the window. For example, Claude Code: claude mcp add ai-game-developer <command>. To run the server yourself (binary or Docker), see Server Setup.
| Menu | Use |
|---|---|
Window/AI Game Dev |
Main window |
Tools/AI Game Developer/Server/Download Binaries, Delete Binaries
|
Manage the local server binary |
Tools/AI Game Developer/Server/Open Logs, Open Log Errors
|
Local server logs |
Tools/AI Game Developer/Server/Launch MCP Inspector |
Debug MCP traffic |
Tools/AI Game Developer/Reset Config |
Restore defaults |