rbx-mcp
rbx-mcp is a bridge that lets an AI agent write and execute Lua code live inside Roblox Studio, read Studio state, and retrieve error information — all over the Model Context Protocol.
Execute Lua in Roblox Studio (
execute_lua): Run any Luau code string directly inside Roblox Studio vialoadstring(). Captures output, return values, and errors with tracebacks. Supports a custom human-readable label for logs/UI and a configurable execution timeout (1,000ms–600,000ms, default 30,000ms).Read Roblox Studio State (
read_studio_state): Inspect the current state of Roblox Studio in a structured way using one of four query types:selection— view the currently selected objects in Studioexplorer_tree— browse the workspace hierarchy up to a specified depth (1–6, default 2)instance— inspect a specific instance by its dotted path (e.g.,Workspace.Model.Part)services_summary— get a summary of Studio services
Retrieve Recent Execution Errors (
get_errors): Fetch the most recent failed Lua executions, including error messages and tracebacks. Useful for recovering context and debugging iteratively. Supports retrieving up to 20 recent errors (default 5).
Provides tools for executing Lua code in Roblox Studio, reading studio state, and retrieving errors, enabling AI agents to control Roblox Studio sessions.
rbx-mcp
Let an AI agent (Claude) write Lua and execute it live inside Roblox Studio, read the result, and iterate — over the Model Context Protocol.
rbx-mcp is a small bridge with two halves in one process:
an MCP server (stdio) that exposes Studio actions to Claude as tools (
execute_lua,read_studio_state,get_errors), anda localhost HTTP server that a tiny Roblox Studio plugin polls — it runs the Lua via
loadstring()and reports back output, return values, and errors (with tracebacks).
The plugin is deliberately dumb and universal: it just runs whatever Lua it's given, so it never needs updating for new tasks. All the intelligence stays on the AI side.

