
How to add MCP Unity to Claude Desktop
Connect AI assistants to the Unity Editor to manipulate scenes, GameObjects, assets, and run tests via MCP. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 ยท 1.8kโ ยท stdio ยท no auth
Claude Desktop config for MCP Unity
{
"mcpServers": {
"mcp-unity": {
"command": "node",
"args": [
"ABSOLUTE/PATH/TO/mcp-unity/Server~/build/index.js"
]
}
}
}Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the MCP Unity config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm MCP Unity's tools appear under the ๐ tools menu.
Before you start
- Unity 6 or later (to install the server package)
- Node.js 18 or later (to run the server)
- npm 9 or later (to build/debug the server)
- Install the Unity package via Package Manager git URL: https://github.com/CoderGamester/mcp-unity.git
- Start the WebSocket server from Unity (Tools > MCP Unity > Server Window > Start Server)
What MCP Unity can do in Claude Desktop
execute_menu_itemExecutes Unity menu items (functions tagged with the MenuItem attribute).
select_gameobjectSelects game objects in the Unity hierarchy by path or instance ID.
update_gameobjectUpdates a GameObject's core properties (name, tag, layer, active/static state), or creates the GameObject if it does not exist.
update_componentUpdates component fields on a GameObject, or adds the component if the GameObject does not contain it.
add_packageInstalls new packages in the Unity Package Manager.
run_testsRuns tests using the Unity Test Runner.
send_console_logSends a console log to Unity.
add_asset_to_sceneAdds an asset from the AssetDatabase to the Unity scene.
Security
The Node.js MCP server connects to a WebSocket server that Unity runs locally (default localhost:8090, port UNITY_PORT). By default the WebSocket binds to localhost; enabling 'Allow Remote Connections' binds it to 0.0.0.0 (all interfaces), exposing Editor control over the network โ only do this on trusted networks and behind a firewall. The Node server is launched via an absolute or project-relative path to a locally built build/index.js; rebuild it after package updates since the UPM package-cache hash in the path changes.
MCP Unity + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the MCP Unity config there under the "mcpServers" key and restart the client.
Is MCP Unity safe to use with Claude Desktop?
The Node.js MCP server connects to a WebSocket server that Unity runs locally (default localhost:8090, port UNITY_PORT). By default the WebSocket binds to localhost; enabling 'Allow Remote Connections' binds it to 0.0.0.0 (all interfaces), exposing Editor control over the network โ only do this on trusted networks and behind a firewall. The Node server is launched via an absolute or project-relative path to a locally built build/index.js; rebuild it after package updates since the UPM package-cache hash in the path changes.
What is MCP Unity?
A bridge that connects the Unity Editor to AI assistants using the Model Context Protocol. It exposes Editor functionality (creating objects, modifying components, running tests, etc.) as MCP tools and resources by running a WebSocket server inside Unity plus a Node.js MCP server that acts as a WebSocket client to Unity.
Which MCP hosts and IDEs support MCP Unity?
Any client that can act as an MCP client. Known compatible platforms include Cursor, Windsurf, Claude Desktop, Claude Code, Codex CLI, GitHub Copilot, Google Antigravity, and OpenCode.
Can I extend MCP Unity with custom tools?
Yes. In Unity (C#) you create classes inheriting from McpToolBase and register them in McpUnityServer.cs; in the Node.js server (TypeScript) you add a matching tool handler with a Zod schema in Server/src/tools/ and register it in Server/src/index.ts.