dev.breadpack.UnityMcpBridge
0.1.0
dotnet tool install --global dev.breadpack.UnityMcpBridge --version 0.1.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local dev.breadpack.UnityMcpBridge --version 0.1.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dev.breadpack.UnityMcpBridge&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package dev.breadpack.UnityMcpBridge --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Unity MCP
Unity MCP (Model Context Protocol) Bridge — Connect AI agents to Unity Editor.
Architecture
AI Agent (Claude, Cursor, etc.)
↕ stdio (MCP protocol)
UnityMcpBridge (.NET)
↕ TCP (binary protocol)
Unity Editor (UnityMcpEditor package)
- UnityMcpBridge — .NET MCP server, translates MCP protocol to Unity TCP commands
- UnityMcpEditor — Unity Editor package with TCP server, request handlers, and utilities
Installation
1. Unity Editor Package
Add UnityMcpEditor to your Unity project via UPM git URL:
- Open Unity Editor
- Window > Package Manager > "+" > Add package from git URL
- Enter:
https://github.com/breadpack/UnityMcp.git?path=UnityMcpEditor
2. MCP Bridge
Option A: dotnet tool (Recommended)
dotnet tool install -g BreadPack.UnityMcp.Bridge
Then configure your AI tool:
{
"mcpServers": {
"unity": {
"command": "unity-mcp-bridge",
"env": { "UNITY_TCP_PORT": "9876" }
}
}
}
Option B: Clone and build
git clone https://github.com/breadpack/UnityMcp.git
cd UnityMcp/UnityMcpBridge
dotnet build
Then configure with the built executable path:
{
"mcpServers": {
"unity": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/UnityMcp/UnityMcpBridge"],
"env": { "UNITY_TCP_PORT": "9876" }
}
}
}
Configuration
| Environment Variable | Default | Description |
|---|---|---|
UNITY_TCP_PORT |
9876 |
TCP port to connect to Unity Editor |
Claude Code (.mcp.json)
Place .mcp.json in your project root:
{
"mcpServers": {
"unity": {
"command": "unity-mcp-bridge",
"env": { "UNITY_TCP_PORT": "9876" }
}
}
}
Claude Desktop (claude_desktop_config.json)
Add to %APPDATA%/Claude/claude_desktop_config.json (Windows) or ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"unity": {
"command": "unity-mcp-bridge",
"env": { "UNITY_TCP_PORT": "9876" }
}
}
}
Available Tools (23)
Observation (12)
| Tool | Description |
|---|---|
unity_ping |
Check Unity Editor connection |
unity_get_hierarchy |
Get scene hierarchy |
unity_get_asset_hierarchy |
Inspect Prefab/Scene hierarchy without opening |
unity_get_component_details |
Get component property details |
unity_get_screen |
Get current screen info (Play Mode) |
unity_get_ui_tree |
Get UI visual tree |
unity_get_console_logs |
Get console log entries |
unity_get_available_actions |
List available actions |
unity_take_screenshot |
Capture Game/Scene view screenshot |
unity_addressable_add |
Add asset to Addressable group |
unity_addressable_set_address |
Set Addressable asset address |
unity_refresh_assets |
Refresh AssetDatabase |
Scene Manipulation (11)
| Tool | Description |
|---|---|
unity_create_gameobject |
Create new GameObject |
unity_delete_gameobject |
Delete GameObject |
unity_reparent_gameobject |
Change parent of GameObject |
unity_set_transform |
Set transform properties |
unity_add_component |
Add component to GameObject |
unity_remove_component |
Remove component |
unity_set_property |
Set component property value |
unity_set_asset_reference |
Set asset reference on component |
unity_instantiate_prefab |
Instantiate prefab in scene |
unity_render_uxml |
Render UXML template |
unity_play_mode |
Control Play Mode |
Requirements
- Unity: 6000.0+ (Unity 6)
- .NET: 9.0+ (for Bridge)
- Dependencies: Newtonsoft.Json (Unity), UniTask (Unity)
Conditional Features
Addressables Support
To enable Addressable tools, add the scripting define symbol UNITY_MCP_ADDRESSABLES to your Unity project:
- Edit > Project Settings > Player > Script Compilation > Scripting Define Symbols
- Add
UNITY_MCP_ADDRESSABLES
License
MIT
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 76 | 3/11/2026 |