Quick Answer: How to Connect Claude to Roblox Studio
To connect Claude to Roblox Studio, you must use the native Model Context Protocol (MCP) server. Open Roblox Studio, navigate to File > Studio Settings > Assistant > MCP Servers, and toggle on “Enable Studio as MCP server.” Copy the generated JSON config, open the Claude Desktop app, navigate to Settings > Developer > Edit Config, and paste the JSON into your claude_desktop_config.json file. Restart Claude, and it will now be able to read, edit, and execute Luau scripts directly in your game.
The integration of AI into game development has completely shifted how creators approach scripting. By learning how to connect Claude to Roblox Studio, you can empower Anthropic’s flagship AI to generate game mechanics, debug Luau code, and even manipulate your 3D workspace. Because Roblox officially supports the Model Context Protocol (MCP), setting up this connection takes less than five minutes and requires zero third-party plugins.
Connecting Claude allows the AI to interact directly with your Studio environment.
Method 1: Connect Claude via Studio MCP Server (Recommended)
Roblox Studio has a built-in MCP server that communicates locally with AI clients using standard input/output streams (stdio transport). This is the safest, most robust way to use Claude for game development.
- Step 1: Enable the MCP Server. Open Roblox Studio and open any place. Navigate to File > Studio Settings (or Alt+S). Go to the Assistant tab, click on MCP Servers, and turn on the “Enable Studio as MCP server” toggle.
- Step 2: Copy the JSON. Once enabled, you will see a section labeled “Setup instructions.” Click the copy icon next to the JSON Configuration block.
- Step 3: Configure Claude Desktop. Open your Claude Desktop app. Go to Settings > Developer and click Edit Config. This opens
claude_desktop_config.json. - Step 4: Paste and Save. Paste the copied JSON inside the
"mcpServers"object and save the file. Ensure the command points to%LOCALAPPDATA%\\Roblox\\mcp.bat(on Windows). - Step 5: Verify Connection. Restart Claude Desktop. In the Developer settings, you should now see a green or blue indicator confirming that Roblox Studio is running and connected.
Method 2: Using HttpService to Connect In-Game APIs
If you want Claude to interact with players during live gameplay (such as an AI NPC), you cannot use the local MCP server. Instead, you must use Roblox’s HttpService.
- Enable HTTP Requests via Game Settings > Security > Allow HTTP Requests.
- Use a secure external proxy server (like Node.js or viaSocket) to securely host your Anthropic API Key.
- Use
HttpService:PostAsync()within your Luau script to send prompts to your proxy, which then forwards them to Claude’s API endpoints.
For a detailed breakdown on securing your API calls, read our complete Roblox Studio HttpService Security Guide.
Comparison: MCP Server vs. HttpService API
| Feature | Studio MCP Server | HttpService (API) |
|---|---|---|
| Primary Use Case | Generating code & building games | In-game features (AI NPCs) |
| Environment | Local (Roblox Studio only) | Live Servers (In-Game) |
| Cost | Requires Claude Pro Desktop | Pay-per-token API usage |
| Setup Difficulty | Beginner Friendly (Native) | Advanced (Requires Proxy) |
To learn more about model capabilities, check out the Official Anthropic Documentation.
FAQs : People Also Ask
Why does Claude Desktop say “Server Disconnected” for Roblox Studio?
If Claude Desktop shows a “Server disconnected” error, it is usually because Windows environment variables are failing to parse. To fix this, open your claude_desktop_config.json file and change %LOCALAPPDATA% in the args array to your absolute Windows path, such as C:\\Users\\YourName\\AppData\\Local\\Roblox\\mcp.bat. Ensure you use double backslashes.
Can Claude AI write Luau code directly into Roblox Studio?
Yes. Once you connect Claude Desktop or Cursor to the Roblox Studio MCP server, the AI can read your data model, write new scripts, run Luau code, insert models, and even initiate playtesting mode.
Do I need to use Rojo to connect Claude to Roblox?
No. While developers previously used Rojo to sync code between external IDEs (like VS Code or Cursor) and Roblox Studio, the official built-in MCP server introduced natively by Roblox bypasses the need for Rojo for direct AI client connections.
TL;DR: Connecting Claude & Roblox
- The standard method: Use the native Model Context Protocol (MCP) server built into Roblox Studio.
- Configuration: Toggle the MCP server in Assistant settings, copy the JSON, and paste it into Claude Desktop’s
claude_desktop_config.json. - Capabilities: Claude can write Luau code, insert 3D assets, and test games directly through the MCP connection.
- For Live Games: If you want AI features for your players (like smart NPCs), skip MCP and use
HttpServicevia a secure backend proxy. - Troubleshooting: Replace
%LOCALAPPDATA%with absolute file paths if Claude fails to connect.
