Skip to main content
Glama
roblox-studio
by nardjay

RobloxMCP — MCP server + Studio plugin

Control a live Roblox Studio session from any MCP client (Claude Desktop, Claude Code, Cursor, Codex, DeepSeek Harness). Read the Explorer, create and edit instances, read and patch scripts, and undo everything — without leaving the chat.

Two halves, both in this folder:

MCP client (Claude / Cursor / Codex / DSH ...)
        │  JSON-RPC 2.0 over stdio
        ▼
roblox-mcp  (Node, zero runtime dependencies)
  ├── MCP server    initialize, tools/list, tools/call
  └── HTTP bridge   127.0.0.1:44755  (loopback only)
        ▲  long-poll for work + POST the result
        │
RobloxMCP plugin  (Luau, runs inside Studio)
  └── executes operations on the open place, one undo step per tool call

Studio plugins cannot listen on a socket, so the plugin polls the bridge. That is why the plugin must be connected and the server must be running; either side can be restarted independently.

The clicker example running in Studio, built through the bridge

Requirements

  • Roblox Studio (tested on 0.746)

  • Node.js 20+ (tested on 26)

  • No build step, no runtime npm packages

Related MCP server: dex-mcp

Install

1. Start the server

cd roblox-mcp
npm start                          # or: node bin/roblox-mcp.js

Keep it running. It prints the port it bound (44755 unless that port is busy):

[roblox-mcp] bridge listening on http://127.0.0.1:44755

2. Install the Studio plugin

Copy plugin/RobloxMCP.rbxmx into Studio's Plugins folder, then restart Studio (or use Plugins → Plugins Folder to open the folder):

OS

Folder

Windows

%LOCALAPPDATA%\Roblox\Plugins

macOS

~/Documents/Roblox/Plugins

scripts/install-plugin.ps1 does this copy for you on Windows.

3. Connect

In Studio: Plugins tab → RobloxMCP → the panel opens and auto-connects if the server is running. If it shows "MCP server not running", start the server and press Connect. The port field must match the server's port.

4. Verify end to end

node scripts/smoke-studio.mjs      # 17 checks against the open place, cleans up after itself
node scripts/mcp-check.mjs         # speaks MCP stdio, lists tools, calls a few

Connect an MCP client

node bin/roblox-mcp.js --print-config prints a ready snippet with absolute paths.

Claude Desktop — %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "roblox-studio": {
      "command": "node",
      "args": ["C:\\path\\to\\roblox-mcp\\bin\\roblox-mcp.js", "--port", "44755"]
    }
  }
}

Claude Code

claude mcp add roblox-studio -- node "C:\path\to\roblox-mcp\bin\roblox-mcp.js"

Cursor — .cursor/mcp.json (same mcpServers shape as above).

Codex CLI — ~/.codex/config.toml:

[mcp_servers.roblox-studio]
command = "node"
args = ["C:\\path\\to\\roblox-mcp\\bin\\roblox-mcp.js"]

DeepSeek Harness — the harness reaches MCP servers through @deepseek-ai/dsh-mcp-client. With that plugin available in your profile, add this to %USERPROFILE%\.dsh\profiles\<profile>\cordis.patch.yml:

- id: mcp-roblox
  name: "@deepseek-ai/dsh-mcp-client"
  config:
    serverName: roblox
    transport: stdio
    command: node
    args: ["C:\\path\\to\\roblox-mcp\\bin\\roblox-mcp.js", "--port", "44755"]
    toolCallTimeoutMs: 60000

Tools then appear as mcp__roblox__get_tree, mcp__roblox__set_properties, … If the plugin is not installed yet, add it to the profile with pnpm add @deepseek-ai/dsh-mcp-client from the profile directory first.

Tools

Tool

What it does

studio_status

Is Studio attached, which place, port, round-trip ping

get_tree

Explorer hierarchy from a path (depth, maxNodes, optional properties)

search_instances

Find instances by name substring / class (incl. *Script wildcard)

get_instance

ClassName, parent, attributes, tagged property snapshot

create_instance

New instance with properties + attributes; returns its path

