Unity MCP Server
Enables AI assistants to interact with Unity Editor projects through 68 tools for manipulating scenes, GameObjects, components, transforms, running tests, and accessing project files. Provides live resources for console logs, scene hierarchy, test results, and project file trees.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Unity MCP Servercreate a cube GameObject at position (0, 2, 0)"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Unity MCP Server
MCP server for the Unity Editor. Lets AI agents like Claude Code inspect, manipulate, test, and screenshot your project.
Highlights
73 tools: scenes, GameObjects, components, prefabs, transforms, tests, reflection + decompilation, C# eval, UI capture
Zero-config clients: one click (or one command) per machine, then every project and editor connects automatically. No ports, no tokens, no per-project config
Multi-editor safe: each open project runs its own server, sessions route to the right one by themselves
MCP resources: console logs, scene hierarchy, test results, project files
Unity 2022.3+ (Unity 6 recommended), Node.js 18+
Related MCP server: Unity MCP Server
Install
Package Manager > + > Add package from git URL:
https://github.com/Singtaa/UnityMCP.gitOr clone / submodule into Packages/com.singtaa.unity-mcp.
Setup (once per machine)
Open the project in Unity. Server auto-starts, launcher deploys to
~/.unity-mcp/stdio.jsWindow > Unity MCP Server > Set up Claude Code
Done. Terminal equivalent:
# macOS / Linux
claude mcp add --scope user --transport stdio unity -- node ~/.unity-mcp/stdio.js
# Windows
claude mcp add --scope user --transport stdio unity -- node "%USERPROFILE%\.unity-mcp\stdio.js"Every Claude Code session inside any Unity project now reaches that project's own editor. Multiple editors side by side: each session finds its own. Editor closed or mid-reload: tools return a clear error and recover on their own.
Under the hood: the editor writes a per-session beacon (Temp/UnityMcp_Endpoint.json, removed on quit, never stale). The launcher resolves the session's project (CLAUDE_PROJECT_DIR, else cwd walk-up, UNITY_MCP_PROJECT overrides both) and proxies MCP to that project's live endpoint.
Other MCP clients: same launcher, or plain HTTP (endpoint + token shown in the window).
Tools
Group | Tools ( |
Scene |
|
GameObject |
|
Component |
|
Transform |
|
Editor |
|
Prefab |
|
Test |
|
Capture |
|
Project & Assets |
|
Reflection |
|
Eval |
|
Notable:
unity_eval: compile + run a C# snippet in the editor, no domain reload. Expression form returns its value, statement form usesreturn. Common usings imported, leadingusinglines hoisted. Bundled Roslyn (C# 9 ceiling). First call warms up for a few seconds, then tens of ms per compileunity_capture_panel: renders a UI ToolkitPanelSettingsto PNG offscreen, no scene chrome, works in edit and play mode. Auto-detects the activeUIDocumentunity_assets_find: Project-window query syntax (t:Material,t:Prefab ui,l:MyLabel), optional folder scoping, capped results with total countunity_reflection_decompile: full C# source of any loaded type or methodQuirks: wait ~1s after a domain reload before test tools;
unity_capture_game_viewis play-mode-only on Unity 6.3+
Resources
unity://console/logs · unity://hierarchy · unity://hierarchy/{scene} · unity://tests/results · unity://project/files
Configuration
ProjectSettings/McpSettings.json (meant to be committed): HTTP port 5173, IPC port 52100, auto-start, auth token.
Ports taken by another project's server? A free pair is auto-allocated and stored per-machine in UserSettings/McpPortOverride.json (gitignored), so port shuffles never reach the team. Project identity is validated on every bridge connection: an editor can never adopt another project's server, even with misconfigured ports.
Manual server start: node src/server.js with MCP_PROJECT_ROOT set to the project path.
Works with Unity CLI
Complementary, not competing:
Unity CLI owns editor lifecycle: installs,
unity open, builds, CIUnityMCP owns the live editor session: UI capture, decompilation, eval, test loops, zero-config routing
Typical agent loop:
unity open <project>via CLI, editor boots, server + beacon come up, launcher connects. No config on either sideCLI-launched editors run unfocused / in the background. UnityMCP is built and tested for exactly that (background-safe startup, retry through domain reloads)
No port or tool-name conflicts. Register both
Architecture
┌─────────────────────────────────────────────────────────────┐
│ AI Assistant │
├──────────────────────────────┬──────────────────────────────┤
│ stdio launcher │ (or direct HTTP clients) │
│ ~/.unity-mcp/stdio.js │ │
│ resolves the session's │ │
│ project, reads its beacon │ │
│ Temp/UnityMcp_Endpoint.json │ │
├──────────────────────────────┴──────────────────────────────┤
│ HTTP JSON-RPC (Port 5173, per project) │
├─────────────────────────────────────────────────────────────┤
│ Node.js MCP Server (Server~/) │
├─────────────────────────────────────────────────────────────┤
│ TCP NDJSON (Port 52100) │
├─────────────────────────────────────────────────────────────┤
│ Unity Editor C# Bridge │
│ (McpBridge → ToolRegistry → MainThreadDispatcher) │
├─────────────────────────────────────────────────────────────┤
│ Unity APIs │
└─────────────────────────────────────────────────────────────┘Each open project runs its own Node server. The launcher is the shared front door that routes every session to the right one.
Development
Unity tests: Window > General > Test Runner (EditMode + PlayMode)
Launcher tests:
npm testinServer~/Changelog: CHANGELOG.md
License
MIT. See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-quality-maintenanceEnables AI assistants to interact with Unity Editor through the Model Context Protocol, allowing natural language control of Unity projects including scene manipulation, GameObject creation, component updates, package management, and test execution.
- Alicense-qualityDmaintenanceEnables AI agents to query and control the Unity Editor, supporting scene management, GameObject manipulation, asset browsing, play mode control, and real-time editor operations through 52+ tools.1MIT
- AlicenseCqualityBmaintenanceIntegrates AI assistants with the Unity Editor for scene manipulation, asset management, and testing, plus Unity documentation search via RAG.8466MIT
- Alicense-qualityDmaintenanceEnables AI assistants to interact with Unity Editor, managing scenes, game objects, animations, materials, scripts, and more via natural language commands.1MIT
Related MCP Connectors
Build, validate, and deploy multi-agent AI solutions from any AI environment.
SaaS intelligence for AI agents. 5 unified tools cover 1,000+ services with 91-96% token savings.
Build and run visual creative-production workflows from your AI agent.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Singtaa/UnityMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server