← projects

Roblox Studio MCP

MCP integration server — Lets a model author and run Luau inside a live Roblox Studio session.

Go · Luau · MCP · JSON-RPC · Roblox

Where
Personal project
Team
Solo
My role
Everything — Go MCP server, Luau plugin, transport design

Problem

A model can write Luau, but it cannot see whether the Luau works. Closing that loop means reaching into a live Studio session, and Studio plugins cannot accept inbound connections — so there is no server for a tool call to connect to.

Solution

Invert the direction of the connection. The plugin long-polls a loopback HTTP server the MCP process owns; a tool call parks in a dispatch queue until the next poll collects it, runs it in Studio, and POSTs the result back.

Architecture

Inverted long-poll transport
Studio plugins cannot accept inbound connections, so the plugin initiates. Latency is bounded below by the poll interval, not by the work itself.

Overview

An MCP server in Go that gives a model real hands inside a running Roblox Studio session — creating scripts, editing them, inspecting the DataModel, and executing Luau. The interesting constraint is that Studio plugins cannot accept inbound connections, so the direction is inverted: the Luau plugin long-polls a small HTTP server the MCP process runs on 127.0.0.1:44755. A tool call parks in Dispatch until the plugin's next poll picks it up, runs it, and POSTs the outcome back. The MCP side speaks JSON-RPC over stdio, so stdout is reserved for the protocol and all logging goes to stderr. Scaffolded from go-mcp-bootstrap.