set_properties

Set properties/attributes; reports per-property errors

delete_instance

Destroy instance (undoable)

clone_instance

Deep clone, optionally reparented/renamed

reparent_instance

Move an instance (rejects cycles)

get_script_source

Full source of a Script/LocalScript/ModuleScript

set_script_source

Replace full source, keeps an open editor tab in sync

edit_script

Exact literal text replacement; fails if the text is missing, refuses ambiguous matches

get_selection

What the user has selected in Studio

set_selection

Select instances, optionally focus the camera

insert_asset

Insert a Roblox asset by id via InsertService

history

undo / redo / waypoint

get_console_output

Recent Studio Output lines

run_selftest

Probe Studio APIs the plugin depends on

Every mutating tool call is wrapped in one ChangeHistoryService recording, so one tool call = one Ctrl+Z.

Paths and values

Paths accept the forms you see in the Explorer and command bar:

Workspace.Model.Part
game.Workspace.Model.Part
game.Workspace["My Part"].Model

Property values are plain JSON where possible, tagged where Roblox needs types:

{
  "Size": { "__type": "Vector3", "x": 4, "y": 1, "z": 2 },
  "CFrame": { "__type": "CFrame", "components": [0,5,0, 1,0,0, 0,1,0, 0,0,1] },
  "Color": "#ff8800",                              // or {"__type":"Color3","r":1,"g":0.53,"b":0}
  "Material": "Neon",                              // or "Enum.Material.Neon"
  "AnchorPoint": { "__type": "Vector2", "x": 0, "y": 0 }
}

Supported on both directions: Vector2/3, CFrame, Color3, BrickColor, UDim, UDim2, Rect, NumberRange, NumberSequence, ColorSequence, PhysicalProperties, Font, TweenInfo, Axes, enums, and instance references (by path).

Example: a clicker game

examples/clicker/ is a complete, playable clicker built through the bridge and left in the place:

node scripts/build-clicker.mjs     # (re)build it in the open place

It creates Workspace.ClickerGame (neon click wall, lamps, spawn), a server-authoritative coin/upgrade system (ServerScriptService.ClickerServer + testable ClickerLogic), three remotes, and a StarterGui.ClickerGui HUD with two upgrade tracks and a big CLICK button. Press Play in Studio to play it. The math module is unit tested by test/clicker-logic.test.js, so upgrade costs and affordability are verified without Studio.

