unity-mcp-server
Automates Unity Editor tasks such as creating/modifying scenes, GameObjects, components, prefabs, materials, UI automation, input simulation, visual capture, code base awareness, project control, and Addressables management.
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 in the scene at position (0,1,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
This repository is deprecated. Development has moved to akiojin/unity-cli. This repository will no longer receive updates. Please migrate to the successor project.
English | 日本語
Overview
Unity MCP Server lets LLM-based clients automate the Unity Editor. It focuses on reliable, scriptable workflows with a simple interface and zero or low-configuration setup.
Related MCP server: MCP For Unity
What It Can Do
Editor automation: Create/modify scenes, GameObjects, components, prefabs, materials
UI automation: Locate and interact with UI, validate UI state
Input simulation: Keyboard/mouse/gamepad/touch for playmode testing (Input System only)
Visual capture: Deterministic screenshots from Game/Scene/Explorer/Window views
Code base awareness: Safe structured edits and accurate symbol/search powered by bundled C# LSP (no
.slnfile required)Project control: Read/update project/editor settings; read logs, monitor compilation
Addressables management: Register/organize assets, manage groups, build automation
Performance
Code index tools outperform standard file operations:
Operation | Code Index Tool | Standard Tool | Advantage |
Symbol lookup |
|
| Instant vs 350ms |
Reference search |
|
| Structured results |
Code search |
|
| 3-5x smaller responses |
Key benefits:
128,040 files indexed with 100% coverage
Non-blocking background index builds (Worker Threads)
LLM-optimized output with pagination and size limits
For detailed benchmarks, see docs/benchmark-results-2025-12-13.md
Requirements
Unity 2020.3 LTS or newer
Node.js 18.x / 20.x / 22.x / 24.x LTS (25+ not supported)
Claude Desktop or another MCP-compatible client
Installation
Unity Package
Package Manager → Add from git URL:
https://github.com/akiojin/unity-mcp-server.git?path=UnityMCPServer/Packages/unity-mcp-serverOr via OpenUPM:
openupm add com.akiojin.unity-mcp-serverMCP Client Configuration
Configure your MCP client (Claude Desktop example):
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"unity-mcp-server": {
"command": "npx",
"args": ["@akiojin/unity-mcp-server@latest"]
}
}
}HTTP Mode (for HTTP-only networks)
npx @akiojin/unity-mcp-server --http 6401 --no-telemetry
curl http://localhost:6401/healthzQuick Start
Install the Unity package (Git URL or OpenUPM)
Configure your MCP client with the JSON above
Open your Unity project (package starts TCP listener on port 6400)
Launch your MCP client (it connects to the Node server)
Test the connection with
ping
Tip:
npx @akiojin/unity-mcp-server@latestdownloads and runs the latest build without cloning.
Architecture
┌────────────────┐ JSON-RPC (MCP) ┌──────────────────────┐
│ MCP Client │ ───────────────────────────▶ │ Node MCP Server │
│ (Claude/Codex/ │ ◀─────────────────────────── │ (@akiojin/unity- │
│ Cursor …) │ tool responses │ mcp-server) │
└────────────────┘ └──────────┬───────────┘
TCP│6400
▼
┌───────────────────┐
│ Unity Editor │
│ (Package opens │
│ TCP listener) │
└───────────────────┘Configuration
Configuration is optional; defaults work without any config file.
Node-side configuration uses environment variables only, and Unity-side host/port lives in Project Settings.
Tools
Unity MCP Server ships 100+ tools. Use the search_tools meta-tool to discover the right tool quickly.
For clients with strict tool-count limits, you can filter exposed tools by category:
export UNITY_MCP_TOOL_INCLUDE_CATEGORIES=system,scene,gameobject,analysis,script
export UNITY_MCP_TOOL_EXCLUDE_CATEGORIES=ui,input,addressables,video,screenshot,profilerSee docs/tools.md for discovery tips and the recommended Code Index workflow.
Note: find_refs supports paging via startAfter and returns cursor when results are truncated.
Claude Code Skills
This package includes Claude Code skills that provide workflow-oriented guidance for effectively using the 108+ tools.
Available Skills
Skill | Description | Triggers |
| Build MCP servers (TypeScript SDK), implement tools/resources/prompts, JSON-RPC patterns | "MCP server", "tool handler", "JSON-RPC", "TypeScript" |
| C# script editing, search, refactoring with TDD workflow | "C# edit", "script search", "refactoring" |
| Scene, GameObject, Component management | "scene create", "GameObject", "component add" |
| PlayMode control, input simulation, UI automation | "playmode", "input simulate", "UI click" |
| Prefab, Material, Addressables management | "prefab create", "material", "Addressables" |
| Unity Editor IMGUI for EditorWindow/Inspector/PropertyDrawer (not for in-game UI) | "EditorWindow", "Custom Inspector", "PropertyDrawer", "IMGUI" |
| In-game uGUI (Canvas/RectTransform/Anchors) UI design | "uGUI", "Canvas", "RectTransform", "Anchors", "HUD" |
| In-game UI Toolkit (UXML/USS/Flexbox) UI design | "UI Toolkit", "UXML", "USS", "VisualElement", "Flexbox" |
Installation
Install as a Claude Code plugin from GitHub:
# Step 1: Add marketplace
/plugin marketplace add akiojin/unity-mcp-server
# Step 2: Install plugin
/plugin install unity-mcp-server@unity-mcp-serverOr manually copy the .claude/skills/ directory to your project.
Usage
Skills activate automatically when you mention related keywords. You can also invoke them directly:
# Ask about C# editing workflow
"How do I edit Unity C# scripts?"
# Ask about scene management
"Create a new scene with basic lighting"
# Ask about testing
"How do I simulate keyboard input in playmode?"Troubleshooting
See docs/troubleshooting/README.md.
OpenUPM Scoped Registry
To use OpenUPM packages, add the scoped registry to your project:
Via Project Settings
Edit > Project Settings > Package ManagerUnder Scoped Registries, click +
Add:
Name:
OpenUPMURL:
https://package.openupm.comScopes:
com.akiojin,com.akiojin.unity-mcp-server
Via manifest.json
"scopedRegistries": [
{
"name": "OpenUPM",
"url": "https://package.openupm.com",
"scopes": ["com.akiojin", "com.akiojin.unity-mcp-server"]
}
]Repository Structure
.unity/
├── cache/ # Local caches (git-ignored)
└── capture/ # Screenshots/videos (git-ignored)
UnityMCPServer/
├── Packages/unity-mcp-server/ # UPM package (source)
└── Assets/ # Samples only
mcp-server/ # Node MCP server
csharp-lsp/ # Roslyn-based LSP toolFeature Documentation
All features are documented with SDD format: specs/
Contributing
See CONTRIBUTING.md for development setup, commit guidelines, and PR process.
Development Documentation
For internal development details (Spec Kit, release process, LLM optimization):
License
MIT License - see LICENSE file.
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.
Latest Blog Posts
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/akiojin/unity-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server