StudioMCP fails to list Studio instances after new Studio window opens while StudioMCP is already running

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

  1. Have at least one Studio window open → MCP is working normally
  2. Close that Studio window (StudioMCP may continue running as a background process)
  3. Open a new Studio window (a different place/project)
  4. Call list_roblox_studios via MCP client
  5. Expected: The new Studio instance appears in the list
  6. 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.exe communicates with RobloxStudioBeta.exe via a named pipe named RBX_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.exe process does not automatically discover the new pipe. It retains stale state from the previous session.
  • As a result, the MCP initialize handshake 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 each list_roblox_studios call, 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.

2 Likes

And it burns so much usage trying to find other bridges :face_holding_back_tears: