roblox-studio-mcp
Original:🇺🇸 English
Translated
Official Roblox Studio MCP server tools reference. What each tool does, how to use it, reliability patterns, and workflows for script editing, building, playtesting, and debugging. Use when the AI has an MCP connection to Roblox Studio.
7installs
Added on
NPX Install
npx skill4agent add tabooharmony/roblox-brain roblox-studio-mcpTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Roblox Studio MCP
The official Roblox Studio MCP server is built into Studio. It provides direct access to the data model, script editing, code execution, asset generation, and playtesting. This skill documents every tool and the patterns for using them reliably.
Available Tools
Scripts
| Tool | What it does |
|---|---|
| Read scripts by dot-notation path (e.g. |
| Apply multiple edits to a script. Creates the script if the path doesn't exist. |
| Fuzzy search for scripts by name. Returns up to 10 results. |
| Search for a string pattern across all scripts. Returns up to 50 matches. |
Asset & Content Generation
| Tool | What it does |
|---|---|
| Generate a textured 3D mesh from a description. |
| Generate a custom material or texture. |
| Generate procedural models that scale and adapt automatically. |
| Insert assets, plugins, and models from the Creator Store. |
Data Model Exploration
| Tool | What it does |
|---|---|
| Investigate the place in parallel, returns a compact summary. |
| Explore instance hierarchy as flat JSON. Filter by path, type, keywords. |
| Detailed info about a specific instance: properties, attributes, children summary. |
Luau Execution
| Tool | What it does |
|---|---|
| Run Luau code in Studio. Returns result or error. |
Playtesting
| Tool | What it does |
|---|---|
| Start or stop playtesting. |
| Retrieve output logs while the game is running. |
| Capture the current Studio viewport in Play mode. |
| Spawn a test character that runs through gameplay scenarios. |
Player Input Simulation
| Tool | What it does |
|---|---|
| Move the player character to a position or instance. |
| Simulate key presses, holds, and text input. |
| Simulate mouse clicks, movement, and scrolling. |
Session Management
| Tool | What it does |
|---|---|
| List all connected Studio instances (name, ID, active status). |
| Set which Studio instance receives subsequent tool calls. |
MCP Reliability Patterns
Statelessness
execute_luauluau
-- ALWAYS re-acquire references at the start of every execute_luau call
local model = workspace:FindFirstChild("MyModel")
if not model then
model = Instance.new("Model")
model.Name = "MyModel"
model.Parent = workspace
endSilent Failures
execute_luauluau
-- Create then verify
local part = Instance.new("Part")
part.Name = "Floor"
part.Parent = workspace.MapRoot
-- Verify it exists
local check = workspace.MapRoot:FindFirstChild("Floor")
print(check and "OK" or "FAILED: Floor not created")Script Truncation
When writing scripts via or with , long scripts may silently truncate. For scripts over ~300 lines:
multi_editexecute_luauscript.Source = ...- Split into logical chunks
- Write each chunk separately using string concatenation
- After writing, read back the last 10-20 lines to verify no truncation
luau
-- Chunked write pattern
local s = game.ServerScriptService.MyScript
local part1 = [=[
-- chunk 1: services and config
local Players = game:GetService("Players")
...
]=]
local part2 = [=[
-- chunk 2: main logic
...
]=]
s.Source = part1 .. part2Batching
- Part creation: 10-20 parts per call (safe), 25-50 with loops (risky)
- Script writes: one script per call for reliability
- Property changes: batch related changes in one call
- Verification: always verify after creation batches
Ground Truth Rule
Never guess coordinates, sizes, or property values from chat history. If you need current state, READ it:
luau
local part = workspace.MapRoot:FindFirstChild("Tower")
if part then
print("Position:", part.Position)
print("Size:", part.Size)
print("CFrame:", part.CFrame)
endWorkflows
Script Development
- Explore — Use to understand existing structure
search_game_tree - Read — Use to understand existing code before modifying
script_read - Write — Use to create or modify scripts
multi_edit - Verify — Use to confirm the write succeeded
script_read - Test — Use +
start_stop_playto testconsole_output
Building Geometry
- Plan — Use to see what exists
search_game_tree - Build — Use to create parts (see roblox-building skill)
execute_luau - Verify — Use to count parts and check properties
execute_luau - Visual check — Use in play mode to see the result
screen_capture
Debugging
- Reproduce — to enter play mode
start_stop_play - Observe — to read errors/warnings
console_output - Inspect — or
inspect_instanceto check runtime stateexecute_luau - Fix — to patch the script
multi_edit - Retest — again
start_stop_play
Playtesting
- Start play mode with
start_stop_play - Navigate with
character_navigation - Interact with /
keyboard_inputmouse_input - Observe with and
console_outputscreen_capture - Stop with
start_stop_play
MCP Mode Detection
Different MCP servers provide different tool sets. Detect what's available:
- Official Roblox MCP (built into Studio): ,
execute_luau,multi_edit,script_read,search_game_tree,start_stop_play, etc.generate_mesh - Community MCP (Chrrxs/robloxstudio-mcp): ,
execute_luau,get_file_tree,grep_scripts, plus per-peer execution.create_build - No MCP: Pure code generation only. Provide copy-paste-ready scripts.
Adapt your approach based on what tools are actually available. If a tool call fails with "not found", fall back gracefully.
Setup Reference
Windows
json
{
"mcpServers": {
"Roblox_Studio": {
"command": "cmd.exe",
"args": ["/c", "%LOCALAPPDATA%\\Roblox\\mcp.bat"]
}
}
}macOS
json
{
"mcpServers": {
"Roblox_Studio": {
"command": "/Applications/RobloxStudio.app/Contents/MacOS/StudioMCP"
}
}
}Enable in Studio
- Open Assistant
- Click ... > Manage MCP Servers
- Turn on "Enable Studio as MCP server"
Quick connect supports: Codex CLI, Claude Code, Claude Desktop, Cursor, Gemini CLI, VS Code.