Bug Description
When Roblox Studio is opened after StudioMCP.exe is already running, list_roblox_studios returns an empty list (with the note “The previously active Studio instance has disconnected”), even though the Studio instance is running and the MCP panel inside Studio shows “connected”.
The MCP panel UI inside Studio displays a connected state, but the StudioMCP server-side session is stale and cannot discover the newly opened Studio window.
Reproduction Steps
- Have at least one Studio window open → MCP is working normally
- Close that Studio window (StudioMCP may continue running as a background process)
- Open a new Studio window (a different place/project)
- Call
list_roblox_studiosvia MCP client - Expected: The new Studio instance appears in the list
- Actual: Returns empty list with
"previously active Studio instance has disconnected"
Root Cause (investigated)
Through process and network analysis, the issue was traced to:
StudioMCP.execommunicates withRobloxStudioBeta.exevia a named pipe namedRBX_STUDIO_NS-{PID}, where{PID}is the Studio process ID.- When Studio closes, the pipe is destroyed.
- When a new Studio window opens (with a new PID), it creates a new pipe
RBX_STUDIO_NS-{newPID}. - However, the already-running
StudioMCP.exeprocess does not automatically discover the new pipe. It retains stale state from the previous session. - As a result, the MCP
initializehandshake fails (connection closed: initialize request), and no Studio instances are returned.
Workaround: Manually opening the MCP panel widget inside Studio forces the plugin to re-register with StudioMCP, which unblocks subsequent calls. However, this is not intuitive and requires user intervention every time Studio is reopened.
Expected Behavior
StudioMCP should either:
- Automatically scan for active
RBX_STUDIO_NS-*named pipes on eachlist_roblox_studioscall, or - Implement a reconnection/discovery mechanism when a new Studio window is detected
Environment
- Roblox Studio Version:
0.729.0.7290838 - StudioMCP Version:
version-4bb3958a2cde4efb - OS: Windows 11
- Reproduced consistently when: closing one Studio window and opening a new one while StudioMCP remains in memory
Additional Notes
Previously (with a single Studio window workflow), this issue does not occur because StudioMCP restarts together with Studio. The bug surfaces specifically in multi-window or sequential-open workflows.