Skip to main content
Glama

Legacy MCP (2020L+)

An MCP bridge that lets AI assistants control Roblox Studio 2020L and newer in real time

Version Node.js Luau MCP License

Features

  • MCP protocol — speaks the Model Context Protocol, so any MCP-compatible AI assistant can talk to Studio directly.

  • Web control panel — a built-in dashboard at http://127.0.0.1:4444 to run tools, browse results and manage connected Studio clients.

  • 30+ tools — from read_workspace and create_instance to execute_lua, set_lighting and tagging.

  • Dot-path notation — address instances as Workspace.Bridge.Part instead of fighting slash paths.

  • Multiple clients — several Studio windows can connect at once; each gets its own toggle, and you can target a specific one (click its chip in the panel, or pass client to any tool from an MCP client)

  • Hot reload — while developing, edit LegacyMCP.lua and the plugin picks the changes up in seconds.

Related MCP server: Roblox Studio MCP

Architecture

graph LR
    A[AI assistant / MCP client] -->|MCP| B[index.js server]
    B -->|HTTP :4444| C[LegacyMCP.lua in Studio]
    C -->|poll / result| D[Roblox Studio 2020L+]
    E[Web panel :4444] --> B

Requirements

  • Node.js 18+

  • Roblox Studio 2020L or newer

  • The plugin file LegacyMCP.lua loaded into Studio

Installation

  1. Install dependencies and start the server:

    npm install
    npm start
  2. Open http://127.0.0.1:4444 in a browser to reach the web panel.

  3. In Studio, load LegacyMCP.lua as a plugin (Plugins folder or drag-and-drop into Studio).

  4. The panel should switch to connected and the small MCP: checking... widget appears in the corner.

Configuration

Settings are stored per-user via plugin:SetSetting and can be changed from the plugin panel.

Setting

Default

Description

MCP_ServerURL

http://127.0.0.1:4444

Base URL of the bridge server

MCP_ClientName

studio

Client key shown on the web panel

MCP_Enabled

true

Master switch for the plugin

MCP_PollInterval

0.3

Seconds between HTTP polls

MCP_ShowStatusWidget

true

Show/hide the small MCP: checking... widget

MCP_StatusCheckInterval

2

Seconds between status pings to the panel

MCP_VerboseLogging

false

Extra logging in the Studio output

Path notation

Instances are addressed with dot notation:

Workspace.Bridge.Part
Workspace.Models.Car.Body

Slash notation (Workspace/Bridge/Part) is also accepted for compatibility.

Studio compatibility

Designed for Roblox Studio 2020L and newer. Things to keep in mind:

  • Old HttpService — only two-argument calls are safe: GetAsync(url) and PostAsync(url, body). Extra arguments (headers, content type) are not supported and fail silently.

  • ASCII-only strings — non-ASCII characters in the Lua source (like — or ═) turn into mojibake (—) in logs. The plugin keeps its strings ASCII.

HTTP endpoints

Endpoint

Method

Purpose

/hello

POST

Plugin registers itself with the server

/poll

GET

Plugin asks for pending tool calls

/result

POST

Plugin returns a tool result

/status

GET

Health/status of the server

/log

POST

Plugin forwards Studio log lines

/call

POST

Run a tool from the web panel

/client-toggle

POST

Enable/disable a specific client by key

/plugin-update

GET

Hot-reload source for the plugin

Usage

  1. Start the server (npm start) and load the plugin into Studio.

  2. Open the web panel at http://127.0.0.1:4444.

  3. Pick a tool, fill in its arguments (placeholders show examples), hit Run →.

  4. The result appears in the panel; Copy result copies it to your clipboard.

Example: ask your MCP client to run create_instance with parent=Workspace and className=Part, then check read_workspace to see it.

With several Studio windows connected: click a client chip in the panel to target it (highlighted green), or pass client: "studio" to any tool from an MCP client. Without a target, the command goes to the only active client — or, if several are active, to the most recently active one.

Security

By default the bridge is open — it only listens on 127.0.0.1, so only local processes can reach it. If you want extra protection (e.g. a page in your browser could trigger /call while you have the panel open), flip the flag in index.js:

const ENABLE_AUTH = true;   // protect /call and /client-toggle
const MCP_TOKEN = 'your-secret';

When enabled, /call and /client-toggle require ?token=... or the x-mcp-token header. Open the panel as http://127.0.0.1:4444/?token=your-secret (the panel stores it and sends it with every request). Keep ENABLE_AUTH = false to disable the check entirely.

Troubleshooting

Symptom

Fix

Panel says checking... forever

Make sure the server is running and MCP_ServerURL points at http://127.0.0.1:4444; check the Studio output for errors

— / mojibake in Studio logs

