Roblox Studio MCP is built on three cooperating layers: an MCP server that speaks to AI clients over stdio, an HTTP bridge server that queues work for Studio plugins, and a Roblox plugin that runs inside every open Studio window. Each layer has a single, clear responsibility—the AI client never talks directly to Studio, and Studio never needs to understand the MCP protocol. The bridge in the middle keeps both sides decoupled, allowing multiple Studio windows to share one server without any additional configuration.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Chrrxs/robloxstudio-mcp/llms.txt
Use this file to discover all available pages before exploring further.
Layer 1 — MCP Server
The outermost layer isRobloxStudioMCPServer, defined in packages/core/src/server.ts. It wraps @modelcontextprotocol/sdk’s Server class and communicates with the AI client (Claude, Cursor, Codex, Gemini, etc.) exclusively over stdio using JSON-RPC 2.0 — the standard MCP transport.
When the AI client connects it receives two handlers:
tools/list— returns the full tool catalog with names, descriptions, and JSON schemas.tools/call— dispatches a named tool call toTOOL_HANDLERSinhttp-server.ts, which in turn calls the matching method onRobloxStudioTools.
callableTools list is the set of tools that can actually be dispatched; tools is what the AI client sees. This separation lets deprecated tool names remain callable without appearing in tools/list.
The MCP server also exposes a Streamable HTTP MCP endpoint at
http://localhost:58741/mcp for clients that prefer HTTP transport over stdio.Layer 2 — HTTP Bridge
WhenRobloxStudioMCPServer.run() is called it starts an Express HTTP server (default port 58741, overridden by ROBLOX_STUDIO_PORT). This server is the meeting point between the MCP layer and the Studio plugin layer.
How a tool call travels through the bridge:
RobloxStudioToolscallsBridgeService.sendRequest(endpoint, data, targetInstanceId, targetRole).BridgeServicegenerates a UUID request ID, enqueues the request as aPendingRequest, and waits on aPromise.- The Studio plugin polls
/poll?pluginSessionId=<guid>every 500 ms and receives the pending request. - The plugin executes the corresponding Luau API call and POSTs the result back to
/responsewith{ requestId, response }. BridgeService.resolveRequest()resolves thePromise, and the result travels back up throughRobloxStudioTools→TOOL_HANDLERS→ the MCPtools/callresponse.
| Endpoint | Method | Purpose |
|---|---|---|
/ready | POST | Plugin registers on startup, receives assignedRole |
/poll | GET | Plugin fetches the next pending request |
/response | POST | Plugin posts execution results |
/disconnect | POST | Plugin deregisters on unload |
/health | GET | Returns connection status, versions, pending request count |
/status | GET | Lightweight status for monitoring |
Proxy Mode
When two AI client sessions are running simultaneously (for example, Claude and Cursor both connected to the same Studio), the second session’sRobloxStudioMCPServer cannot bind port 58741 — it’s already held by the first. Rather than failing, the second server automatically enters proxy mode:
- It creates a
ProxyBridgeServiceinstead of aBridgeService. - Every
sendRequestcall is forwarded as a POST tohttp://localhost:58741/proxyon the primary server. - The primary server’s bridge queue and the single plugin polling loop handle execution.
- The proxy mirrors the primary’s instance list via periodic GET
/instancescalls (every 1 second) so thatresolveTargetandget_connected_instanceswork correctly in both sessions.
ROBLOX_STUDIO_PROXY_PROMOTION_INTERVAL_MS).
Layer 3 — Studio Plugin
The Studio plugin is a compiled Roblox plugin file (.rbxmx) that runs inside every open Studio window. It is installed to the Roblox Plugins folder either manually (--install-plugin) or automatically at server startup (--auto-install-plugin).
On load, the plugin:
- Determines its role:
edit(the editable DataModel),server(play-server DataModel), orclient-N(play-client DataModel). - POSTs to
/readywith{ pluginSessionId, instanceId, role, placeId, placeName, isRunning, pluginVersion }. - Starts a polling loop — every 500 ms it calls
/poll?pluginSessionId=<guid>. If a pending request is returned, the plugin executes it using Roblox Luau APIs and POSTs the result back.
edit and server roles without user interaction. Client roles are activated by the server-side ClientBroker after playtests start.
Request Timeout
Every pending request has a 30-second timeout. If the Studio plugin does not poll and respond within 30 seconds,BridgeService rejects the Promise with "Request timeout". This surfaces to the AI client as a tool error. Common causes are Studio being minimized, the render loop paused, or the plugin not yet registered.
Version Mismatch Handling
When the plugin’s reportedpluginVersion differs from the server’s serverVersion, the bridge sets versionMismatch: true on the PluginInstance. The plugin continues to operate normally but shows a yellow warning banner in the Studio UI. The mismatch is reported in:
- The
/healthand/statusHTTP responses. - The
get_connected_instancesMCP tool result. - Server stderr at the moment of
/readyregistration.
Startup Sequence Summary
MCP server starts
npx @chrrxs/robloxstudio-mcp@latest launches. If --auto-install-plugin is passed, the matching .rbxmx file is copied to the Roblox Plugins folder before the server binds the port.HTTP bridge binds
The server claims port 58741. If the port is taken, proxy mode activates and requests are forwarded to the primary on port 58741.
AI client connects
Claude, Cursor, Codex, or Gemini connects over stdio. The server responds to
tools/list with the full tool catalog.Studio plugin registers
Each open Studio window’s plugin POSTs to
/ready. The bridge registers the instance and assigns it a routing key (instanceId) and role.