Connects Roblox Studio to AI coding editors via the Model Context Protocol, allowing AI agents to understand and interact with live Roblox Studio sessions through scene manipulation, scripting, and optional Roblox Open Cloud API integration.
Connects Roblox Studio to AI coding editors (like Cursor, Windsurf, Claude, etc) via the Model Context Protocol (MCP), enabling AI-assisted game development within your Roblox Studio environment.
This project consists of two main parts:
roblox_mcp_plugin/src/Plugin.server.lua
) that runs inside Studio. It polls the local Python server for commands, executes them in the Studio context (manipulating instances, reading properties, executing Luau), and sends results and Studio logs back to the server.This allows an AI agent connected via MCP to understand and interact with your live Roblox Studio session.
1. Prerequisites:
uv
package manager (Install uv). This is highly recommended for faster dependency management.2. Clone the Repository:
git clone https://github.com/majidmanzarpour/vibe-blocks-mcp cd vibe-blocks-mcp
3. Install Dependencies:
Using uv
(recommended):
uv pip sync pyproject.toml
Alternatively, using pip
:
pip install -r requirements.lock # Or create requirements.txt from pyproject.toml if needed
4. Configure Environment (Optional - For Cloud Features):
cp .env.example .env
.env
file:
"YOUR_API_KEY_HERE"
with your Roblox API Key.0
for ROBLOX_UNIVERSE_ID
with your Universe ID.0
for ROBLOX_PLACE_ID
with the target Place ID..env
file. The server will still run, but Cloud-related tools will return an error.5. Install the Companion Plugin in Roblox Studio:
roblox_mcp_plugin
directory in your terminal and run:
This will create arojo build default.project.json --output VibeBlocksMCP_Companion.rbxm
VibeBlocksMCP_Companion.rbxm
file or you can use the one provided in the repository.%LOCALAPPDATA%\Roblox\Plugins
~/Documents/Roblox/Plugins
(You might need to use Cmd+Shift+G
in Finder and paste the path to navigate there, or click Plugin Folder in Roblox Studio).VibeBlocksMCP_Companion.rbxm
file into this plugins folder.http://localhost:8000/plugin_command
. If you change the server port, you'll need to update the SERVER_URL
variable at the top of the Lua script (roblox_mcp_plugin/src/Plugin.server.lua
) and rebuild the plugin.6. Run the Python Server:
chmod +x server.sh
./server.sh
uvicorn
if needed, and log that it's running on http://localhost:8000
.7. Connect from MCP Client (e.g., Cursor):
File > Settings > MCP
(or Code > Settings > MCP
on Mac).http://localhost:8000/sse
(make sure to include the trailing /sse
).{
"mcpServers": {
"Vibe Blocks MCP": {
"url": "http://localhost:8000/sse"
}
}
}
Once the server is running, the plugin is installed in Studio, and your MCP client is connected, you can interact with your Studio session through the AI.
Address the agent (@-mentioning the tools if your client requires it, e.g., list_children
) and ask it to perform actions.
Example Prompts:
print(game:GetService('Lighting').ClockTime)
"ClockTime
property of Lighting to 14."(Tools interact either directly with the Studio Plugin or with Roblox Open Cloud APIs)
Studio Plugin Tools (Live Interaction):
get_property
: Retrieves the value of a specific property from an object in Studio.list_children
: Retrieves direct children of an object in Studio.find_instances
: Finds instances within a specified root based on class name or name containing text in Studio.create_instance
: Creates a new instance (Part, Model, Script, etc.) in Studio.delete_instance
: Deletes an object from the Studio scene.set_property
: Sets a specific property on an object in Studio (uses JSON string for value).set_primary_part
: Sets the PrimaryPart property of a Model.move_instance
: Moves an object (Model or BasePart) to a new position in Studio.clone_instance
: Clones an existing object in Studio.create_script
: Creates a new Script or LocalScript instance with provided code in Studio.edit_script
: Edits the source code of an existing Script or LocalScript in Studio.delete_script
: Deletes an existing Script or LocalScript instance in Studio.set_environment
: Sets properties on environment services (Lighting or Terrain) in Studio.spawn_npc
: Spawns an NPC in Studio, either by inserting a model from asset ID or cloning an existing template model.play_animation
: Loads and plays an animation on a target object's Humanoid or AnimationController in Studio.execute_luau_in_studio
: Executes arbitrary Luau script in the LIVE Studio session via the plugin and captures output/return values/errors.modify_children
: Finds direct children under a parent matching optional filters (name/class) and sets a specified property on them.get_studio_logs
: Retrieves the most recent logs captured from the Roblox Studio Output window via the plugin.Open Cloud API Tools (Optional - Require .env
setup):
execute_luau_in_cloud
: Executes arbitrary Luau script via the Roblox Cloud API (runs in a separate cloud environment, not live Studio).list_datastores_in_cloud
: Lists standard datastores via the Cloud API.get_datastore_value_in_cloud
: Gets the value of an entry from a standard datastore via the Cloud API.set_datastore_value_in_cloud
: Sets the value for an entry in a standard datastore via the Cloud API.delete_datastore_value_in_cloud
: Deletes an entry from a standard datastore via the Cloud API.upload_asset_via_cloud
: Uploads a file from the local system as a new Roblox asset via the Cloud API.publish_place_via_cloud
: Publishes the specified place via the Cloud API.get_asset_details_via_cloud
: (Not Implemented) Gets details about a specific asset via the Cloud API.list_user_assets_via_cloud
: (Not Implemented) Lists assets owned by the authenticated user via the Cloud API.send_chat_via_cloud
: Sends a message to the in-game chat via the Cloud API (execute_luau).teleport_player_via_cloud
: Teleports a player via the Cloud API (execute_luau).Internal/Queueing Tools:
queue_studio_command
: (Lower-level) Queues a single raw command dictionary for the Studio plugin.queue_studio_command_batch
: (Lower-level) Queues a batch of raw command dictionaries for the Studio plugin.uv
are installed correctly. Check terminal for error messages. Make sure dependencies are installed (uv pip sync pyproject.toml
).SERVER_URL
in the Lua plugin script matches the server address and port (default http://localhost:8000/plugin_command
). Check Studio's Output window for errors from the plugin script.http://localhost:8000/sse
) is entered correctly in your MCP client settings..env
file with a valid API Key, Universe ID, and Place ID. Ensure your API key has the necessary permissions for the specific Cloud APIs you are trying to use.Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!