Non-ASCII characters in LegacyMCP.lua — replace them with ASCII (-, =)

Duplicate/ghost clients on the panel

Restart the server so stale registrations clear; each Studio window uses its own ?client= key

License

MIT

Available Tools

28 tools
add_tagC

Add a CollectionService tag to an instance.

Inputs: tag (required), path (required), client.

bulk_createB

Create multiple instances in one round-trip. Each item: { className, name?, parent, properties? }.

Inputs: instances (required), client.

check_scriptA

Check a script for syntax/load errors without saving. If path given, checks existing; if source given, checks that.

Inputs: path, client, source.

clone_instanceC

Clone an instance and optionally reparent.

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

create_instanceC

Create a new instance (Script, Part, Folder, etc.) with properties.

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

delete_instanceC

Delete an instance by path.

Inputs: path (required), client.

edit_scriptA

Partially edit a Script/LocalScript/ModuleScript: replaces the exact text old_text with new_text, leaving the rest of the source untouched. Fails if old_text is not found, or matches more than once (unless replaceAll=true). Prefer this over write_script for small changes.

Inputs: path (required), new_text (required), old_text (required), force, +2 more.

execute_luaA

Execute arbitrary Lua code in Studio (server-side). Use force=true to bypass safety.

Inputs: code (required), force, client.

find_instancesC

Find instances by class name, optionally with IsA check.

Inputs: className (required), isA, client, searchIn, +1 more.

get_childrenC

List direct children of an instance.

Inputs: path (required), client.

get_outputB

Return recent lines from the Studio Output window (captured by the plugin), optionally filtered by a substring. Use it to see prints, warnings and errors.

Inputs: count, client, filter, messageType.

get_propertiesA

Read properties of an instance by path. Pass listAll=true to get a list of common properties for its class with their Lua types and current values (the plugin cannot enumerate every property, so this is a curated list).

Inputs: path (required), client, listAll, properties.

get_selectionA

Get currently selected instances in Studio.

Inputs: client.

get_studio_stateA

Get current Studio state: place name, connected status, snapshot age.

Inputs: client.

get_taggedC

List instances with a given CollectionService tag.

Inputs: tag (required), client.

modify_instanceC

Set properties on an existing instance.

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

move_instanceC

Move an instance to a new parent.

Inputs: path (required), newParent (required), client.

pingA

Health check. Verify Studio plugin is connected and responsive.

Inputs: client.

read_scriptA

Read source code of a script by path. Pass startLine/endLine to read only a range (returns numbered lines and totalLines).

Inputs: path (required), client, endLine, startLine.

read_workspaceA

Return a tree of the workspace (or any service) up to a max depth. The root's direct children are paginated by pageSize/cursor (returns hasMore + cursor for the next page); deeper descendants are capped at pageSize per node.

Inputs: path, depth, client, cursor, +1 more.

redoB

Redo the last undone change in Studio (ChangeHistoryService).

Inputs: client.

remove_tagC

Remove a CollectionService tag from an instance.

Inputs: tag (required), path (required), client.

rename_instanceC

Rename an instance.

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

search_scriptsA

Search the source of all scripts under searchIn for a plain-text (or Lua pattern) query. Returns matching script paths with line numbers and line text.

Inputs: query (required), client, pattern, searchIn, +2 more.

select_instancesC

Set Studio selection to given paths.

Inputs: paths (required), client.

set_lightingC

Change Lighting service properties.

Inputs: properties (required), client.

undoA

Undo the last change in Studio (ChangeHistoryService). Repeat the call to undo further back.

Inputs: client.

write_scriptA

Write full source to a Script/LocalScript/ModuleScript. Use force=true to bypass safety checks.

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

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 28 tools

    Disambiguation4/5

    Most tools target a distinct resource/action, and the descriptions make boundaries clear. Minor overlaps exist, especially set_lighting versus modify_instance, read_workspace versus get_children, and execute_lua acting as a broad escape hatch, but an agent can reasonably choose among them.

    Naming Consistency4/5

    The set is consistently lowercase snake_case with verb-first names such as create_instance, get_properties, and write_script. A few tools use verb-only names like ping, undo, and redo, which are natural but are minor deviations from the verb_noun pattern.

    Tool Count3/5

    Twenty-eight tools is heavy for one server, even though the Roblox Studio surface is broad enough to justify many operations. A few convenience tools could potentially merge, such as set_lighting into modify_instance or ping into get_studio_state, but the set is not severely bloated.

    Completeness4/5

    Core instance, script, selection, output, tag, lighting, and undo/redo workflows are covered, giving strong lifecycle coverage for Studio automation. Minor gaps remain around playtest controls, attributes beyond CollectionService tags, and bulk update/delete operations, though execute_lua provides a fallback.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers