360 Secure SkillHub
360 安全技能中心

roblox-studio-mcp

该 Skill 指导代理连接 Roblox Studio 内置 MCP 服务器,通过脚本搜索与编辑、场景树检查、Luau 执行、试玩与日志读取、截图/视频、模拟输入、AI 模型/纹理生成和 Open Cloud 调用来完成开发与验证;同时说明权限授予、数据存储、资源上传、破坏性操作备份及 Studio 使用礼仪等限制。

分类:开发
TabooHarmony
热度 24.44
最近更新 2026-12-01 11:24:39

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add tabooharmony/roblox-brain/roblox-studio-mcp
兼容性
通用兼容
联网要求
需要联网
数据出网
可选出网
Metadata
name
roblox-studio-mcp
description
Use when working in Roblox Studio through its built-in MCP server: scripts, scenes, playtests, captures, input, AI generation, Open Cloud.
when_to_use
Also for setting up the Studio MCP, checking a change in game, reading output, screenshots or video, simulated input, uploading assets or creating products without an API key, MCP permission errors, and verifying a fix in Studio.
last_reviewed
"2026-11-28T00:00:00.000Z"
sources
["https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/studio/mcp.md","https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/studio/mcp-open-cloud.md","https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/ai/coding-harness.md","https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/studio/testing-modes.md","https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/projects/assets/privacy.md","https://raw.githubusercontent.com/Roblox/creator-docs/main/content/en-us/studio/cli.md","original"]

Roblox Studio MCP

When to Load

Any work in Studio through the built-in Roblox Studio MCP server, the recommended bridge: it ships with Studio, connects in one click, and calls Open Cloud without an API key. Other bridges name tools differently: trust the live tool list. Bug-hunt method: roblox-debugging.

"Field-observed" = seen in the owner's projects; recheck after Studio updates. Menus, tools, scopes and limits are as of 2026-11.

Setup (2 minutes)

  1. Studio: Assistant -> … -> Manage MCP Servers -> Enable Studio as MCP server.
  2. Quick connect: turn on your client (Antigravity, Codex CLI, Claude Code, Claude Desktop, Cursor, Gemini CLI, VS Code). A green indicator counts connected clients.
  3. Otherwise add it as a stdio server: Windows cmd.exe /c %LOCALAPPDATA%\Roblox\mcp.bat; macOS /Applications/RobloxStudio.app/Contents/MacOS/StudioMCP (JSON key Roblox_Studio).
  4. Tools missing: restart Studio and the client; check the path and JSON commas. A client installed while Studio was open needs a Studio restart.

Use the whole toolbox (live list, 2026-11-28)

Need Tool
Find and read code script_search (fuzzy, 10), script_grep (50 hits), script_read (line ranges)
Edit code multi_edit (ordered exact-match edits, atomic; creates the script with className + empty first old_string)
Explore the tree search_game_tree (path/class/keyword, depth), inspect_instance (all properties, attributes, children)
Run Luau execute_luau with datamodel_type Edit, or Server/Client during play
Playtest get_studio_state, start_stop_play (is_start), get_console_output
See it screen_capture (optional camera position + look-at), video_capture (Client, start/stop: motion, stutter, timing only)
Drive a player character_navigation, user_keyboard_input, user_mouse_input (can target UI instances)
Generate generate_mesh, generate_texture (re-texture in place), generate_material, generate_procedural_model (+ wait_job_finished), generate_scene (in a bounding box), generate_animation (R15, <=10 s, or R6 -> R15), generate_avatar, auto_setup_avatar (rig a static model as R15, 3-5 min), segment_mesh (split into <=5 named parts)
Assets search_asset (Creator Store + your/group inventory), insert_asset, upload_image (from URLs), store_image (local file -> URI for other tools)
Open Cloud open_cloud_invoke (§2)
Docs and skills http_get (allowed Roblox docs, keyword search), list_roblox_skills / get_roblox_skill, create_skill / edit_skill
Delegate subagent (explore, screen_capture, unit_test on the live server)
Save save_place (version note; never publishes)
Sessions list_roblox_studios
Report gaps submit_feedback (no code or personal data; tell the user each time)

Tool names move between releases: route on the connected tool list, not this table.

Traps

  • Every call takes studio_id from list_roblox_studios (name, id, place id). With several Studios open, wrong-place writes come from a wrong id: re-list and check the place before mutating.
  • get_studio_state first. A playtest you didn't start is the user's: don't stop it. Server/Client contexts exist only during play; Edit writes don't reach a running playtest.
  • execute_luau freezes Studio until it yields and the connection can drop. Chunk heavy work (~1,000 items) with one task.wait() per chunk; build each chunk outside the DataModel and parent it per chunk (a .Parent write costs the whole subtree).
  • Stateless, with its own require cache. Nothing persists between calls (_G, spawned loops die on return). In Server/Client, requiring a started service returns a fresh unstarted copy: read state through instances and attributes, fire existing remotes. Edit mode caches require for the session: require(m:Clone()) after a re-sync (field-observed).
  • A bare Unknown error may still have run (one started a map-wide rebuild). Read the target back before any retry; never blind-retry a mutation after a timeout.
  • Source over 200,000 chars is refused with only Unknown error: split generated data into ~180 KB child modules (field-observed).
  • In a Rojo or Script Sync project, files own the code. multi_edit changes only Studio and the next sync overwrites it: edit files on disk, use MCP to inspect, run and playtest (roblox-tooling).
  • Captures lie when Studio isn't rendering (minimised, covered, display off): black/grey frames, PreRender stops, ProximityPrompts never show, the Device Simulator reads 1x1. AlwaysOnTop BillboardGuis and CoreGui are missing. Never report a missing element from a capture alone (field-observed).
  • Device Simulator persists into new playtests; clicks arrive as touch. Set the device before Play. Taps don't map screenshot pixels: click at AbsolutePosition + AbsoluteSize / 2 plus GetGuiInset, and confirm with an InputBegan print.
  • No multi-client tool. For remotes, replication or co-op, use Studio Test -> Server & Clients and say what you didn't verify.
  • ChangeHistoryService:Undo() from MCP doesn't restore destroyed instances. Back up before destroying anything big (field-observed): MCP Luau can call SerializationService:SerializeInstancesAsync({...}) -> .rbxm buffer, and DeserializeInstancesAsync restores it (plugin/Open Cloud Luau only; Studio-verified 2026-11-29).
  • Store assets: a paid asset fails with "not authorized"; in a group place a free model failed until dragged in from the Toolbox. Inserted models are untrusted: inspect for scripts before you require anything.
  • Use Roblox's built-in skills for their areas (rbx-debug, rbx-perf-profiling, rbx-scene-analysis, rbx-unit-test, rbx-device-simulator-lua, rbx-network-simulator, rbx-configs-experimentation, rbx-instrument-analytics, rbx-docs-search, rbx-import-asset, rbx-open-cloud-usage, rbx-permissions, rbx-create-skill). The rbx- prefix is reserved; a custom skill with a built-in's name disables it.

1. Playtest loop

  1. Name the assertion a playtest answers that reading code can't; batch every runtime check for the change into one session.
  2. While stopped, add a temporary script that prints START/PASS/FAIL markers.
  3. start_stop_play(true), then get_studio_state until the Server/Client you need exists; use execute_luau there for live state, input tools to act.
  4. Poll get_console_output for the marker with a timeout; print per-phase summary lines, not per-frame spam.
  5. Stop, confirm with get_studio_state (a stop that doesn't take is a known failure: report it), delete the temp script, report status and the log tail.

Solo Play runs edit, server and client in one process: a heavy server rebuild can stall the client (roblox-performance). Playtests work across teleports within the experience, without publishing.

2. Open Cloud with no API key

open_cloud_invoke(method, endpoint, body?, scopes?, files?) calls https://apis.roblox.com with a Studio-managed token. Use it for uploads, developer products, game passes, settings, place versions, thumbnails, bans, secrets and analytics reads. Needs a place in a published game you can manage.

  • The user grants permissions, per person and per game: MCP -> MCP Permissions (bottom-right) or Assistant settings. Levels: Safe, Balanced (default), Full access, Custom. The client can't grant itself anything. Applies to external clients, not Assistant.
  • Sections: Look at your game (universe:read, analytics), Edit your game (universe:write, universe.place:write, publish, restart servers), Players & social, Save & load data, Connect to the internet (Network + domain allowlist), Publish & manage assets (asset:*, universe-places:write, thumbnails), Money & monetization (developer-product:*, game-pass:*, ads), Player consequences (bans), Security & credentials (secrets, cloud Luau).
  • Not grantable: badges, universe-datastores.control:*, universe-datastores.objects:create, analytics alerts, legacy-*. Use an API key for those (roblox-cloud).
  • Errors: ungranted scope or 403 -> ask the user to enable it, never work around it; 401 -> retry once; 403/401 with the scope on -> the endpoint rejects the MCP token, use an API key or the Creator Dashboard.
  • Pass scopes for precise errors. Look the endpoint up with http_get on the docs first; load rbx-permissions, then rbx-open-cloud-usage.
  • Uploads: files (field fileContent for the Assets API) only from folders the user approved, up to 5 files of 20 MB, asset types only. Poll GET /assets/v1/operations/{id} until done. Uploads are permanent, owned by the game's owner (a group game uploads to the group), and Open Cloud can't delete them.
  • Data stores and memory stores go through execute_luau, not Open Cloud: enable the Save & load data scopes plus Game Settings -> Security -> Enable Studio Access to API Services. They are the live stores: writes change real player data.
  • Model import: rbx-import-asset checks triangle limits, uploads, waits for moderation, inserts, then fixes scale, rotation, textures and anchoring.
  • Money, consequences, security, universe:write and universe-places:write can cost Robux, hit players or change the live game: get a yes per action.

3. Shared Studio etiquette

  • The Studio is often the user's, in use. Ask before bringing it to the front, sending input or starting Play; without a yes, measure what focus doesn't affect.
  • Hand back clean: stop sessions you started; zero the Network Simulator (the default Ideal Fiber preset adds 8 ms each way); stop device simulation; restore cameras and time scale.

4. Around the MCP

  • Missing texture or mesh: read the Output error (asset privacy errors are clickable). A Restricted asset needs the experience granted on its Configure page; inserting it in Studio grants that permanently. Check child images of inserted models before re-uploading.
  • Studio CLI --task RunScript (--runScriptFile, --outputFile, --quitAfterExecution) runs headless checks without a visible Studio.