Security model

  • The bridge binds 127.0.0.1 only and rejects non-loopback peers.

  • Anything running as your user can reach it; pass --token <secret> for a shared secret the plugin must send (set the same token in the panel). The token is stored in Studio plugin settings, not in the place.

  • The server cannot run arbitrary Luau: Studio plugins have no loadstring. That is why the surface is a fixed set of declarative operations instead of an execute_code tool. (Roblox's official Studio MCP can offer run_code because it is built into Studio itself.)

  • Every change happens in the open place and lands in Studio's undo history.

Troubleshooting

Symptom

Fix

studio_disconnected

Server running? Plugin panel connected? Port fields matching? Press Connect again.

Plugin says "Can't reach server"

Start npm start. If it chose another port (44756…), type that port in the panel.

studio_timeout

A Studio modal dialog (save prompt, script analysis) blocks plugin threads. Close it and retry.

protocolMismatch in studio_status

Plugin and server are from different builds — rebuild with npm run build:plugin and reinstall.

not_a_script

get_script_source / set_script_source only work on Script, LocalScript, ModuleScript.

invalid_parent

Reparent would create a cycle (moving a parent into its own descendant).

Scripts edited externally look stale in Studio

The plugin updates open editor buffers through ScriptEditorService; close and reopen the script if Studio still shows old text.

Nothing works after a Studio update

run_selftest in the panel lists which Studio API the build no longer allows.

Development

bin/roblox-mcp.js        CLI entry
src/bridge.js            loopback HTTP bridge, queue, long-poll, auth
src/mcp.js               MCP JSON-RPC over stdio
src/tools.js             tool schemas + handlers
src/main.js              CLI args, wiring, shutdown
plugin/src/*.luau        Studio plugin (Api, Codec, Ops, Paths, init.server)
plugin/build.js          packs plugin/src into plugin/RobloxMCP.rbxmx
scripts/                 smoke-studio.mjs, mcp-check.mjs, install-plugin.ps1
test/                    node:test suites (bridge, MCP, end-to-end with a fake plugin, Luau compile)
npm test                  # bridge + MCP + e2e + Luau syntax (needs devDependency @luau-rs/luau)
npm run build:plugin      # regenerate plugin/RobloxMCP.rbxmx
npm run smoke             # live Studio smoke test
node bin/roblox-mcp.js --http-only --keep-alive   # bridge only, drive it with curl /v1/rpc

Saving changes

Double-click save.cmd in the repo root, type a short message, press Enter: it pulls any website edits, commits everything, and pushes to GitHub. The plain-git equivalent is git add -A && git commit -m "..." && git push.

POST http://127.0.0.1:44755/v1/rpc takes { "method": "getTree", "params": {...} } and returns { "ok": true, "result": ... } — handy for debugging without an MCP client.

Limits

  • One Studio session at a time (the most recent plugin connection wins).

  • No playtest start/stop and no arbitrary code execution; those need APIs that only Studio's internal MCP exposes.

  • insert_asset needs Studio network access and an asset you can load.

  • The plugin must stay polling: while a tool runs, Studio's main thread is busy, so huge trees/property dumps are capped (maxNodes, maxVisited).

License

MIT — see LICENSE. The plugin model in plugin/RobloxMCP.rbxmx is generated from plugin/src; run npm run build:plugin after changing the Luau sources.

Available Tools

18 tools
clone_instanceClone instanceB

Deep-clone an instance (Archivable is set on the clone), optionally renaming it and placing it under a new parent.

Inputs: path (required), name, parent.

create_instanceCreate instanceA

Create a new instance of a ClassName under a parent and optionally set properties in the same call. Typical use: Part in Workspace, TextLabel in a ScreenGui, Script with a Source property, Folder for grouping. Property values use the same tagged JSON that get_instance returns; plain strings are accepted for enums ("Neon"), Color3 ("#ff8800" or {"__type":"Color3",...}) and instance references.

Inputs: className (required), name, parent, attributes, +1 more.

delete_instanceDelete instanceA
Destructive

Destroy an instance and its descendants. Recoverable with the history tool (undo) until the place is closed.

Inputs: path (required).

edit_scriptEdit script textA

Apply an exact literal string replacement inside a script. Fails if find is missing, so a bad edit cannot silently corrupt the file. Set all=true to replace every occurrence, otherwise the occurrence must be unique unless occurrence (1-based) is given.

Inputs: find (required), path (required), replace (required), all, +1 more.

get_console_outputRead Studio outputA
Read-onlyIdempotent

Read recent Studio Output-window lines captured by the plugin (print/warn/error from Studio and from playtests that the plugin is attached to). Useful after loading a script or inserting a model.

Inputs: clear, limit, messageType.

get_instanceRead instanceA
Read-onlyIdempotent

Read one instance: ClassName, parent path, attributes, and property values encoded as readable JSON. Datatypes come back tagged, e.g. {"__type":"Vector3","x":1,"y":2,"z":3} or {"__type":"CFrame","components":[...]}. Omit "properties" to get a curated snapshot.

Inputs: path (required), properties.

get_script_sourceRead script sourceA
Read-onlyIdempotent

Read the full Source of a Script, LocalScript or ModuleScript. Line numbers are 1-based in the returned text.

Inputs: path (required).

get_selectionRead selectionA
Read-onlyIdempotent

Read the instances currently selected in Studio. This reflects what the user is looking at right now, which is often a better anchor than guessing a path.

Inputs: no named parameters.

get_treeRead Explorer treeA
Read-onlyIdempotent

Read the instance hierarchy under a path, breadth-first, with class names and paths. Use this to discover what exists before editing. Returns child counts plus a truncated flag when the tree is larger than maxNodes.

Inputs: path, depth, maxNodes, servicesOnly, +1 more.

historyUndo / redoA
Destructive

Undo or redo the last change in Studio, or write an explicit waypoint into the undo history. Each of your mutating tool calls is already a single undo step, so "undo" reverses the last tool call.

Inputs: action (required).

insert_assetInsert assetA

Insert a Roblox asset (model, mesh part, tool) by asset id using InsertService. Requires the asset to be public or owned by the signed-in account, and needs an internet connection in Studio.

Inputs: assetId (required), name, parent.

reparent_instanceMove instanceA

Move an existing instance under a different parent, optionally renaming it.

Inputs: path (required), parent (required), name.

run_selftestPlugin self-testA
Read-onlyIdempotent

Ask the plugin to verify its own capabilities inside this Studio build: source read/write, ChangeHistoryService recordings, InsertService, ScriptEditorService, Selection and HTTP. Use it when a tool misbehaves and you need to know which Studio API is unavailable instead of guessing.

Inputs: no named parameters.

search_instancesSearch instancesA
Read-onlyIdempotent

Find instances by name substring and/or class name under a subtree, traversing descendants. This is the fastest way to locate a script, part or GUI by name when you do not know its full path.

Inputs: limit, query, under, className.

set_propertiesSet propertiesA

Set one or more properties on an existing instance. Values may be primitives or tagged datatypes such as {"__type":"Vector3","x":0,"y":10,"z":0}, {"__type":"CFrame","components":[...]}, {"__type":"UDim2","xs":0,"xo":0,"ys":0,"yo":0}, "Enum.Material.Neon" or a plain enum name. Read-only properties and type mismatches are reported individually and do not abort the rest.

Inputs: path (required), properties (required), attributes.

set_script_sourceWrite script sourceA

Replace the entire Source of a script. Prefer edit_script for small changes: rewriting a file from memory risks losing code you have not read. If the script is open in Studio, the editor buffer is updated through ScriptEditorService so Studio does not show a stale file.

Inputs: path (required), source (required).

set_selectionSet selectionA
Idempotent

Select instances in Studio so the user can see what you changed. focus=true also moves the camera to them (only works for 3D instances).

Inputs: paths (required), focus.

studio_statusStudio statusA
Read-onlyIdempotent

Check whether the Roblox Studio plugin is connected, which place is open, and the bridge port. Call this first when a tool reports that Studio is disconnected: it tells you whether the plugin is missing, stale (protocol mismatch) or simply not polling.

Inputs: ping.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 18 tools

    Disambiguation4/5

    Most tools are cleanly separable by resource+action (read tree, read instance, create, clone, delete, reparent, set properties, script read/write/edit). The only mild overlaps are get_instance vs get_script_source (Source could plausibly come from either) and get_tree vs search_instances for locating nodes, but both descriptions steer usage clearly. The set_script_source/edit_script pair is explicitly differentiated by guidance, which is a strong touch.

    Naming Consistency4/5

    The dominant convention is snake_case verb_noun (get_tree, create_instance, set_properties, delete_instance, edit_script), applied consistently. Two outliers use bare nouns instead of verbs: studio_status and history. Minor deviation, fully readable, no mixed casing.

    Tool Count4/5

    18 tools is on the heavier side of the ideal band, but each maps to a distinct Studio operation (diagnostics, hierarchy reads, instance CRUD, script editing, selection, history, assets, console). No obviously redundant or vanity tools inflate the count.

    Completeness4/5

    Strong lifecycle coverage: diagnostics/selftest, discovery, full instance CRUD plus reparent/clone, property and source editing, undo/redo, asset insertion and console output. Gaps remain around playtest start/stop control, attribute-specific read/write, and batch/multi-instance operations, which agents may have to work around via re-running single-instance calls.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      Not graded
      maintenance
      A comprehensive MCP server providing 41 tools for complete Roblox Studio control, enabling safe script editing with syntax checking, instance manipulation, and backup features directly from Claude Code or any MCP-compatible AI assistant.
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Debug 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.
      14
      14 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Debug 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.
      14
      1
      MIT