roblox-DEX-AI-MCP
Provides tools for interacting with Roblox game clients via an executor bridge, enabling AI to inspect and modify instances, execute Luau code, read/write properties, and interact with the DEX explorer UI.
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.
π€ This entire project was built by AI
From the first line of code to this README, everything was written by
deepseek-v4.1-flash.That includes: three DEX bridge strategies, four new server routes, three MCP tools, three complete dex.lua builds, bilingual docs, the banner and the demo graphics.
The human did exactly two things: state the requirements, and supply a GitHub token.
Contents
Related MCP server: Roblox MCP Server
Why DEX is the center
Most Roblox MCP projects work like this: the AI operates the game directly. To find "that red thing" the AI has to guess paths and try again.
This project flips it: DEX becomes the AI's eyes and hands.
Traditional MCP | This project (DEX-first) |
The AI guesses object paths | You click in DEX; the AI knows |
Property changes are invisible | Your DEX UI jumps to and highlights the object |
Debugging is guesswork | Visual browsing + AI batch operations |
AI and debugger are separate | They are two ends of one channel |
DEX is already a mature debugger (12,684 lines, by Moon, unobfuscated). We don't rewrite it β we just wire up a two-way channel.
Quick start
1. Use the pre-built DEX (zero config) β
-- In your Roblox executor
loadstring(game:HttpGet("https://raw.githubusercontent.com/986mn/roblox-DEX-AI-MCP/main/dex/builds/dex_AC.lua"))()If an [β MCP] button appears in the bottom-right corner, it worked.
2. Build the server (optional β only needed for automatic push)
git clone https://github.com/986mn/roblox-DEX-AI-MCP.git
cd roblox-DEX-AI-MCP
npm install --ignore-scripts --no-package-lock
npm run build
node dist/index.js < /dev/zero
--ignore-scriptsis required (thepreparehook triggers a build).< /dev/zerois required (MCP speaks stdio; closing stdin kills the server).
Healthy start:
MCP Server started and connected via stdio.
[Router] Loaded 34 HTTP route(s), 1 WS route(s) + WS fallback.
[Primary] MCP Bridge listening on port 16384 (WebSocket + HTTP)3. Point DEX at the server
Set this before loading DEX:
getgenv().BridgeURL = "localhost:16384" -- local
-- getgenv().BridgeURL = "192.168.1.100:16384" -- LAN
-- getgenv().BridgeURL = "https://xxx-16384.app.github.dev" -- Codespaces
loadstring(game:HttpGet("https://raw.githubusercontent.com/986mn/roblox-DEX-AI-MCP/main/dex/builds/dex_AC.lua"))()4. Configure your AI client
One command does it:
npm run install:mcpIt detects which clients you have (Claude Desktop, Cursor, Windsurf, Antigravity,
Claude Code, Codex CLI, VS Code), shows a numbered list, and writes the entry into
each config file. It merges β everything already in those files is preserved,
and a .bak is kept on first write.
Non-interactive variants:
npm run install:mcp -- --all # every detected client
npm run install:mcp -- --client cursor,codex # specific ones
npm run install:mcp -- --print # show the JSON, write nothing
npm run install:mcp -- --remove # undoOr add it by hand:
{
"mcpServers": {
"roblox-dex-ai-mcp": {
"command": "node",
"args": ["/path/to/roblox-DEX-AI-MCP/dist/index.js"]
}
}
}Client | Config location |
Claude Desktop |
|
Cursor |
|
Windsurf |
|
Antigravity |
|
Claude Code |
|
Codex CLI |
|
VS Code |
|
Restart the client afterwards. Per-client notes are printed by the installer.
GitHub Codespaces
Don't want to install anything locally? Run the whole thing in a cloud container and connect Roblox to it over HTTPS.
Or: Code β Codespaces β Create codespace on main
What happens automatically
When | What |
Container created ( | Patch connector.luau for HTTPS β install deps β compile TS β verify the DEX layer |
Every start ( | Kill stale instances β start the bridge β wait until ready β set port public β start keepalive |
Takes 1-3 minutes. Then the terminal prints your URL:
δ»ͺ葨η : https://xxxxx-16384.app.github.dev/
ε θ½½ε¨ : https://xxxxx-16384.app.github.dev/script.luauConnect Roblox
In your executor:
getgenv().BridgeURL = "https://xxxxx-16384.app.github.dev"
loadstring(game:HttpGet("https://raw.githubusercontent.com/986mn/roblox-DEX-AI-MCP/main/builds/dex_AC.lua"))()Then check https://xxxxx-16384.app.github.dev/api/status β clientCount going from 0 to 1 means it's connected.
Two things that must be right
1. https:// prefix is mandatory. Codespaces only serves HTTPS, but the upstream connector hardcoded http://. .devcontainer/patch-connector.mjs patches this automatically, but it derives the scheme from what you put in BridgeURL β so include the prefix.
2. The port must be public. Roblox clients carry no GitHub session. Private port β they get a login page instead of your server. devcontainer.json already sets "visibility": "public", and start.sh tries to enforce it via gh.
Woke up after 30 minutes and the service is gone?
Codespaces stops when idle, and postStart doesn't reliably re-run on wake (known GitHub behaviour). Run:
bash .devcontainer/ensure-running.shIt checks whether the service is alive and starts it if not. Status only:
bash .devcontainer/ensure-running.sh --statusThe 12-hour cap
Free Codespaces have a hard 12-hour lifetime that cannot be bypassed. keepalive.sh only prevents idle sleep, not this.
Full guide: docs/codespaces.md
DEX integration (the core)
Full docs: dex/README.md.
Two forms
Form | Folder | Description |
Pre-built β |
| Complete dex.lua, ready to run |
Patches |
| Append to your own dex.lua, or load standalone |
Pre-built
File | Size | Contents |
| 510 KB | DEX + read/write API + button UI β recommended |
| 494 KB | DEX + read/write API |
| 493 KB | DEX + button UI |
Patches
File | Usage |
| Append after |
| Standalone β no need to touch dex.lua |
| Append after |
Patch B (most flexible β works with any DEX source, including translated builds):
getgenv().DEX_URL = "https://raw.githubusercontent.com/986mn/wg/main/dex.lua"
loadstring(game:HttpGet("https://raw.githubusercontent.com/986mn/roblox-DEX-AI-MCP/main/dex/patches/dex_mcp_B.lua"))()DEX API cheat sheet
local D = getgenv().DEX
D.Snapshot() -- current selection
D.Select({"game.Workspace.NPC"}) -- select (UI jumps to it)
D.Tree("game.Workspace", 3, 200) -- instance tree
D.Props("game.Workspace.NPC") -- properties + Attributes + tags
D.Source("game.ReplicatedStorage.X") -- decompiled source
D.SetProp(path, "Health", "0") -- set a property
D.Run("return 1+1") -- execute code
D.App("Explorer", true) -- open/close a panelThe two-way workflow
β You click workspace.Map.NPC inside DEX
β click the [β MCP] button (or Ctrl+Shift+M)
β‘ The AI calls dex-events
β receives ["game.Workspace.Map.NPC"]
β’ The AI calls get-instance-properties
β learns it's a Model with a Humanoid, Health=100
β£ The AI calls dex-select
β your DEX UI jumps to that object and expands its properties
β€ The AI calls execute
β sets Health to 0Step by step
Step | What happens |
1 Select in DEX |
|
2 AI reads the path |
|
3 AI inspects properties |
|
4 AI drives DEX selection |
|
5 AI executes code |
|
The reverse direction is just as smooth:
-- AI: "selecting every NPC for you"
getgenv().DEX.Select({
"game.Workspace.Map.NPC",
"game.Workspace.Map.NPC2",
}, true)
-- your DEX UI highlights both instantlyMCP tools
DEX-specific (3, new in this project)
Tool | Purpose |
| Read what you selected in DEX (supports |
| Make the AI select objects in DEX (multi-select, |
| Read live DEX state (selection, panels, queue) |
Base tools (26)
Category | Tools |
Clients |
|
Execution |
|
Inspection |
|
Search |
|
Remote |
|
GUI |
|
Windows |
|
29 tools in total.
HTTP routes
DEX routes (new)
Route | Purpose |
| Receive a push from DEX β 204 |
| Latest event plus stats |
| Incremental read |
| Clear the buffer |
Push body:
{
"type": "selection",
"reason": "button",
"time": "12:00:00",
"paths": ["game.Workspace.Map.NPC"]
}Original routes
GET / dashboard
GET /script.luau loader
GET /api/status status
GET /api/tools tool catalog
POST /api/tool run a tool
GET /api/scripts script list
GET /api/client-logs client logs
GET /api/screenshot screenshot
POST /register client registration
GET /poll HTTP polling
POST /respond respond
GET /script-sources script sources
WS /mcp-relay primary/secondary relayProject structure
DEX sits at the root, not in a subfolder β it's the main thing here.
roblox-DEX-AI-MCP/
βββ dex.lua β the DEX source (12,684 lines, unmodified)
βββ dex_mcp_A.lua patch A β read/write API
βββ dex_mcp_B.lua patch B β runtime wrapper
βββ dex_mcp_C.lua patch C β button UI
βββ DEX_README.md DEX docs (English)
βββ DEX_README.zh-CN.md DEX docs (δΈζ)
βββ builds/ β pre-built, ready to run
β βββ dex_AC.lua DEX + API + button (510 KB) β recommended
β βββ dex_A.lua DEX + API (494 KB)
β βββ dex_B.lua DEX + API, self-contained (490 KB)
β βββ dex_C.lua DEX + button (493 KB)
βββ dex-mcp/ standalone bundle (docs + copies + own graphics)
β βββ README.md / README.zh-CN.md
β βββ builds/ same four bundles
β βββ assets/ banner + demo.gif
β βββ dex_mcp_*.lua the three patches
βββ src/ MCP server (serves DEX)
β βββ http/
β β βββ dex-store.ts DEX event store
β β βββ routes/dex/
β β βββ event.ts POST/GET /dex/event
β β βββ events.ts GET/DELETE /dex/events
β βββ tools/impl/dex/
β β βββ dex-events.ts
β β βββ dex-select.ts
β β βββ dex-snapshot.ts
β βββ bridge/ primary/secondary relay
β βββ http/ router + dashboard
β βββ semantic/ vector search
βββ assets/ banner, demo.gif, step screenshots
β βββ dex-mcp/ dex-mcp-specific graphics
βββ connector.luau client Luau (protocol-patched)
βββ .devcontainer/ Codespaces auto-deploy
βββ keepalive.sh idle guard + self-healing
βββ scripts/ build helpersHow much of this is AI?
Everything written by deepseek-v4.1-flash
Output | Count | Details |
DEX bridge patches | 3 files | A (read/write API), B (wrapper), C (button UI) |
Pre-built DEX | 3 files | 12,684-line original DEX merged, 1.5 MB total |
New server code | 6 files | event store + 2 routes + 3 MCP tools |
Documentation | 6 docs | bilingual READMEs, dex folder docs |
Graphics | banner + GIF | SVG + animated demo |
Where the human contributed
Item | Details |
Stated the requirements | "add MCP support to DEX" |
Supplied a token | GitHub PAT, for pushing |
Supplied the DEX source | dex.lua from the |
Note: the server foundation (
src/,connector.luau) is not AI-written β it comes from Shayeem. See Credits.
Beyond that, all design, coding, debugging, testing, documentation and graphics were done by the AI.
Key engineering decisions (made autonomously by the AI)
Decision | Why |
Append after | Reading the source showed DEX discards its return value β nothing was ever exposed on |
Reuse | Line 1598 already has a working path generator; no need to reinvent it |
Hook | The context menu calls |
Fix the | Testing revealed it clobbered DEX's global |
Protocol auto-detect patch | The connector hardcoded |
Push via the Git Data API |
|
Testing method
Not just reading code β actually executing it:
Built a mock Roblox environment with Python
lupaExtracted the patch code from the complete builds and ran it
11 tests for A, 8 tests for C, plus an A+C coexistence test
Nothing was delivered until all of them passed
Verification record
Check | Result |
| β 0 errors |
| β success |
Route loading | β 34 routes |
| β returns 204 |
| β incremental filter works |
| β
|
MCP | β 29 tools |
| β |
| β |
| β |
A functional tests | β 11/11 |
C functional tests | β 8/8 |
A+C coexistence | β pass |
Patch byte integrity | β SHA256 match |
| β exactly once per file |
Known limitations
Limitation | Details |
Roblox executor only | DEX uses Luau-only syntax ( |
nil-instance paths can't round-trip | DEX emits a |
Decompilation depends on the executor | Requires |
Windows tools don't work on Linux |
|
Codespaces 12-hour cap | Cannot be bypassed |
Semantic search needs Ollama |
|
Security
Port 16384 has no authentication whatsoever.
This server permits arbitrary code execution
Only connect AI clients you trust
Never expose it to the public internet
For cross-machine use, tunnel through a VPN or SSH:
ssh -L 16384:localhost:16384 user@target-machineSetting a Codespaces port to public means anyone with the URL can run code in your Roblox session.
Stop the Codespace when you're done.
Credits
Original author
This repository is a fork of Shayeem/Roblox-MCP.
Every line of
src/andconnector.luauβ the bridge, the tool catalog, the dashboard, the in-game connector β is his work. 14 stars, 105 files, the canonical copy. All this project does is add a DEX layer on top.
The three pillars
Project | Author | Role |
Shayeem | MCP server foundation β forked directly, | |
Moon | DEX itself β 12,684 lines, unobfuscated, the core of this project | |
notpoiu | Remote Spy backend |
Lineage
Shayeem/Roblox-MCP <-- THIS REPO FORKS FROM HERE
Muhammad-Tanvirul-Islam-Shayeem 14 stars, 105 files, 1st Upload 2026-07-17
|
v
986mn/roblox-DEX-AI-MCP DEX layer added on top
^
| (Potato5466794/Roblox-MCP is an unrelated 1-star fork;
| notpoiu/roblox-executor-mcp is the deleted original concept)Also
Project | Role |
SaveInstance |
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
AI Agent Utility Layer for agent safety, web monitoring, crypto research and tool discovery.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceEnables AI assistants to interact with running Roblox game instances by inspecting the game hierarchy, reading client-side scripts, and executing Lua code directly within the Roblox client through a WebSocket bridge.430 npm-
- FlicenseBqualityNot gradedmaintenanceBridges AI assistants with Roblox game environments in real-time via a Lua client and WebSocket connection. Enables AI tools like Claude to navigate instances, execute scripts, monitor remote events, and interact with the Roblox API through natural language.13-
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to interact with a running Roblox game client to execute Lua code, inspect scripts, spy on remotes, and more.131 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.131 npmMIT




