Roblox MCP Server
Enables real-time interaction with the Roblox game environment, providing tools for instance navigation, script operations, remote monitoring/firing, and advanced debugging capabilities like garbage collector search and connection inspection.
Click on "Deploy 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 Server find all players in the game and list their names"
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 Server
A Model Context Protocol (MCP) server that bridges AI assistants with Roblox via a Lua client. This enables AI tools like Claude to interact with the Roblox game environment in real-time.
Overview
This project consists of two components:
MCP Server (
src/index.ts) - A Node.js server that implements the MCP protocol and communicates with AI clientsLua Client (
client.lua) - A Lua script that runs inside Roblox via a script executor and connects to the MCP server via WebSocket
Prerequisites
Node.js v18 or higher
npm or yarn
A Roblox script executor with WebSocket support (e.g., Synapse X, KRNL, Fluxus, Solara)
Installation
1. Clone and Install Dependencies
cd mcp
npm install2. Build the Server
npm run buildThis compiles the TypeScript source to JavaScript in the build/ directory.
Configuration
MCP Client Configuration (Claude Desktop, etc.)
Add the following to your MCP client configuration file:
Claude Desktop (Windows)
Location: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"roblox": {
"command": "node",
"args": ["C:/path/to/mcp/build/index.js"]
}
}
}Claude Desktop (macOS)
Location: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"roblox": {
"command": "node",
"args": ["/path/to/mcp/build/index.js"]
}
}
}WebSocket Port
The server listens on port 8888 by default. You can modify this in src/index.ts if needed.
Usage
Step 1: Start the MCP Server
The MCP server starts automatically when your AI client (like Claude Desktop) initializes it. Alternatively, for testing:
npm startStep 2: Connect the Lua Client
Open Roblox and join a game
Open your script executor
Copy the contents of
client.luaand execute it
The client will automatically:
Connect to the WebSocket server at
ws://localhost:8888Forward game logs to the MCP server
Handle commands from the AI assistant
Auto-reconnect if disconnected
Tip: Add client.lua to your executor's autoexec folder for automatic connection on startup.
Available Tools
The MCP server exposes the following tools that AI assistants can use:
Instance Navigation
Tool | Description |
| Get children of an instance (default: |
| Search for instances by name pattern or ClassName |
| Get properties and attributes of an instance |
| Get hidden/internal properties using executor functions |
Script Operations
Tool | Description |
| Read/decompile the source code of a script |
| Execute Lua code in the Roblox context |
Remote Spy
Tool | Description |
| Start monitoring RemoteEvent/RemoteFunction calls |
| Stop the remote spy |
| Get collected remote spy logs |
| Fire a RemoteEvent or invoke a RemoteFunction |
Advanced/Debug
Tool | Description |
| Search Lua garbage collector for functions/tables |
| Get all connections on an event/signal |
| Get upvalues of a function |
Tool Examples
Get Children of Workspace
Use get_children with path "game.Workspace"Find All Parts
Use find_instances with query "" and className "Part"Read a Script
Use read_script with path "game.ReplicatedStorage.SomeModule"Execute Code
Use execute_script with code "print(game.Players.LocalPlayer.Name)"Monitor Remotes
1. Use remote_spy_start (optionally with filter "Shop")
2. Play the game normally
3. Use remote_spy_get_logs to see captured calls
4. Use remote_spy_stop when doneFire a Remote
Use fire_remote with path "game.ReplicatedStorage.MyRemote" and args ["hello", 123]Executor Compatibility
The Lua client checks for WebSocket support from various executors:
✅ Synapse X (
syn.websocket)✅ KRNL (
WebSocket)✅ Fluxus (
fluxus.websocket)✅ Solara (
WebSocket)✅ Any executor with global
WebSocket
Some advanced features require additional executor functions:
Feature | Required Function |
Script decompilation |
|
Remote spy |
|
GC search |
|
Get connections |
|
Get upvalues |
|
Hidden properties |
|
Development
Run in Development Mode
npm run devBuild
npm run buildProject Structure
mcp/
├── src/
│ └── index.ts # MCP server source
├── build/
│ └── index.js # Compiled server
├── client.lua # Roblox Lua client
├── package.json
├── tsconfig.json
└── README.mdTroubleshooting
"No Lua client connected"
Make sure you've executed
client.luain your Roblox executorCheck that the WebSocket port (8888) is not blocked by firewall
Verify your executor supports WebSocket
"Port 8888 is already in use"
Another instance of the server is running. Kill it or restart your computer.
"WebSocket not supported on this executor"
Your executor doesn't have WebSocket support. Try a different executor.
Connection drops frequently
The client auto-reconnects after 5 seconds. If issues persist, check your network or executor stability.
Security Notice
⚠️ This tool is intended for educational and development purposes only. Using script executors may violate Roblox's Terms of Service and could result in account termination.
License
ISC
Available Tools
13 toolsexecute_scriptC
Execute a Lua script in the Roblox context.
Inputs: code (required).
find_instancesC
Find instances by ClassName or Name pattern.
Inputs: query (required), className, ancestor.
fire_remoteC
Fire a RemoteEvent or invoke a RemoteFunction with specified arguments.
Inputs: path (required), args.
get_childrenC
Get the structure of the Roblox DataModel (children of a specific instance).
Inputs: path.
get_connectionsC
Get all connections on a specific event/signal of an instance.
Inputs: path (required), event (required).
getgc_findB
Search the Lua garbage collector for functions/tables by constants, upvalues, or name patterns. Useful for finding hidden functions.
Inputs: constants, upvalues, name, type.
get_propertiesC
Get properties and attributes of an instance. Returns Name, ClassName, Path, Properties, and Attributes.
Inputs: path (required), properties.
get_upvaluesC
Get upvalues of a function found via getgc or other means.
Inputs: functionIndex (required).
read_scriptB
Read the source code of a script. Requires executor support for decompilation if it's a LocalScript/ModuleScript not created by you.
Inputs: path (required).
remote_spy_get_logsC
Get the collected remote spy logs.
Inputs: limit.
remote_spy_startC
Start spying on RemoteEvent and RemoteFunction calls. Logs all remote traffic.
Inputs: filter.
remote_spy_stopB
Stop the remote spy.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have distinct purposes, such as execute_script for running Lua code, find_instances for locating objects, and remote_spy tools for monitoring network traffic. However, some tools like get_properties and get_hidden_properties could be confused as they both retrieve instance properties, though their descriptions clarify the difference between standard and hidden properties.
The tool names follow a consistent verb_noun pattern with snake_case throughout, such as execute_script, find_instances, and get_properties. There are minor deviations like getgc_find, which uses an abbreviation (gc) that might break the pattern slightly, but overall the naming is highly predictable and readable.
With 13 tools, the count is well-scoped for a Roblox server covering scripting, instance manipulation, and remote monitoring. Each tool appears to serve a specific function, such as executing scripts, inspecting properties, or spying on remote events, making the set comprehensive without being overwhelming.
The tool set provides strong coverage for core Roblox operations, including script execution, instance discovery, property inspection, and remote event handling. Minor gaps exist, such as no tools for creating or modifying instances or scripts, which could limit full CRUD capabilities, but agents can likely work around this with the available tools for reading and executing.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Real-time community for AI agents: public chat rooms, multiplayer games and shared spaces.
A shared programmable world where AI agents explore, build, and create interactive objects.
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.