Skip to content

Commit 6f41a3a

Browse files
sync: update documentation sources (2026-03-04 18:53 UTC)
1 parent b1ed4cd commit 6f41a3a

2 files changed

Lines changed: 276 additions & 0 deletions

File tree

roblox/common/navigation/engine/studio.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ navigation:
1414
path: /assistant/guide
1515
- title: Prompt guide and examples
1616
path: /assistant/prompt-engineering
17+
- title: MCP Server
18+
path: /studio/mcp
1719
- heading: Building tools
1820
- title: Align
1921
path: /studio/align-tool

roblox/en-us/studio/mcp.md

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
---
2+
title: Connect to the Roblox Studio MCP Server
3+
description: Learn how to connect your AI coding tools to Roblox Studio, enabling them to read your game structure, edit scripts, insert models, execute code, and control play mode — all from natural language prompts.
4+
5+
---
6+
7+
The **Roblox Studio MCP Server** is built into Roblox Studio. It implements the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro), an open standard that lets AI tools securely communicate with external applications. Once connected, your AI assistant can interact directly with your open Studio session — exploring the DataModel, writing scripts, running Luau code, testing in play mode, and more.
8+
9+
This guide walks you through connecting the Studio MCP Server to popular AI clients. While the exact steps vary by client, the core concept is the same: you point your client at the Studio MCP Server binary and it handles the rest.
10+
11+
## Prerequisites
12+
13+
Before you begin, make sure you have:
14+
15+
- Roblox Studio installed and updated to the latest version
16+
- Your preferred MCP client installed (Claude Code, Claude Desktop, Cursor, VS Code, Antigravity, or others)
17+
18+
No additional downloads or plugins are required — the MCP server ships with Studio itself.
19+
20+
## Understanding the Studio MCP Server
21+
22+
The Studio MCP Server runs as a local process on your machine and communicates with your AI client via stdio transport (standard input/output). When your AI assistant wants to perform an action in Studio, it sends a request through this channel, and the server relays it to the Studio plugin.
23+
24+
The server provides tools for:
25+
26+
- Reading and editing scripts in your game
27+
- Exploring the game hierarchy, including searching instances, inspecting properties and attributes
28+
- Inserting models from the Roblox Marketplace
29+
- Executing Luau code directly in Studio
30+
- Controlling play mode, including starting, stopping, and running scripts with structured output
31+
- Reading console output for debugging
32+
- Generating materials
33+
34+
All actions flow through your AI client, which will typically ask for your approval before executing them.
35+
36+
<Alert severity = 'warning'>
37+
Security note: MCP clients can read and modify content in your open Roblox places. Only connect clients you trust. You can toggle MCP on/off at any time from the **Plugins** tab in Studio.
38+
</Alert>
39+
40+
## Enabling the MCP Server in Studio
41+
42+
Before connecting any external client, you need to turn on the MCP server inside Roblox Studio.
43+
44+
1. Open the **Assistant chat window** in Studio.
45+
2. Click the three dots (****) menu to open Assistant Settings.
46+
3. Select the MCP Servers tab in the left sidebar.
47+
4. Toggle on **Enable Studio as MCP server**.
48+
49+
Once enabled, the settings panel will display the JSON configuration and startup command you'll need for your client. When a client successfully connects, you'll see a green indicator showing the number of connected clients ("● 1 client connected").
50+
51+
## Connecting your client
52+
53+
Choose your client below and follow the setup instructions. Refer to the client's documentation if required.
54+
55+
### Claude Code
56+
57+
Claude Code is Anthropic's terminal-based coding agent. You register MCP servers using the `claude mcp add` command:
58+
59+
1. Open your terminal and run the following commands:
60+
1. macOS bash:
61+
62+
```bash
63+
claude mcp add --transport stdio Roblox_Studio -- \'/Applications/RobloxStudio.app/Contents/MacOS/StudioMcpServer' --stdio
64+
```
65+
66+
2. Windows bash:
67+
68+
```bash
69+
claude mcp add --transport stdio Roblox_Studio -- cmd /c "C:\Path\To\StudioMcpServer.exe" --stdio
70+
```
71+
72+
1. The `cmd /c` wrapper is required on native Windows (not WSL) to ensure the executable launches correctly. Without it, you may see "Connection closed" errors.
73+
2. Verify the connection in Claude Code
74+
1. In Claude Code, run `/mcp`.
75+
2. You should see `Roblox_Studio: connected` in the server list.
76+
77+
### Claude Desktop
78+
79+
Claude Desktop manages MCP servers through a JSON configuration file. Use the following steps to configure Roblox Studio MCP with Claude Desktop:
80+
81+
1. In Claude desktop, navigate to **Claude** > **Settings...**.
82+
2. Navigate to the **Developer** tab and select **Edit Config**.
83+
3. Add the server configuration.
84+
1. Add the following to your config file:
85+
1. macOS:
86+
87+
```json
88+
{
89+
"mcpServers": {
90+
"Roblox_Studio": {
91+
"command": "/Applications/RobloxStudio.app/Contents/MacOS/StudioMcpServer",
92+
"args": ["--stdio"]
93+
}
94+
}
95+
}
96+
```
97+
98+
1. Windows:
99+
100+
```json
101+
{
102+
"mcpServers": {
103+
"Roblox_Studio": {
104+
"command": "C:\\Path\\To\\StudioMcpServer.exe",
105+
"args": ["--stdio"]
106+
}
107+
}
108+
}
109+
```
110+
111+
4. Restart Claude Desktop by completely quitting and relaunching. On restart, you should see a MCP server indicator in the bottom-right corner of the chat input field.
112+
5. Click the hammer icon below the chat input to access your tools and verify Roblox Studio has been added.
113+
114+
### Visual Studio Code
115+
116+
VS Code supports MCP servers through mcp.json configuration files. Official Visual Studio Documentation is [here](https://code.visualstudio.com/docs/copilot/customization/mcp-servers). There are several options to connect to Roblox Studio MCP server:
117+
118+
<Alert severity = 'warning'>
119+
VS Code uses "servers" as its top-level key, not "mcpServers".
120+
</Alert>
121+
122+
#### Workspace configuration
123+
124+
Connect Roblox Studio MCP on a per-workspace basis:
125+
126+
1. Create `.vscode/mcp.json` in your project root.
127+
2. Add the following:
128+
129+
```json
130+
{
131+
"servers": {
132+
"Roblox_Studio": {
133+
"command": "/Applications/RobloxStudio.app/Contents/MacOS/StudioMcpServer",
134+
"args": ["--stdio"]
135+
}
136+
}
137+
}
138+
```
139+
140+
3. Include this file in source control to share it with your team.
141+
142+
#### Global configuration
143+
144+
Connect Roblox Studio on a global basis:
145+
146+
1. Open the Command Palette (<kbd>Cmd</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>).
147+
2. Run **MCP: Open User Configuration**.
148+
3. Add the same server entry to the opened `mcp.json` file.
149+
150+
#### Command Palette
151+
152+
Connect Roblox Studio MCP using the Command Palette:
153+
154+
1. Open the Command Palette.
155+
2. Run **MCP: Add Server…**.
156+
3. Select **Command (stdio)** as the type.
157+
4. Enter the full path to `StudioMcpServer`
158+
5. Add `--stdio` as an argument.
159+
160+
#### Verify
161+
162+
Open GitHub Copilot Chat, switch to **Agent Mode**, and click the **Tools** icon. Confirm that Roblox Studio tools appear in the list.
163+
164+
### Cursor
165+
166+
Cursor supports MCP servers through its settings UI or by editing `mcp.json` directly.
167+
168+
#### Edit settings
169+
170+
1. Go to **File** > **Preferences** > **Cursor Settings**.
171+
2. Select **MCP** in the sidebar.
172+
3. Click **Add new global MCP server**.
173+
4. Paste the JSON configuration used in [edit config files](#edit-config-files).
174+
175+
#### Edit config files
176+
177+
1. Open `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project-level)
178+
2. Add the following json:
179+
180+
```json
181+
{
182+
"mcpServers": {
183+
"Roblox_Studio": {
184+
"command": "/Applications/RobloxStudio.app/Contents/MacOS/StudioMcpServer",
185+
"args": ["--stdio"]
186+
}
187+
}
188+
}
189+
```
190+
191+
#### Verify
192+
193+
In **Cursor Settings** > **MCP**, the server should show a green status indicator. You can also confirm tools are available in Agent Mode.
194+
195+
### Google Antigravity
196+
197+
Antigravity supports MCP servers through its built-in MCP store and raw config editor:
198+
199+
1. Click the three dots (**…**) at the top of the Agent pane and select **MCP Servers**.
200+
2. Click **Manage MCP Servers** > **View raw config**. This opens the `mcp_config.json` file:
201+
1. macOS: `~/.gemini/antigravity/mcp_config.json`
202+
2. Windows: `C:\Users\<USERNAME>\.gemini\antigravity\mcp_config.json`
203+
3. Add the server:
204+
205+
```json
206+
{
207+
"mcpServers": {
208+
"Roblox_Studio": {
209+
"command": "/Applications/RobloxStudio.app/Contents/MacOS/StudioMcpServer",
210+
"args": ["--stdio"]
211+
}
212+
}
213+
}
214+
```
215+
216+
4. Refresh the MCP Servers panel and verify Roblox Studio tools appears in the active tools list.
217+
218+
### Other MCP clients
219+
220+
The Studio MCP Server works with any client that supports stdio transport. The configuration is always the same pattern:
221+
222+
```json
223+
{
224+
"mcpServers": {
225+
"Roblox_Studio": {
226+
"command": "/Applications/RobloxStudio.app/Contents/MacOS/StudioMcpServer",
227+
"args": ["--stdio"]
228+
}
229+
}
230+
}
231+
```
232+
233+
Consult your client's documentation for where to place the configuration, then add a server entry with the command and argument above. Restart the client to load the new configuration.
234+
235+
## Verifying your setup
236+
237+
After configuring any client, follow these steps to confirm everything is working:
238+
239+
1. Open Roblox Studio and open a place file.
240+
2. Check the Plugins tab — verify the MCP plugin icon is visible.
241+
3. Check the Output console — look for "The MCP Studio plugin is ready for prompts".
242+
4. Open your MCP client and try a prompt like: `What Roblox Studio tools do you have access to?`.
243+
244+
<Alert severity='success'>
245+
Now that you're connected, try these prompts to explore what the Studio MCP Server can do:
246+
- "Create a part that changes color when touched" — writes a script and inserts it into your game
247+
- "Find all scripts that use deprecated APIs" — searches your codebase
248+
- "Run my game and check for errors in the output" — starts play mode and reads the console
249+
- "Insert a tree model from the marketplace" — searches and inserts a model
250+
</Alert>
251+
252+
## Troubleshooting
253+
254+
### Server not showing up or tools not appearing
255+
256+
1. Restart both Roblox Studio and your MCP client completely.
257+
2. Verify the binary path is correct and the file exists.
258+
3. Check your JSON syntax — a missing comma or bracket will silently break the config.
259+
260+
### Connection closed errors (Windows)
261+
262+
Windows requires a `cmd /c` wrapper for some executables. Try the following JSON:
263+
264+
```json
265+
{
266+
"mcpServers": {
267+
"Roblox_Studio": {
268+
"command": "cmd",
269+
"args": ["/c", "C:\\Path\\To\\StudioMcpServer.exe", "--stdio"]
270+
}
271+
}
272+
}
273+
274+
```

0 commit comments

Comments
 (0)