MCP Hub
Back to servers

Roblox Studio Ultimate MCP Server

A comprehensive MCP server providing 41 tools for complete Roblox Studio control, enabling safe script editing with syntax checking, instance manipulation, and backup features directly from Claude Code or any MCP-compatible AI assistant.

glama
Stars
1
Updated
Apr 19, 2026

🎮 Roblox Studio Ultimate MCP Server

English | 日本語

The most comprehensive MCP (Model Context Protocol) server for Roblox Studio. 41 tools for complete Studio control from Claude Code or any MCP-compatible AI assistant.

✨ Why This Exists

The default Roblox Studio MCP only provides run_code — forcing you to manipulate script sources via string operations (gsub). This leads to:

  • ❌ Pattern matching failures
  • ❌ Broken end) statements
  • ❌ Silent rollbacks when scripts revert
  • ❌ No syntax checking before writes
  • ❌ Hours wasted on simple edits

This MCP solves all of that.

🚀 Features

Script Operations (The Game Changer)

ToolDescription
getScriptGet full source code
setScriptReplace entire source (with syntax check + auto backup)
editScriptEdit specific line range (partial edit!)
insertCodeInsert code after a specific line
removeLinesRemove specific lines
replaceInScriptFind & replace text (plain text, safe)
getLinesGet only specific line range (lightweight)
getFunctionListList all functions with line numbers
getScriptSummaryOverview: functions, requires, globals
listScriptsList all scripts in the game
getAllScriptsGet all script sources at once
searchInScriptsSearch keyword across all scripts
getReferencesFind all usages of a variable/function
getModuleDependenciesList require() dependencies

Safety Mechanisms

FeatureDescription
🔒 Syntax CheckAuto-validates before writing. Rejects bad code.
💾 Auto BackupSaves previous version before every edit (10 generations)
🛑 Play Mode GuardBlocks writes during Play mode (prevents silent rollbacks)
📝 UpdateSourceAsyncUses ScriptEditorService for conflict-free writes

Backup & Restore

ToolDescription
restoreBackupRestore from auto-saved backup
listBackupsList available backups

Validation

ToolDescription
checkSyntaxCheck syntax without writing
verifyScriptVerify line count / source length
validateAllScriptsBatch syntax check all scripts

Instance Operations

ToolDescription
getTreeGet instance hierarchy
getChildrenList children (lightweight)
getProperty / setPropertyGet/set properties
createInstanceCreate new instance
deleteInstanceDelete instance
cloneInstanceClone instance
renameInstanceRename instance
moveInstanceMove to different parent
findInstancesSearch instances by name/class

Other

ToolDescription
runCodeExecute Luau code (with output capture)
batchExecute multiple commands at once
getAttribute / setAttributeAttribute operations
getErrors / clearErrorsError log management
undo / redoUndo/redo operations
getSelectionGet current selection
getStudioInfoGet Studio info

📦 Installation

1. Clone & Build

git clone https://github.com/YOUR_USERNAME/roblox-studio-ultimate-mcp.git
cd roblox-studio-ultimate-mcp
npm install
npm run build

2. Install Studio Plugin

Copy the plugin file to your Roblox Plugins folder:

Mac:

cp plugin/UltimateMCP.rbxmx ~/Documents/Roblox/Plugins/

Windows:

copy plugin\UltimateMCP.rbxmx %LOCALAPPDATA%\Roblox\Plugins\

Or generate it from source:

bash generate-plugin.sh

3. Enable HTTP in Studio

Open Roblox Studio, then in the Command Bar (View → Command Bar):

game:GetService("HttpService").HttpEnabled = true

4. Register with Claude Code

Add to your ~/.claude.json under the appropriate project:

{
  "mcpServers": {
    "roblox_ultimate": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/roblox-studio-ultimate-mcp/dist/index.js"],
      "env": {}
    }
  }
}

5. Restart

  • Restart Roblox Studio (to load the plugin)
  • Restart Claude Code (to connect to the MCP)

🏗️ Architecture

Claude Code ←(stdio)→ MCP Server (Node.js) ←(HTTP)→ Studio Plugin (Luau)
                         Port 3002
  • MCP Server (src/index.ts): Translates MCP tool calls to HTTP commands
  • Studio Plugin (plugin/RobloxMCP.lua): Polls the server, executes commands inside Studio
  • Communication: HTTP polling (300ms interval)

🔧 Usage with Other MCP Servers

This server is designed to work alongside the official Roblox Studio MCP:

Use CaseWhich MCP
Script read/writeUltimate (getScript/setScript)
Play testingOfficial (start_stop_play)
Console outputOfficial (get_console_output)
Instance manipulationUltimate
Property changesUltimate

📝 Real-World Impact

Before this MCP, a simple one-line fix in a 260-line script required:

  1. run_code to get the source
  2. gsub pattern matching (often fails)
  3. run_code to write back
  4. Pray it worked
  5. Repeat 3-5 times

Now: editScript(path, 103, 103, "new code") → Done. First try.

🤝 Contributing

PRs welcome! Especially for:

  • New tools
  • Better error handling
  • Performance improvements
  • Documentation

📄 License

MIT

Reviews

No reviews yet

Sign in to write a review