You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Editor/UnityBridge/McpUnityEditorWindow.cs
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,19 @@ private void DrawServerTab()
135
135
136
136
EditorGUILayout.Space();
137
137
138
+
// Allow remote connections toggle
139
+
boolallowRemoteConnections=EditorGUILayout.Toggle(newGUIContent("Allow Remote Connections","Allow connections from remote MCP bridges. When disabled, only localhost connections are allowed (default)."),settings.AllowRemoteConnections);
Copy file name to clipboardExpand all lines: Editor/UnityBridge/McpUnitySettings.cs
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,9 @@ public class McpUnitySettings
36
36
37
37
[Tooltip("Optional: Full path to the npm executable (e.g., /Users/user/.asdf/shims/npm or C:\\path\\to\\npm.cmd). If not set, 'npm' from the system PATH will be used.")]
38
38
publicstringNpmExecutablePath=string.Empty;
39
+
40
+
[Tooltip("Allow connections from remote MCP bridges. When disabled, only localhost connections are allowed (default).")]
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,17 @@ You can change depending on the OS you are using:
245
245
> [!TIP]
246
246
> The timeout between your AI Coding IDE (e.g., Claude Desktop, Cursor IDE, Windsurf IDE) and the MCP Server depends on the IDE.
247
247
248
+
## Optional: Allow Remote MCP Bridge Connections
249
+
250
+
By default, the WebSocket server binds to 'localhost'. To allow MCP bridge connections from other machines:
251
+
252
+
1. Open the Unity Editor
253
+
2. Navigate to Tools > MCP Unity > Server Window
254
+
3. Enable the "Allow Remote Connections" checkbox
255
+
4. Unity will bind the WebSocket server to '0.0.0.0' (all interfaces)
256
+
5. Restart the Node.js server to apply the new host configuration
257
+
6. Set the environment variable UNITY_HOST to your Unity machine's IP address when running the MCP bridge remotely: `UNITY_HOST=192.168.1.100 node server.js`
0 commit comments