roblox-mcp-difz
Provides tools for controlling, reversing, and exploiting Roblox games, including instance tree exploration, property inspection, visual tracking, input simulation, environment manipulation, memory hooking, network traffic, and state bypass.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@roblox-mcp-difzlist all instances in the Roblox game"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
roblox-mcp-difz
A bridge between AI agents and Roblox. I built this MCP (Model Context Protocol) server so your AI can directly control Roblox, reverse engineer games, intercept networks, simulate inputs, and mess with the game state.
It works with any MCP-compatible AI client like Claude Code, Cursor, Windsurf, or whatever else you use.
I packed it with 150+ tools. It can traverse the DataModel, inspect properties, fire remotes, run raw Lua, hook functions, intercept network traffic, and simulate user input. Basically, if you can do it in an executor, the AI can do it now.
Table of Contents
Related MCP server: dex-mcp
Quick Start
# 1. Install
npm install -g roblox-mcp-difz
# 2. Configure AI platform (Claude Code, Cursor, etc.)
rblx-mcp setup
# 3. Start the server
rblx-mcp start
# 4. Inject into Roblox (paste into executor)
loadstring(game:HttpGet("http://127.0.0.1:28429/mcp.lua"))()Installation
Global install (recommended)
npm install -g roblox-mcp-difzThis installs two CLI aliases: rblx-mcp and roblox-mcp-difz.
Run without installing
npx roblox-mcp-difzInstall from source
git clone https://github.com/Difz25x/roblox-mcp-difz.git
cd roblox-mcp-difz
npm install
npm run build
npm startRequirements
Node.js >= 16.0.0
Windows (for Roblox process management; the MCP server itself can run on any platform)
A Roblox executor that supports UNC (Universal Compatibility) functions (e.g., Synapse, Script-Ware, Krnl, or any executor with WebSocket and loadstring support)
Executor Setup
1. Start the server
rblx-mcp startThe server prints a banner with the HTTP and WebSocket URLs.
2. Inject the client script
In your Roblox executor, run:
loadstring(game:HttpGet("http://127.0.0.1:28429/mcp.lua"))()You can also fetch /mcp.luau (same content) if your executor prefers that extension.
3. Verify connection
The server logs the registration with the game name, place ID, and job ID. Use the check_unc_capabilities tool to verify which UNC functions your executor supports.
getgenv() Configuration
Override defaults by setting these before loading mcp.lua:
getgenv().MCP_HOST = "127.0.0.1" -- default: 127.0.0.1
getgenv().MCP_PORT = 28429 -- default: 28429
getgenv().MCP_TRANSPORT = "auto" -- "auto" | "ws" | "http"
getgenv().MCP_WORKER_ID = "my-worker" -- unique ID for multi-instanceMCP Client Configuration
The server exposes the standard MCP protocol via HTTP POST at /mcp. Configure your AI client to use the URL http://localhost:28429/mcp.
Claude Code
Automatic:
rblx-mcp setup --ai claude-codeManual (JSON — ~/.mcp.json):
{
"mcpServers": {
"roblox-mcp-difz": {
"type": "http",
"url": "http://localhost:28429/mcp"
}
}
}Or use the CLI:
claude mcp add roblox-mcp-difz -s user --transport http http://localhost:28429/mcpClaude Desktop
Automatic:
rblx-mcp setup --ai claude-desktopManual (JSON — ~/AppData/Roaming/Claude/claude_desktop_config.json):
{
"mcpServers": {
"roblox-mcp-difz": {
"type": "http",
"url": "http://localhost:28429/mcp"
}
}
}Cursor
Automatic:
rblx-mcp setup --ai cursorManual (JSON — ~/.cursor/mcp.json):
{
"mcpServers": {
"roblox-mcp-difz": {
"type": "http",
"url": "http://localhost:28429/mcp"
}
}
}Windsurf
Automatic:
rblx-mcp setup --ai windsurfManual (JSON — ~/.windsurf/mcp_config.json):
{
"mcpServers": {
"roblox-mcp-difz": {
"type": "http",
"url": "http://localhost:28429/mcp"
}
}
}VS Code (Cline / Continue.dev)
Automatic:
rblx-mcp setup --ai vscodeManual (JSON — ~/.vscode/mcp.json):
{
"mcpServers": {
"roblox-mcp-difz": {
"type": "http",
"url": "http://localhost:28429/mcp"
}
}
}Commands
Command | Description |
| Show help |
| Start HTTP + WebSocket server (port 28429) |
| Interactive setup wizard — configures AI platforms |
| Quick setup for a specific AI |
| List supported AI platforms |
Endpoints
Endpoint | Transport | Purpose |
| HTTP | MCP JSON-RPC 2.0 |
| HTTP | MCP JSON-RPC 2.0 (alias) |
| HTTP | Executor client script |
| HTTP | Executor client script (alias) |
| HTTP | Server info JSON |
| HTTP | Health check |
| WebSocket | Executor communication |
UNC Compatibility (Executor Support)
The client script (mcp.lua) uses Universal Compatibility (UNC) functions to communicate with the Roblox executor and interact with the game. Not all executors support every function. The table below lists every UNC function required, which tools depend on it, and whether a fallback exists.
37 unique UNC functions are used across the tool set.
UNC Function | Category | Dependent Tools | Fallback |
| Instance Tree Traversal |
| Returns empty array |
| Remote E&F |
|
|
| Code Execution, Script Analysis, Closure Analysis, Function Hooking |
| None (core requirement) |
| Hidden Properties |
| Returns nil |
| Hidden Properties |
| No-op |
| Hidden Properties |
| No-op |
| GUI Manipulation |
| Returns CoreGui |
| GUI Manipulation, Instance Lifecycle |
|
|
| File System |
| Returns empty string |
| File System |
| No-op |
| File System |
| No-op |
| File System |
| No-op |
| File System |
| Returns false |
| File System |
| No-op |
| File System |
| Fails with error |
| Script & Module Analysis |
| Error reported |
| Script & Module Analysis |
| Error reported |
| Script & Module Analysis |
| Error reported |
| Script & Module Analysis, Closure Analysis |
| Error reported |
| Script & Module Analysis |
| Error reported |
| Script & Module Analysis |
| Error reported |
| Script & Module Analysis |
| Error reported |
| Script & Module Analysis |
| Error reported |
| Script & Module Analysis |
| Returns 0 |
| Script & Module Analysis, Closure Analysis |
| Returns false |
| Script & Module Analysis, Registry & GC |
| Error reported |
| Script & Module Analysis, Registry & GC |
| Error reported |
| Closure Analysis |
| Error reported |
| Closure Analysis |
| Error reported |
| Metatable Manipulation |
| Falls to |
| Metatable Manipulation |
| No-op |
| Metatable Manipulation |
| No-op |
| Metatable Manipulation |
| Returns false |
| Function Hooking, Script Analysis, Network Traffic |
| No-op |
| Function Hooking |
| Error reported |
| Function Hooking |
| Returns empty string |
| Instance Lifecycle |
| No-op |
| Instance Lifecycle |
| No-op |
| Instance Lifecycle |
| Lua |
| Internal | All tools (service references) | Identity function |
| Internal | Multi-instance targeting | nil |
Note:
loadstringis the only hard requirement — every other UNC function has a graceful fallback. Use thecheck_unc_capabilitiestool at runtime to see exactly what your executor supports.
Tools (106 tools in total)
This MCP server comes with over 100 tools. Below are some of the most commonly used tools. For the complete list and detailed descriptions, refer to src/tool-definitions.ts.
Tool | Description |
| Executes arbitrary Luau source code in the target Roblox process with full read/write access. |
| Get a list of all players along with their character models, HP, speed, and backpack contents. |
| Search for objects within the game. Can be filtered by name, object type (class), and maximum folder depth. |
| Resolve a string path like 'workspace.Model.Part' into an actual object reference. |
| Master tool for network traffic interception, blocking, and argument spoofing. Hooks FireServer/InvokeServer. |
| Scans specified paths for all RemoteEvents, RemoteFunctions, and UnreliableRemoteEvents. |
| Decompiles a Script, ModuleScript, or LocalScript using the decompile chain (LuaExpert/Medal/Konstant). |
| Dump the LocalPlayer in depth: Backpack, Leaderstats, Character state, Humanoid, and PlayerGui. |
| Bypass client-side anticheat. Prevents Kick(), disables suspiciously named scripts, and blocks teleport bans. |
| Capture a screenshot of a Roblox process window on Windows. Returns base64-encoded PNG data URL. |
Note: There are 96 other tools covering GUI manipulation, instance cloning/destroying, camera control, mouse/keyboard simulation, metatable manipulation, closure inspection, and more!
How It Actually Works
┌──────────────────────────────────────────────────────────────────┐
│ AI Client │
│ (Claude Code / Claude Desktop / Cursor / Windsurf / Cline / │
│ Continue.dev / any MCP-compatible client) │
└─────────────────────────┬────────────────────────────────────────┘
│ MCP JSON-RPC 2.0 (HTTP POST /mcp)
▼
┌──────────────────────────────────────────────────────────────────┐
│ Node.js MCP Server (:28429) │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────────────────┐ │
│ │ MCP Handler │ │ Queue Manager│ │ WebSocket Server (WS) │ │
│ │ (JSON-RPC) │──│ (Task Queue) │──│ /ws │ │
│ └─────────────┘ └──────────────┘ └───────────┬─────────────┘ │
│ │ │
│ ┌─────────────┐ ┌──────────────┐ │ │
│ │Tool Defs │ │Session Mgr │ │ │
│ │(106 tools) │ │(workers) │ │ │
│ └─────────────┘ └──────────────┘ │ │
│ │ │
│ ┌──────────────────────────────────────────────┐ │
│ │ Server-Side Tools (Process Manager) │ │
│ │ get_roblox_processes, launch_roblox, │ │
│ │ open_game, capture_roblox_screenshot, │ │
│ │ get_roblox_versions │ │
│ └──────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────┼────────────────┘
│ WebSocket
▼
┌──────────────────────────────────────────────────────────────────┐
│ Roblox Executor (mcp.lua) │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌─────────────────────────┐ │
│ │ WS Client │ │ Task Router │ │ Handler Registry │ │
│ │ (connect) │──│ (wsPoll) │──│ (106+ handlers) │ │
│ └─────────────┘ └──────────────┘ └─────────────────────────┘ │
│ │ │
│ ┌────────────────────────────────────────┘ │
│ │ UNC Compatibility Layer │
│ │ (getnilinstances, hookfunction, loadstring, getreg, │
│ │ getgc, getconnections, firesignal, readfile, writefile, │
│ │ gethiddenproperty, sethiddenproperty, getrawmetatable, ...) │
│ └───────────────────────────────────────────────────────────────┘
│ │
│ Roblox DataModel │
│ (Players, Workspace, Lighting, ReplicatedStorage, CoreGui, ...) │
└──────────────────────────────────────────────────────────────────┘Data Flow
AI Client sends MCP JSON-RPC (tool call) via HTTP POST to
/mcpMCP Handler validates the tool name and dispatches it
Server-side tools (process management, screenshots) execute directly in Node.js
Executor tools are queued in the Queue Manager and sent via WebSocket to all connected Roblox executors
mcp.lua receives the task, routes it to the correct handler, which interacts with the Roblox DataModel using UNC functions
Result flows back: executor -> WebSocket -> Queue Manager -> MCP Handler -> AI Client
Communication Protocol
Registration (executor -> server):
{
"type": "register",
"worker_id": "uuid-or-custom-id",
"username": "PlayerName",
"userId": 123456,
"placeId": 987654321,
"jobId": "abc-def-ghi",
"placeName": "Game Name",
"capabilities": { "total": 37, "supported": 35, "missing": ["someFunc"] }
}Task (server -> executor):
{
"type": "task",
"id": "task-uuid",
"tool": "execute_custom_luau",
"args": { "code": "print('hello')" },
"pid": 1234,
"workerId": "target-worker"
}Result (executor -> server):
{
"type": "result",
"id": "task-uuid",
"data": { "success": true, "result": "hello" },
"error": null,
"pid": 1234
}Multi-Instance Support
Each executor registers with a unique worker_id. Tools can target a specific Roblox instance by PID:
{
"name": "get_roblox_processes",
"arguments": {}
}
// Returns [{ pid: 1234, name: "RobloxPlayerBeta", windowTitle: "Game Name" }]
{
"name": "execute_custom_luau",
"arguments": {
"pid": 1234,
"code": "print('hello from instance 1234')"
}
}If no PID is specified, tasks are broadcast to ALL connected executors. To use multi-instance with custom IDs, set getgenv().MCP_WORKER_ID = "my-instance" before injecting mcp.lua.
UNC Compatibility Layer
The client script (mcp.lua) includes a full compatibility layer that adapts to the executor's available UNC functions. Every function has a fallback strategy:
UNC Function | Fallback Behavior |
| Falls back to HTTP polling transport |
| Returns empty array |
| No-op |
| No-op |
| Uses |
| Uses |
| Returns nil |
| No-op |
| No-op |
| No-op (tools that depend on it will report failure) |
| Falls to standard |
| No-op |
| No-op |
| Returns false |
| Returns CoreGui |
| Returns empty string |
| No-op |
| Returns false |
| No-op |
| Fails with error |
| Fails with error |
| Uses Lua |
Decompilation Chain
The script_decompiler tool automatically falls through three decompile services:
LuaExpert (api.lua.expert) — primary
Medal (medal.upio.dev) — fallback 1
Konstant (api.plusgiant5.com) — fallback 2
When Things Break (Troubleshooting)
Check UNC Capabilities
Always start by checking what your executor supports:
Tool: check_unc_capabilitiesThis returns a complete support matrix showing which of the 37 UNC functions your executor provides, making it immediately clear which tools will work and which will report errors.
"Attempt to call blacklisted function" Error
Some executors block certain UNC functions (especially hookfunction, getgc, getreg, loadstring with restricted environments).
Solutions:
Run
check_unc_capabilitiesto identify which functions are blockedTry a different
identity_level(use identity 8 for maximum access):Tool: luau_code_executor Arguments: { "code": "...", "identity_level": 8 }If your executor blocks
loadstring, most advanced tools (code execution, hooks, closure analysis) will not work. Look for an executor with better UNC supportSome executors require manual enabling of certain functions in their settings
"No Roblox executor is connected" Error
This occurs when the MCP server is running but no Roblox executor has connected via WebSocket.
Solutions:
Ensure the server is running:
rblx-mcp startVerify the server is listening:
curl http://localhost:28429/healthInject the client script in your executor:
loadstring(game:HttpGet("http://127.0.0.1:28429/mcp.lua"))()Check the server console for registration messages
Verify firewall rules aren't blocking WebSocket connections on port 28429
If your executor doesn't support WebSocket, set transport to HTTP:
getgenv().MCP_TRANSPORT = "http"
WebSocket Connection Issues
Executor won't connect:
Confirm the Roblox executor supports
WebSocket.connect(checkcheck_unc_capabilities)Try HTTP fallback transport:
getgenv().MCP_TRANSPORT = "http"If using a remote server (not localhost), replace
127.0.0.1with the server's IP:getgenv().MCP_HOST = "192.168.1.100"Some executors block WebSocket to certain hosts. Try port 80 or 443 if your server supports it
Connection drops:
The server sends a heartbeat every 30 seconds
If you see frequent disconnects, check for network instability or anti-cheat interference
Use the HTTP transport fallback for more stable connections
Tool Returns "not handled by this executor"
This means the requested tool has no handler registered in the mcp.lua script.
Solutions:
Ensure you have the latest version:
npm update -g roblox-mcp-difzRe-inject mcp.lua (it's served fresh on every HTTP GET)
If the tool is very new, the public/mcp.lua may need to be regenerated
Environment Variables
Variable | Default | Description |
|
| HTTP server port |
Roblox-side (getgenv) Configuration
Set these before loading mcp.lua:
Variable | Default | Description |
|
| Server hostname/IP |
|
| Server port |
|
| Transport: |
|
| Unique worker ID for multi-instance |
Programmatic API
import robloxMcp from 'roblox-mcp-difz';
// Create a configured server
const { app, server, tools, wss } = robloxMcp.createApp({ verbose: true });
server.listen(28429, () => {
console.log(`Server ready (${tools.count} tools)`);
});
// Get tool definitions
const allTools = robloxMcp.getTools();
console.log(`Total tools: ${allTools.length}`);Module exports
Export | Type | Description |
| Function | Creates the Express app, HTTP server, WebSocket server, and all managers |
| Function | Returns the full tool definitions array |
| Class | MCP JSON-RPC message handler |
| Class | Task queue for dispatching to executors |
| Class | Manages connected executor sessions |
| Class | WebSocket server for executor communication |
| Class | Tool registry |
Security Notes
The server listens on all interfaces (
0.0.0.0) by default. If you only need local access, consider binding to127.0.0.1via your firewall or a reverse proxy.There is no authentication. Anyone who can reach the server port can invoke any tool. Do not expose the server to untrusted networks.
Code execution tools (
luau_code_executor,execute_custom_luau) provide full Lua VM access within the Roblox process, including the ability to call any API, hook any function, and modify any instance. Use with extreme caution.The server-side tools (
get_roblox_processes,launch_roblox,open_game,capture_roblox_screenshot) execute on the Node.js host machine and can launch processes or enumerate running applications.Network interception tools (
argument_spoofer,response_interceptor,remote_killswitch_toggler) can modify or block game network traffic, potentially violating terms of service.This tool is for educational and research purposes only. Unauthorized use against games you do not own or have explicit permission to test may violate Roblox Terms of Service.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityBmaintenanceAn agentic MCP server for Roblox Studio that provides over 45 tools for script diffing, playtest automation, and bulk instance manipulation. It enables AI agents to manage full development cycles within Roblox, including transaction-safe batch operations and real-time script reviews.Last updated21MIT
- AlicenseAqualityBmaintenanceDebug and inspection tooling for Roblox projects, exposed as an MCP server so an AI agent can explore the instance tree, read/write properties, call remotes, and run Luau in a Roblox client driven by an executor.Last updated1428MIT
- AlicenseAqualityBmaintenanceEnables AI agents to execute Lua code, inspect scripts, spy on remotes, and interact with a running Roblox game client through an MCP interface.Last updated221371MIT
- Alicense-qualityBmaintenanceAn MCP server for Roblox that provides tools to execute Luau code, inspect and modify game instances, teleport players, fire remote events, and stream client logs in real-time via a web dashboard.Last updated1372MIT
Related MCP Connectors
An MCP server for deep research or task groups
MCP server for doc2mcp documentation, generated by doc2mcp.
Markdown-first MCP server for Notion API with 8 composite tools and 39 actions.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Difz25x/roblox-mcp-difz'
If you have feedback or need assistance with the MCP directory API, please join our Discord server