Status
Stable. Published on npm as @lolofuk123/rbx-mcp.
Design docs and the phased build plan live in work/;
start with work/README.md and the concept doc PROJECT_CONCEPT_1.md.
Related MCP server: dex-mcp
Repo layout
server/ Node/TS package, published to npm as `rbx-mcp`
(MCP side + localhost HTTP side; bundles & auto-installs the plugin)
plugin/ single-file Studio plugin: src/rbx-mcp.server.luau (no build step)
work/ specs + implementation planSetup
Prerequisites: Node.js ≥ 20, Roblox Studio, and an
MCP-capable AI host (see below). rbx-mcp is model-agnostic — bring Claude,
GPT, or any model your host drives; the server only exposes MCP tools, the model
just calls them. The host must run a local stdio server on the same
machine as Studio (the plugin talks to localhost).
1. Add the MCP server to your AI host
Claude Desktop / Claude Code — top-level key mcpServers:
{
"mcpServers": {
"rbx-mcp": { "command": "npx", "args": ["-y", "@lolofuk123/rbx-mcp"] }
}
}Claude Desktop:
%APPDATA%\Claude\claude_desktop_config.json(Windows) /~/Library/Application Support/Claude/claude_desktop_config.json(macOS).Claude Code:
.mcp.jsonat the project root, orclaude mcp add rbx-mcp -- npx -y @lolofuk123/rbx-mcp.
VS Code / GitHub Copilot (agent mode) — note the different key (servers) and
type. File .vscode/mcp.json (or Command Palette → MCP: Add Server):
{
"servers": {
"rbx-mcp": { "type": "stdio", "command": "npx", "args": ["-y", "@lolofuk123/rbx-mcp"] }
}
}(Cursor / Windsurf are similar — e.g. .cursor/mcp.json, same mcpServers shape as Claude.)
2. Open Roblox Studio
On first launch the server auto-installs the plugin into your local Plugins folder; Studio loads it on (re)start. Then open the rbx-mcp panel → click Start. If HttpService is off, the panel tells you exactly where to enable it (Experience settings → Security → Allow HTTP Requests); it connects automatically once you do.
That's it. See server/README.md for env vars, an optional
auth token, and manual plugin install.
Setup on a managed / corporate machine (Claude Code)
On org-managed machines, enterprise policy often blocks Claude Code from
registering MCP servers (both claude mcp add and .mcp.json loading). The
workaround: start the server yourself with the dev route enabled, then let
Claude Code drive Studio via direct HTTP calls instead of MCP tools.
Prerequisites
Node.js ≥ 20 installed
Roblox Studio installed
Claude Code CLI
Step 1 — Start the server manually
Open a terminal (keep it running in the background) and start the server with the dev route enabled:
# bash / macOS / Linux
RBXMCP_DEV=1 npx -y @lolofuk123/rbx-mcp# PowerShell (Windows)
$env:RBXMCP_DEV=1; npx -y @lolofuk123/rbx-mcpOn first run the server writes the Studio plugin into your local Plugins folder:
%LOCALAPPDATA%\Roblox\Plugins\rbx-mcp.lua (Windows)
~/Documents/Roblox/Plugins/rbx-mcp.lua (macOS)Step 2 — Open Roblox Studio and connect the plugin
Restart Studio — it only scans the Plugins folder at launch, so a full restart is required after the first run in Step 1.
Enable HttpService — Game Settings → Security → Allow HTTP Requests. The plugin cannot do this for you; it is a one-time manual step per experience.
Open the rbx-mcp panel (Plugins toolbar) → click Start.
Verify in a browser that both sides are up:
http://127.0.0.1:30700/v1/health"pluginConnected": true means you're ready.
Step 3 — Tell Claude Code to use the dev route
Because MCP tools are blocked, Claude Code executes Lua by posting directly to the server's dev endpoint. Tell Claude Code at the start of your session:
"The rbx-mcp server is running with
RBXMCP_DEV=1. MCP tools are blocked by policy on this machine. Execute Lua in Studio by posting tohttp://127.0.0.1:30700/v1/_dev/enqueuewith body{"code": "..."}and reading the result from the response."
Claude Code uses its PowerShell or Bash tool to POST to that endpoint and reads the result synchronously from the response — no MCP handshake needed. You're live.
Troubleshooting
VS Code / Copilot (Windows):
MCP tools don't appear / no "Start" shows up — MCP tools only work in Copilot Agent mode (not Ask/Edit). Start the server via Command Palette → MCP: List Servers →
rbx-mcp, and enable it in the chat's 🔧 Tools picker.node/npx"not recognized" in VS Code's terminal (but fine in a normal terminal) — VS Code launched with a stale PATH from before Node was installed. Fully quit and reopen VS Code (reboot if it persists) so it picks up Node.spawn npx ENOENTwhen starting the server — on Windowsnpxis actuallynpx.cmd, which VS Code's direct spawn can miss. Wrap it incmd:{ "servers": { "rbx-mcp": { "type": "stdio", "command": "cmd", "args": ["/c", "npx", "-y", "@lolofuk123/rbx-mcp"] } } }(or set
"command": "npx.cmd").
Roblox Studio:
No rbx-mcp toolbar button after install — fully restart Studio; it only scans the Plugins folder at launch. (The installed file must be
.lua, which the auto-installer handles.)Stuck on "HTTP service disabled" — enable it (Experience settings → Security → Allow HTTP Requests); the plugin connects automatically once it's on.
pluginConnected: falsein/v1/health— open the rbx-mcp panel and click Start; check Host/Port (and Token, if set) match the server.
Development
cd server
npm install
npm test # vitest
npm run build # tsc -> dist/
npm run dev # run the server locally (stdio MCP + HTTP on 127.0.0.1:30700)License
See LICENSE.
Available Tools
3 toolsexecute_luaExecute Lua in Roblox StudioA
Run a Luau code string inside Roblox Studio (via loadstring) and return its captured output, return values, and any error with traceback. Use this to build, script, inspect, or modify anything in Studio; iterate by reading the error and re-running.
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Luau code to execute in Studio. | |
| label | No | Short human label for logs/UI. | |
| timeoutMs | No | Execution budget in ms (default 30000). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that it uses loadstring, captures output and return values, and returns errors with traceback. However, it does not mention side effects, sandboxing, or Studio context limitations, which are important for a code execution tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core action and then an iterative usage hint. Every word earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description adequately explains return values (captured output, return values, error with traceback). It also provides an iterative workflow ('iterate by reading the error and re-running'). While it doesn't cover edge cases like side effects, it is complete for a code execution tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters. The description adds no extra meaning beyond the schema (e.g., no parameter syntax or format details), so the baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Run') and resource ('Luau code string inside Roblox Studio'), and clearly distinguishes from siblings by focusing on arbitrary execution with output capture, whereas read_studio_state and get_errors are for reading state and errors respectively.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly says 'Use this to build, script, inspect, or modify anything in Studio', giving clear context for when to use it. It doesn't state exclusions or alternatives, but the broad scope and sibling names make the intended use obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_errorsRecent execution errorsA
Return the most recent failed executions (message + traceback). Useful for recovering context.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many recent errors (default 5). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It does describe the returned data ('message + traceback') and recency, but does not mention ordering, side effects, or error handling. This is adequate for such a simple read-only tool but not rich in behavioral detail.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero fluff, action verb first, and all words earn their place. Very efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter and clear return format ('message + traceback'), the description is mostly complete. It does not explicitly mention the limit parameter, but the schema covers that, so the description adds value with the recovery context and return content.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single 'limit' parameter, so the description does not need to add parameter details. The baseline of 3 applies since the schema already fully describes the parameter's meaning and constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Return' and the specific resource 'most recent failed executions' with detail on content ('message + traceback'). It naturally distinguishes itself from sibling tools such as execute_lua and read_studio_state by focusing on error retrieval.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'Useful for recovering context' indicates a clear use case, but no explicit exclusions or alternative tool references are provided. This matches the 'clear context, no exclusions' level.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_studio_stateRead Roblox Studio stateA
Inspect Studio state in a clean form: 'selection' (current selection), 'explorer_tree' (workspace tree to a depth), 'instance' (one instance by dotted path, e.g. 'Workspace.Model.Part'), or 'services_summary'. Runs a server-owned snippet — no arbitrary code.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | For query=instance: dotted path like 'Workspace.Model.Part'. | |
| depth | No | For query=explorer_tree: max depth (default 2). | |
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the server-owned snippet mechanism and the 'no arbitrary code' safety guarantee, but it does not explicitly state that the tool is read-only, describe side-effect absence, or explain what the returned 'clean form' means in terms of data structure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the primary purpose, followed by a concise list of query modes and a safety note. Every sentence adds value; no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple inspection tool with no output schema, the description adequately explains how to invoke it and what to expect at a high level. It does not detail return formats, but the query names and examples give enough guidance for correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers path and depth but leaves the enum values for query without descriptions. The description adds semantics for each query option, including an example for path, bridging the 67% schema coverage gap effectively.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as inspecting Roblox Studio state and enumerates the four query modes with concrete examples. It distinguishes itself from siblings (execute_lua, get_errors) by emphasizing 'no arbitrary code,' making its read-only scope explicit.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use this tool (for safely inspecting state without arbitrary code execution) and explains each query type. It implicitly contrasts with execute_lua via 'no arbitrary code,' but does not explicitly name alternatives or exclusion scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v0.1.0- First observed
execute_lua - First observed
get_errors - First observed
read_studio_state
TDQS
Each tool has a clearly distinct purpose: execute_lua runs arbitrary code, read_studio_state provides structured read-only inspection, and get_errors surfaces recent failures. No overlap or ambiguity.
All three tool names follow the same verb_noun pattern in snake_case (execute_lua, read_studio_state, get_errors). The naming is uniform and predictable.
Three tools is well-scoped for this server. execute_lua acts as a powerful general-purpose action tool, while the other two provide safe inspection and error recovery, so no extra tools are needed.
execute_lua can perform any build, script, or modification task within Roblox Studio, read_studio_state covers structured inspection needs, and get_errors closes the debugging loop. The set covers the full workflow without dead ends.
Maintenance
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
MCP server for AI dialogue using various LLM models via AceDataCloud
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- 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.1422MIT
- AlicenseAqualityDmaintenanceDebug 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.14221MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that gives an AI coding agent real control of Roblox Studio and Roblox Open Cloud, with a test-and-security layer no other Studio MCP has.63MIT
- FlicenseAqualityCmaintenanceAn MCP server that bridges AI to Roblox Studio, enabling execution of Luau scripts, instance manipulation, play-testing control, and Open Cloud operations via natural language.21-
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/lolofuk123/rbx-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server