Roblox Executor MCP Server
Provides tools for interacting with a running Roblox client, including executing Luau code, reading and decompiling scripts, semantic script search, capturing Remotes/Bindables, manipulating GUIs, taking screenshots, and rejoining games automatically or manually.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Roblox Executor MCP Server + LuaSkill
MCP Server cho phép AI Agent (Antigravity, Claude Code, Cursor, Codex CLI, Windsurf, ...) tương tác trực tiếp với Roblox client đang chạy: thực thi Luau, đọc & decompile script, tìm kiếm ngữ nghĩa, bắt Remote/Bindable, thao tác GUI, chụp màn hình cửa sổ Roblox và tự động rejoin khi bị kick/disconnect — đóng gói kèm sẵn 2 AI Skills (roblox-mcp và luaskill).
Repo gốc (upstream):
https://gitlab.com/upio/roblox-executor-mcp
Mục lục
Related MCP server: Roblox Executor MCP
Điểm nổi bật & bản nâng cấp trong repo này
Ngoài toàn bộ tính năng chuẩn của Roblox Executor MCP Server, bản này tích hợp thêm:
Tool
rejoin-game& Auto-Rejoin tích hợp sẵn trong Connector (src/tools/impl/clients/rejoin-game.ts,connector-src/utils/auto-rejoin.luau):Tự theo dõi
GuiService.ErrorMessageChangedvàRobloxPromptGui.ErrorPromptđể tự động rejoin khi bị kick hoặc mất kết nối (mặc định bật, tắt bằnggetgenv().MCP_AutoRejoin = false).Tự gọi
queue_on_teleportđể nạp lại connector MCP sau khi teleport xong.Hỗ trợ gọi chủ động qua MCP tool
rejoin-gamevới các chế độrejoin,enable,disable,status, chọn server mới hoặcsameServer, vàdelaySeconds.
Cải tiến Local Decompiler (Tovek / Fission) (
src/decompiler/run.ts,src/decompiler/health.ts,src/decompiler/settings.ts):Tovek dùng cổng mặc định
16385(http://localhost:16385/decompile) và truyền--portlinh hoạt, tránh xung đột cổng3000với Shiny.Ưu tiên gửi binary trực tiếp qua
/decompile/raw(application/octet-stream, tối đa 16 MiB, bỏ overhead base64) và tự fallback sang/decompilenếu gặp404.Lỗi từ chối riêng lẻ theo từng script (
HTTP 400/422,unsupported bytecode,cmpproto,newclass) chỉ fallback script đó sang provider kế tiếp, không làm cooldown toàn server Tovek/Fission trong 60 giây.
Đóng gói sẵn trọn bộ 2 AI Skills trong
skills/:skills/roblox-mcp/: Quy chuẩn chọn tool MCP tối ưu, tránh quét thừa và tuân thủ runtime pattern.skills/luaskill/: Bộ kiến thức kỹ thuật Lua / Luau / Roblox chuyên sâu (Module A–M, gồm Production Resilience Patterns và playbook xử lýBAC / Error Code 267có điều kiện tạiskills/luaskill/README.md).
Yêu cầu môi trường
Node.js:
22.23.4+,24.22.1+, hoặc26.12.1+(.nvmrcpin24.22.1).Rust & Cargo: Dùng để biên dịch native stdio adapter (
dist/roblox-mcp-adapter.exetrên Windows hoặcdist/roblox-mcp-adaptertrên macOS/Linux). Installer có tùy chọn tự cài Rust/Cargo nếu máy chưa có.Bun
≥ 1.3: Dùng cho CLI installer (OpenTUI) và một số script tiện ích.Roblox Executor: Hỗ trợ
loadstring,request, ưu tiên cóWebSocket, và cóqueue_on_teleportnếu muốn dùng Auto-Rejoin nạp lại connector.
Cài đặt nhanh từ A–Z
Bước 1: Clone repo
git clone https://github.com/DuckHieu/roblox-executor-mcp.git
cd roblox-executor-mcp
npm installBước 2: Build & cấu hình MCP cho AI Client
Cách A — Dùng trình cài đặt tự động (Khuyên dùng)
Mở giao diện cài đặt trên trình duyệt để tự build server, cấu hình AI Client, chép skill roblox-mcp và cài script vào thư mục autoexec của executor:
npm run install:harnessesHoặc dùng bản cài đặt trên terminal (CLI):
npm run install:harnesses:cliMột số cờ hữu ích:
Tự cài Rust/Cargo nếu thiếu:
npm run install:harnesses:cli -- --install-rustDùng chế độ text thuần (không TUI):
npm run install:harnesses:cli -- --plainHiện toàn bộ AI harness được hỗ trợ:
npm run install:harnesses:cli -- --show-all-harnessesXem trước giao diện web installer (không thay đổi file):
npm run install:harnesses:previewKhông tự mở trình duyệt / lắng nghe mạng LAN:
npm run install:harnesses -- --no-open --host 0.0.0.0
Cách B — Build & cấu hình thủ công
Build MCP Server + Rust stdio adapter:
npm run build(Server build sử dụng sẵn
connector.luauđã biên dịch nên không bắt buộc cài Darklua. Nếu sửaconnector-src/, càirokit installrồi chạynpm run build:connector.)Thêm cấu hình vào AI Client của bạn. Ví dụ cho Antigravity trên Windows tại
%USERPROFILE%\.gemini\config\mcp_config.json:{ "mcpServers": { "roblox-mcp": { "command": "C:\\path\\to\\roblox-executor-mcp\\dist\\roblox-mcp-adapter.exe", "args": [ "--server-name", "roblox-mcp" ] } } }Hướng dẫn chi tiết cho từng AI Client khác:
AI Client
Tài liệu cấu hình
Antigravity
Cursor
Claude Code
Claude Desktop
Codex CLI
Windsurf
BLACKBOX AI
ZCode
Bước 3: Cài đặt 2 Skills (roblox-mcp + luaskill)
Installer mặc định chỉ cài skills/roblox-mcp. Để dùng đầy đủ cả roblox-mcp lẫn luaskill, copy cả hai thư mục trong skills/ vào thư mục skills của AI Client bạn đang dùng:
Windows (Antigravity — PowerShell)
$dst = "$env:USERPROFILE\.gemini\config\skills"
New-Item -ItemType Directory -Path $dst -Force | Out-Null
Copy-Item -Path ".\skills\roblox-mcp", ".\skills\luaskill" -Destination $dst -Recurse -ForcemacOS / Linux (Antigravity — Bash)
mkdir -p ~/.gemini/antigravity/skills
cp -r ./skills/roblox-mcp ./skills/luaskill ~/.gemini/antigravity/skills/Claude Code / Codex / Cursor
Copy ./skills/roblox-mcp và ./skills/luaskill vào thư mục skills tương ứng của client (ví dụ ~/.claude/skills/, ~/.codex/skills/, hoặc .cursor/skills/ trong workspace) rồi reload lại client để nhận skill.
Bước 4: Kết nối từ Roblox Executor
Chạy đoạn loader sau trong Executor hoặc đặt vào thư mục Auto Execute (có thể cài tự động bằng npm run getscript -- --autoexec):
while not getgenv().MCP_Loaded do
local bridgeUrl = getgenv().BridgeURL or "localhost:16384"
pcall(function()
loadstring(game:HttpGet("http://" .. bridgeUrl .. "/script.luau"))()
end)
task.wait(0.15)
endTùy chọn cấu hình (khai báo trước đoạn loadstring ở trên):
getgenv().BridgeURL = "10.0.0.4:16384" -- Mặc định: localhost:16384
getgenv().DisableWebSocket = true -- Bắt buộc dùng HTTP polling thay vì WebSocket
getgenv().DisableInitialScriptDecompMapping = true -- Bỏ qua bước decompile hàng loạt lúc mới kết nối
getgenv().MCP_FailedScriptResyncInterval = 30 -- Chu kỳ (giây) thử sync lại các script lỗi
getgenv().MCP_FailedScriptResyncBatchSize = 8 -- Số script tối đa mỗi lượt retry
getgenv().MCP_AutoRejoin = false -- Tắt tự động rejoin khi bị kick/disconnect (mặc định: true)Bước 5: Mở Web Dashboard
Sau khi MCP server chạy và Roblox đã kết nối, mở trình duyệt tại:
http://localhost:16384/Dashboard cho phép:
Xem danh sách Roblox client đang kết nối và kiểm tra trạng thái bridge.
Duyệt & đọc script, chạy thử MCP tools trực tiếp và xem log server.
Cấu hình Local/Hosted Decompiler (Tovek cổng
16385, Fission cổng8080, Shiny cổng3000).Cấu hình Semantic Search (tích hợp Ollama
embeddinggemma) để tìm script theo chức năng.
Danh sách đầy đủ 18 MCP Tools
Toàn bộ tool được đăng ký tại src/tools/index.ts:
1. Quản lý Client & Rejoin
Tool | Chức năng |
| Liệt kê tất cả Roblox client đang kết nối kèm |
| Chọn client mặc định cho phiên MCP hiện tại. |
| Rejoin game thủ công ( |
2. Thực thi mã Luau
Tool | Chức năng |
| Chạy đoạn mã Luau trên client (dùng cho thao tác tạo hiệu ứng / thay đổi trạng thái). |
| Chạy trực tiếp một file |
3. Đọc dữ liệu, Decompile & Tìm kiếm
Tool | Chức năng |
| Lấy thông tin PlaceId, JobId, tên game, người chơi hiện tại. |
| Xem cây phân cấp Instance (hỗ trợ |
| Tìm Instance bằng selector kiểu CSS ( |
| Đọc / decompile mã nguồn của |
| Tìm chuỗi / regex trên toàn bộ mã nguồn script đã đồng bộ. |
| Tìm script theo ý nghĩa / hành vi bằng embedding index. |
| Chạy đoạn Luau nhỏ và trả về dữ liệu thô (table, string, number, boolean). |
| Đọc log |
4. Remote Spy (Cobalt)
Tool | Chức năng |
| Theo dõi, liệt kê, xem tham số, chặn (block) hoặc bỏ qua (ignore) các |
5. Tương tác GUI
Tool | Chức năng |
| Nhấn vào |
| Nhập văn bản vào |
6. Cửa sổ hệ điều hành (OS Windows)
Tool | Chức năng |
| Liệt kê các cửa sổ Roblox đang mở kèm |
| Chụp ảnh màn hình cửa sổ Roblox theo |
Cách dùng Multi-Client & rejoin-game
Chọn mục tiêu khi mở nhiều acc Roblox cùng lúc
Gọi
list-clientsđể lấy danh sáchclientId.Gọi
set-active-clientđể cố định client mặc định cho phiên hiện tại, hoặc truyền trực tiếpclientIdvào từng lệnh:
{
"name": "get-game-info",
"arguments": {
"clientId": "<client ID>"
}
}Các lệnh nhắm vào những
clientIdkhác nhau chạy song song độc lập.Nếu
clientIdkhông tồn tại hoặc đã ngắt kết nối, server báo lỗi thay vì tự nhảy sang client khác.Các tool cửa sổ OS (
list-roblox-windows,screenshot-window) nhậnpidthay vìclientId.Giới hạn request MCP HTTP: tối đa
1 MiBvà10,000phần tử mảng/key object.
Ví dụ gọi rejoin-game
Rejoin sang server mới sau 0.5 giây:
{
"name": "rejoin-game",
"arguments": {
"action": "rejoin",
"sameServer": false,
"delaySeconds": 0.5
}
}Kiểm tra hoặc tắt/bật Auto-Rejoin khi bị kick:
{ "name": "rejoin-game", "arguments": { "action": "status" } }
{ "name": "rejoin-game", "arguments": { "action": "disable" } }
{ "name": "rejoin-game", "arguments": { "action": "enable" } }Tổng quan bộ Skills đi kèm
1. skills/roblox-mcp
Hướng dẫn AI sử dụng MCP tiết kiệm context và chính xác:
Ưu tiên tool chuyên biệt (
search-instances,script-grep,get-script-content) trước khi chạy Luau tùy ý.Dùng
QueryDescendantsvàfiltergcthay vì quét toàn bộGetDescendants()/getgc().Dùng
get-data-by-codekhi cần lấy giá trị; chỉ dùngexecute/execute-filekhi cần thực hiện hành động tạo tác dụng phụ.Tài liệu tham chiếu đi kèm:
2. skills/luaskill
Bộ kỹ năng kỹ thuật Lua / Luau / Roblox toàn diện (skills/luaskill/SKILL.md), chia thành 13 module:
Module A–C: Lua/Luau VM internals, Upvalues, Deep Metatable Engineering, Coroutine & Async patterns.
Module D–F: Roblox Advanced Patterns (ECS, DataStore, Networking), Obfuscation & Deobfuscation, Executor Internals.
Module G–I: Tham chiếu MCP Tools đầy đủ, Research Engine, Performance & Memory Profiling.
Module J–K: Pipeline Reverse Engineering & Production Boilerplates.
Module L &
skills/luaskill/README.md: Playbook xử lý chống kick BAC Anti-Cheat (Error Code 267) — chỉ kích hoạt có điều kiện khi game thực sự dùng BAC.Module M: Production Architecture & Resilience Patterns (Thread Identity context manager, Deadline-bounded
InvokeServer+ chống double-spend, Frame-budgeted coroutine scheduler & conflict relinquishment, Sentinel upvalue route discovery, Metatable expiring latch,runId/JobId+ Generation cancellation & supervisor, Neutral vs Hard backoff, 360° raycast sweep, multipart PNG webhook, log dedup, headless anti-tamper UI).
Các lệnh phát triển & kiểm thử
Lệnh | Mô tả |
| Biên dịch TypeScript server và Rust stdio adapter vào |
| Đóng gói |
| Chạy |
| Build toàn bộ + chạy test Node ( |
| Chạy server ở chế độ phát triển. |
| Khởi chạy bản đã build tại |
| In loader hoặc cài trực tiếp vào thư mục Auto Execute của executor. |
| Mở Web Installer để cấu hình AI Client. |
| Mở CLI Installer (OpenTUI). |
| Cập nhật server (cũng có nút Update now trong Dashboard → Settings). |
Cấu trúc thư mục
roblox-executor-mcp/
├── adapter/ # Mã nguồn Rust cho native stdio adapter (roblox-mcp-adapter)
├── connector-src/ # Mã nguồn Luau của connector phía Roblox
│ ├── init.luau # Entry point connector
│ ├── bridge/handlers/ # Xử lý các lệnh MCP phía client (bao gồm rejoin-game)
│ └── utils/auto-rejoin.luau # Module tự động rejoin + queue_on_teleport
├── connector.luau # Bản connector đã bundle sẵn bằng Darklua
├── src/ # Mã nguồn TypeScript MCP server, HTTP API, Dashboard & Decompiler
│ ├── decompiler/ # Tích hợp Tovek (16385), Fission (8080), Shiny (3000)
│ ├── http/ # Web Dashboard & Bridge HTTP/WebSocket (port 16384)
│ └── tools/impl/ # Toàn bộ 18 MCP tools
├── skills/
│ ├── roblox-mcp/ # Skill hướng dẫn dùng MCP tối ưu
│ └── luaskill/ # Skill Lua / Luau / Roblox nâng cao + BAC playbook
├── scripts/ # Build scripts, Web/CLI Harness Installer, Updater
├── docs/ # Hướng dẫn cấu hình từng AI Client & nâng cao (advanced.md)
└── tests/ # Unit & regression tests (Node + Luau)Xử lý sự cố thường gặp
AI Client không thấy tool MCP:
Đảm bảo đã chạy
npm install && npm run buildvà filedist/roblox-mcp-adapter.exe(hoặcdist/roblox-mcp-adapter) đã tồn tại.Kiểm tra lại đường dẫn tuyệt đối trong file cấu hình MCP của AI Client và bấm Reload/Refresh MCP Servers.
Lỗi build Rust adapter:
Máy chưa có Rust/Cargo → chạy
npm run install:harnesses:cli -- --install-rusthoặc cài tại https://rustup.rs/.
Executor không kết nối được WebSocket:
Thêm
getgenv().DisableWebSocket = truetrước đoạnloadstringđể chuyển sang HTTP polling ổn định.
Tovek local decompiler bị trùng cổng:
Bản này đã chuyển mặc định Tovek sang cổng
16385(http://localhost:16385/decompile) để không đụng Shiny (3000). Có thể chỉnh lại trong Dashboard → Settings → Decompiler.
Auto-rejoin teleport xong không tự nối lại MCP:
Kiểm tra executor có hỗ trợ
queue_on_teleporthay không, hoặc đặt loader cố định vào thư mục Auto Execute (npm run getscript -- --autoexec).
Bảo mật & Giấy phép
Cảnh báo bảo mật: Server này cho phép thực thi mã Luau tùy ý trên Roblox client đang kết nối. Cổng
16384không có xác thực — tuyệt đối không mở port này trực tiếp ra internet công cộng. Chỉ chạy trên máy cục bộ, mạng LAN tin cậy, Tailscale/VPN hoặc SSH tunnel. Xem thêm tại docs/advanced.md.
Giấy phép: MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote desktop control, files, and terminal tools for AI assistants on paired Windows PCs.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Let your AI see your screen, click, type and run commands on your own Windows, Mac or Linux PC.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables agents to interact with a running Roblox game client, execute Lua code, inspect scripts, spy on remotes, and more.42166 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to interact with a running Roblox game client to execute Lua code, inspect scripts, spy on remotes, and more.66 npm216MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with a running Roblox game client, including executing Lua code, inspecting scripts, and spying on remotes, with a local dashboard for monitoring and control.66 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with a running Roblox game client, including executing Lua code, inspecting scripts, searching instances, intercepting remote events via Sigma Spy, and controlling the GUI.1MIT