run_code
Runs a command in Roblox Studio and returns the printed output. Can be used to both make changes and retrieve information.
How to use it
run_code is exposed by the Studio Rust MCP Server MCP server. Add the server to your MCP client (Claude Desktop, Cursor, Windsurf and others), and the run_code tool becomes available to the model automatically. See the full listing for setup details and every tool this server provides.
Install Studio Rust MCP Server
claude mcp add --transport stdio Roblox_Studio -- '/Applications/RobloxStudioMCP.app/Contents/MacOS/rbx-studio-mcp' --stdioOther tools in Studio Rust MCP Server (5)
Gets the console output from Roblox Studio.
Gets the current Studio mode (startplay, runserver, or stop).
Inserts a model from the Roblox Creator Store into the workspace. Returns the inserted model name.
Runs a script in play mode and automatically stops play after the script finishes or times out. Returns structured output including logs, errors, and duration.
Starts or stops play mode or runs the server.