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.
README
🎮 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)
| Tool | Description |
|---|---|
getScript |
Get full source code |
setScript |
Replace entire source (with syntax check + auto backup) |
editScript |
Edit specific line range (partial edit!) |
insertCode |
Insert code after a specific line |
removeLines |
Remove specific lines |
replaceInScript |
Find & replace text (plain text, safe) |
getLines |
Get only specific line range (lightweight) |
getFunctionList |
List all functions with line numbers |
getScriptSummary |
Overview: functions, requires, globals |
listScripts |
List all scripts in the game |
getAllScripts |
Get all script sources at once |
searchInScripts |
Search keyword across all scripts |
getReferences |
Find all usages of a variable/function |
getModuleDependencies |
List require() dependencies |
Safety Mechanisms
| Feature | Description |
|---|---|
| 🔒 Syntax Check | Auto-validates before writing. Rejects bad code. |
| 💾 Auto Backup | Saves previous version before every edit (10 generations) |
| 🛑 Play Mode Guard | Blocks writes during Play mode (prevents silent rollbacks) |
| 📝 UpdateSourceAsync | Uses ScriptEditorService for conflict-free writes |
Backup & Restore
| Tool | Description |
|---|---|
restoreBackup |
Restore from auto-saved backup |
listBackups |
List available backups |
Validation
| Tool | Description |
|---|---|
checkSyntax |
Check syntax without writing |
verifyScript |
Verify line count / source length |
validateAllScripts |
Batch syntax check all scripts |
Instance Operations
| Tool | Description |
|---|---|
getTree |
Get instance hierarchy |
getChildren |
List children (lightweight) |
getProperty / setProperty |
Get/set properties |
createInstance |
Create new instance |
deleteInstance |
Delete instance |
cloneInstance |
Clone instance |
renameInstance |
Rename instance |
moveInstance |
Move to different parent |
findInstances |
Search instances by name/class |
Other
| Tool | Description |
|---|---|
runCode |
Execute Luau code (with output capture) |
batch |
Execute multiple commands at once |
getAttribute / setAttribute |
Attribute operations |
getErrors / clearErrors |
Error log management |
undo / redo |
Undo/redo operations |
getSelection |
Get current selection |
getStudioInfo |
Get 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 Case | Which MCP |
|---|---|
| Script read/write | Ultimate (getScript/setScript) |
| Play testing | Official (start_stop_play) |
| Console output | Official (get_console_output) |
| Instance manipulation | Ultimate |
| Property changes | Ultimate |
📝 Real-World Impact
Before this MCP, a simple one-line fix in a 260-line script required:
run_codeto get the sourcegsubpattern matching (often fails)run_codeto write back- Pray it worked
- 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。