@mseep/anklebreaker-unity-mcp 2.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/manifest.json ADDED
@@ -0,0 +1,178 @@
1
+ {
2
+ "manifest_version": "0.3",
3
+ "name": "unity-mcp",
4
+ "display_name": "AnkleBreaker Unity MCP",
5
+ "version": "2.18.0",
6
+ "description": "Multi-agent MCP server for Unity Editor — 259 tools (66 core + 193 advanced via two-tier system) across 24 categories with multi-instance support. Designed for Claude Cowork with async queue and fair scheduling across agents.",
7
+ "long_description": "AnkleBreaker Unity MCP connects Claude to your Unity Editor with 259 tools across 24 categories. Built for Claude Cowork's multi-agent architecture, where multiple AI agents collaborate on the same Unity project in parallel.\n\n**Key features:**\n- 259 tools via two-tier system: 66 core tools always available + 193 advanced tools on-demand via unity_advanced_tool\n- Two-tier architecture keeps MCP payload under 32KB for reliable client registration\n- Multi-instance support: run multiple Unity Editors simultaneously, auto-port selection (7890–7899), shared instance registry\n- ParrelSync clone detection for multiplayer development workflows\n- Multi-agent async queue with fair round-robin scheduling\n- Read batching (up to 5/frame) and write serialization (1/frame)\n- Agent session tracking and action logging\n- Project Context auto-injection for project-aware AI assistance\n- Automatic fallback to legacy sync mode for older plugin versions\n\n**Requires the companion Unity Editor plugin:** Install via Unity Package Manager → Add package from git URL → `https://github.com/AnkleBreaker-Studio/unity-mcp-plugin.git`\n\nAfter installing the plugin, open Window → AB Unity MCP in Unity and verify the bridge is running.",
8
+ "author": {
9
+ "name": "AnkleBreaker Studio",
10
+ "email": "francois@anklebreaker-studio.com",
11
+ "url": "https://anklebreaker-studio.com"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/AnkleBreaker-Studio/unity-mcp-server.git"
16
+ },
17
+ "homepage": "https://github.com/AnkleBreaker-Studio/unity-mcp-server",
18
+ "documentation": "https://github.com/AnkleBreaker-Studio/unity-mcp-server/blob/main/README.md",
19
+ "support": "https://github.com/AnkleBreaker-Studio/unity-mcp-server/issues",
20
+ "icon": "icon.png",
21
+ "license": "MIT",
22
+ "keywords": [
23
+ "unity",
24
+ "unity3d",
25
+ "game-development",
26
+ "editor",
27
+ "scenes",
28
+ "gameobjects",
29
+ "scripts",
30
+ "builds",
31
+ "profiling",
32
+ "multi-agent",
33
+ "multi-instance",
34
+ "parrelsync",
35
+ "cowork"
36
+ ],
37
+ "privacy_policies": [],
38
+ "compatibility": {
39
+ "claude_desktop": ">=1.0.0",
40
+ "platforms": [
41
+ "win32",
42
+ "darwin"
43
+ ],
44
+ "runtimes": {
45
+ "node": ">=18.0.0"
46
+ }
47
+ },
48
+ "server": {
49
+ "type": "node",
50
+ "entry_point": "src/index.js",
51
+ "mcp_config": {
52
+ "command": "node",
53
+ "args": [
54
+ "${__dirname}/src/index.js"
55
+ ],
56
+ "env": {
57
+ "UNITY_HUB_PATH": "${user_config.unity_hub_path}",
58
+ "UNITY_BRIDGE_PORT": "${user_config.bridge_port}"
59
+ },
60
+ "platform_overrides": {
61
+ "darwin": {
62
+ "env": {
63
+ "UNITY_HUB_PATH": "${user_config.unity_hub_path}"
64
+ }
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "user_config": {
70
+ "unity_hub_path": {
71
+ "type": "file",
72
+ "title": "Unity Hub Path",
73
+ "description": "Path to Unity Hub executable. On Windows: C:\\Program Files\\Unity Hub\\Unity Hub.exe — On macOS: /Applications/Unity Hub.app/Contents/MacOS/Unity Hub",
74
+ "required": false,
75
+ "default": "C:\\Program Files\\Unity Hub\\Unity Hub.exe"
76
+ },
77
+ "bridge_port": {
78
+ "type": "string",
79
+ "title": "Bridge Port",
80
+ "description": "Default port for the Unity Editor plugin. With multi-instance support (v2.15.0+), ports are auto-discovered from the instance registry. Only used as fallback. Default: 7890",
81
+ "required": false,
82
+ "default": "7890"
83
+ }
84
+ },
85
+ "tools_generated": true,
86
+ "tools": [
87
+ { "name": "unity_list_instances", "description": "List all running Unity Editor instances with project info" },
88
+ { "name": "unity_select_instance", "description": "Select which Unity Editor instance to target" },
89
+ { "name": "unity_hub_list_editors", "description": "List installed Unity Editor versions" },
90
+ { "name": "unity_hub_install_editor", "description": "Install a Unity Editor version via Unity Hub" },
91
+ { "name": "unity_hub_available_releases", "description": "List Unity versions available for download" },
92
+ { "name": "unity_hub_install_modules", "description": "Install platform modules for a Unity version" },
93
+ { "name": "unity_hub_get_install_path", "description": "Get default Unity install path" },
94
+ { "name": "unity_hub_set_install_path", "description": "Set default Unity install path" },
95
+ { "name": "unity_editor_ping", "description": "Ping the Unity Editor to check connection status" },
96
+ { "name": "unity_editor_state", "description": "Get current Unity Editor state (play mode, scene, project)" },
97
+ { "name": "unity_project_info", "description": "Get project information (name, version, packages, settings)" },
98
+ { "name": "unity_scene_info", "description": "Get information about the current scene" },
99
+ { "name": "unity_scene_hierarchy", "description": "Get the full scene hierarchy tree" },
100
+ { "name": "unity_scene_open", "description": "Open a scene by asset path" },
101
+ { "name": "unity_scene_save", "description": "Save the current scene" },
102
+ { "name": "unity_scene_new", "description": "Create a new empty scene" },
103
+ { "name": "unity_scene_stats", "description": "Get comprehensive scene statistics" },
104
+ { "name": "unity_gameobject_create", "description": "Create a new GameObject in the scene" },
105
+ { "name": "unity_gameobject_delete", "description": "Delete a GameObject from the scene" },
106
+ { "name": "unity_gameobject_info", "description": "Get detailed info about a GameObject" },
107
+ { "name": "unity_gameobject_set_transform", "description": "Set position, rotation, scale of a GameObject" },
108
+ { "name": "unity_gameobject_duplicate", "description": "Duplicate a GameObject with all children" },
109
+ { "name": "unity_gameobject_set_active", "description": "Set a GameObject active or inactive" },
110
+ { "name": "unity_gameobject_reparent", "description": "Move a GameObject under a new parent" },
111
+ { "name": "unity_component_add", "description": "Add a component to a GameObject" },
112
+ { "name": "unity_component_remove", "description": "Remove a component from a GameObject" },
113
+ { "name": "unity_component_get_properties", "description": "Get serialized properties of a component" },
114
+ { "name": "unity_component_set_property", "description": "Set a property value on a component" },
115
+ { "name": "unity_component_set_reference", "description": "Set an object reference on a component property" },
116
+ { "name": "unity_component_batch_wire", "description": "Wire multiple object references in one call" },
117
+ { "name": "unity_component_get_referenceable", "description": "Discover assignable objects for a property" },
118
+ { "name": "unity_asset_list", "description": "List assets in the project" },
119
+ { "name": "unity_asset_import", "description": "Import a file as an asset" },
120
+ { "name": "unity_asset_delete", "description": "Delete an asset from the project" },
121
+ { "name": "unity_asset_create_prefab", "description": "Create a prefab from a GameObject" },
122
+ { "name": "unity_asset_instantiate_prefab", "description": "Instantiate a prefab in the scene" },
123
+ { "name": "unity_script_create", "description": "Create a new C# script" },
124
+ { "name": "unity_script_read", "description": "Read a C# script's contents" },
125
+ { "name": "unity_script_update", "description": "Update a C# script's contents" },
126
+ { "name": "unity_execute_code", "description": "Execute C# code in the Unity Editor (Roslyn)" },
127
+ { "name": "unity_material_create", "description": "Create a new material" },
128
+ { "name": "unity_renderer_set_material", "description": "Assign a material to a renderer" },
129
+ { "name": "unity_build", "description": "Build the project for a target platform" },
130
+ { "name": "unity_play_mode", "description": "Control play mode (play, pause, stop)" },
131
+ { "name": "unity_console_log", "description": "Get recent Unity console messages" },
132
+ { "name": "unity_console_clear", "description": "Clear the Unity console" },
133
+ { "name": "unity_execute_menu_item", "description": "Execute a Unity Editor menu command" },
134
+ { "name": "unity_undo", "description": "Undo the last operation" },
135
+ { "name": "unity_redo", "description": "Redo the last undone operation" },
136
+ { "name": "unity_undo_history", "description": "Get current undo group info" },
137
+ { "name": "unity_selection_get", "description": "Get currently selected GameObjects" },
138
+ { "name": "unity_selection_set", "description": "Set editor selection" },
139
+ { "name": "unity_selection_focus_scene_view", "description": "Frame a GameObject in Scene View" },
140
+ { "name": "unity_selection_find_by_type", "description": "Find GameObjects by component type" },
141
+ { "name": "unity_search_by_component", "description": "Search scene by component type" },
142
+ { "name": "unity_search_by_tag", "description": "Search scene by tag" },
143
+ { "name": "unity_search_by_layer", "description": "Search scene by layer" },
144
+ { "name": "unity_search_by_name", "description": "Search scene by name pattern" },
145
+ { "name": "unity_search_assets", "description": "Search project assets" },
146
+ { "name": "unity_search_missing_references", "description": "Find missing references in scene" },
147
+ { "name": "unity_screenshot_game", "description": "Capture Game View screenshot" },
148
+ { "name": "unity_screenshot_scene", "description": "Capture Scene View screenshot" },
149
+ { "name": "unity_screenshot_editor_window", "description": "Capture any Editor window (Inspector, Project, custom) to PNG — Windows only" },
150
+ { "name": "unity_graphics_scene_capture", "description": "Capture Scene View as inline image" },
151
+ { "name": "unity_graphics_game_capture", "description": "Capture Game View as inline image" },
152
+ { "name": "unity_prefab_info", "description": "Get prefab information and overrides" },
153
+ { "name": "unity_set_object_reference", "description": "Set an object reference via prefab system" },
154
+ { "name": "unity_packages_list", "description": "List installed Unity packages" },
155
+ { "name": "unity_packages_add", "description": "Install a Unity package" },
156
+ { "name": "unity_packages_remove", "description": "Remove a Unity package" },
157
+ { "name": "unity_packages_search", "description": "Search Unity package registry" },
158
+ { "name": "unity_packages_info", "description": "Get package details" },
159
+ { "name": "unity_queue_info", "description": "Get multi-agent queue state" },
160
+ { "name": "unity_agents_list", "description": "List active agent sessions" },
161
+ { "name": "unity_agent_log", "description": "Get action log for an agent" },
162
+ { "name": "unity_list_advanced_tools", "description": "Browse 193 advanced tools by category (animation, physics, lighting, shaders, profiling, etc.)" },
163
+ { "name": "unity_advanced_tool", "description": "Execute any advanced tool by name + params" },
164
+ { "name": "unity_get_project_context", "description": "Get project-specific documentation context" }
165
+ ],
166
+ "prompts": [
167
+ {
168
+ "name": "setup_scene",
169
+ "description": "Set up a basic Unity scene with common elements",
170
+ "text": "Help me set up a Unity scene. Start by checking the connection to Unity, then show me the current hierarchy. Ask what kind of scene I want to create (e.g., 3D platformer, FPS, puzzle game) and set up appropriate GameObjects, lighting, and a camera."
171
+ },
172
+ {
173
+ "name": "profile_and_optimize",
174
+ "description": "Profile the project and suggest optimizations",
175
+ "text": "Profile my Unity project and help me optimize it. Start the profiler, take a memory snapshot, check the console for warnings, and analyze the results. Give me specific, actionable recommendations for improving performance."
176
+ }
177
+ ]
178
+ }
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@mseep/anklebreaker-unity-mcp",
3
+ "version": "2.30.0",
4
+ "description": "Unity MCP Server \u2014 Multi-agent MCP server for Unity Editor, designed for Claude Cowork. By AnkleBreaker Studio.",
5
+ "type": "module",
6
+ "main": "src/index.js",
7
+ "bin": {
8
+ "unity-mcp": "./src/index.js"
9
+ },
10
+ "scripts": {
11
+ "start": "node src/index.js",
12
+ "dev": "node --watch src/index.js",
13
+ "pack": "npx @anthropic-ai/mcpb pack . unity-mcp.mcpb && npx @anthropic-ai/mcpb clean unity-mcp.mcpb"
14
+ },
15
+ "dependencies": {
16
+ "@modelcontextprotocol/sdk": "^1.0.0"
17
+ },
18
+ "engines": {
19
+ "node": ">=18.0.0"
20
+ },
21
+ "keywords": [
22
+ "mseep",
23
+ "mcp-server"
24
+ ],
25
+ "publisher": "mseep"
26
+ }
package/src/config.js ADDED
@@ -0,0 +1,52 @@
1
+ // AnkleBreaker Unity MCP — Configuration
2
+ // Adjust these paths to match your Unity installation
3
+
4
+ import { homedir } from "os";
5
+ import { join } from "path";
6
+
7
+ // Determine the instance registry path based on platform
8
+ function getRegistryPath() {
9
+ if (process.platform === "win32") {
10
+ const localAppData = process.env.LOCALAPPDATA || join(homedir(), "AppData", "Local");
11
+ return join(localAppData, "UnityMCP", "instances.json");
12
+ }
13
+ // macOS / Linux
14
+ return join(homedir(), ".local", "share", "UnityMCP", "instances.json");
15
+ }
16
+
17
+ export const CONFIG = {
18
+ // Unity Hub
19
+ unityHubPath: process.env.UNITY_HUB_PATH || "C:\\Program Files\\Unity Hub\\Unity Hub.exe",
20
+
21
+ // Unity Editor Bridge (default — used as fallback when no instance is selected)
22
+ editorBridgeHost: process.env.UNITY_BRIDGE_HOST || "127.0.0.1",
23
+ editorBridgePort: parseInt(process.env.UNITY_BRIDGE_PORT || "7890"),
24
+ editorBridgeTimeout: parseInt(process.env.UNITY_BRIDGE_TIMEOUT || "60000"),
25
+
26
+ // Multi-instance support
27
+ portRangeStart: parseInt(process.env.UNITY_PORT_RANGE_START || "7890"),
28
+ portRangeEnd: parseInt(process.env.UNITY_PORT_RANGE_END || "7899"),
29
+ instanceRegistryPath: process.env.UNITY_INSTANCE_REGISTRY || getRegistryPath(),
30
+
31
+ // Queue mode polling (for async ticket-based requests)
32
+ queuePollIntervalMs: parseInt(process.env.UNITY_QUEUE_POLL_INTERVAL || "150"),
33
+ queuePollMaxMs: parseInt(process.env.UNITY_QUEUE_POLL_MAX || "1500"),
34
+ queuePollTimeoutMs: parseInt(process.env.UNITY_QUEUE_POLL_TIMEOUT || "120000"), // Max total poll time (2 min)
35
+
36
+ // Default Unity Editor path pattern (version will be interpolated)
37
+ editorPathPattern: process.env.UNITY_EDITOR_PATH || "C:\\Program Files\\Unity\\Hub\\Editor\\{version}\\Editor\\Unity.exe",
38
+
39
+ // Registry staleness timeout (ms) — if a registry entry's lastSeen timestamp is older
40
+ // than this AND the port is unresponsive, the entry is considered stale (Unity likely crashed).
41
+ // The plugin sends a heartbeat every 30s, so 5 minutes gives plenty of margin.
42
+ registryStalenessTimeoutMs: parseInt(process.env.UNITY_REGISTRY_STALENESS_TIMEOUT || "300000"), // 5 minutes
43
+
44
+ // Response size limits (bytes) — protects against Write EOF errors on large projects
45
+ // Soft limit: log a warning but still return the response
46
+ responseSoftLimitBytes: parseInt(process.env.UNITY_RESPONSE_SOFT_LIMIT || String(2 * 1024 * 1024)), // 2 MB
47
+ // Hard limit: truncate the response and return pagination guidance instead
48
+ responseHardLimitBytes: parseInt(process.env.UNITY_RESPONSE_HARD_LIMIT || String(4 * 1024 * 1024)), // 4 MB
49
+
50
+ // Logging
51
+ logLevel: process.env.LOG_LEVEL || "info",
52
+ };