Initial commit: Roblox Studio MCP Server for Claude Code

- MCP server with 12 tools for Roblox manipulation
- WebSocket communication with Roblox Studio
- Create scripts, parts, models, GUIs
- Execute Lua code, control playtest
- Full documentation and examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
admin
2026-01-29 00:38:36 +04:00
Unverified
commit 9c44cb514f
12 changed files with 3535 additions and 0 deletions

44
examples/demo_game.lua Normal file
View File

@@ -0,0 +1,44 @@
-- Example: Simple Obby Game
-- This demonstrates creating a complete mini-game using Claude + MCP
-- 1. Create starting platform
local startPart = Instance.new("Part")
startPart.Name = "StartPlatform"
startPart.Size = Vector3.new(20, 1, 20)
startPart.Position = Vector3.new(0, 1, 0)
startPart.Anchored = true
startPart.BrickColor = BrickColor.new("Bright green")
startPart.Parent = workspace
-- 2. Create checkpoint platforms
local colors = {"Bright red", "Bright orange", "Bright yellow", "Bright blue", "Bright violet"}
for i = 1, 5 do
local platform = Instance.new("Part")
platform.Name = "Checkpoint" .. i
platform.Size = Vector3.new(10, 1, 10)
platform.Position = Vector3.new(0, i * 15, i * 20)
platform.Anchored = true
platform.BrickColor = BrickColor.new(colors[i])
platform.Parent = workspace
end
-- 3. Create kill brick (lava)
local lava = Instance.new("Part")
lava.Name = "Lava"
lava.Size = Vector3.new(100, 1, 200)
lava.Position = Vector3.new(0, -5, 50)
lava.Anchored = true
lava.BrickColor = BrickColor.new("Bright red")
lava.Material = Enum.Material.Neon
lava.Parent = workspace
-- 4. Spawn location
local spawn = Instance.new "SpawnLocation"
spawn.Name = "SpawnLocation"
spawn.Size = Vector3.new(8, 1, 8)
spawn.Position = Vector3.new(0, 1, 0)
spawn.Anchored = true
spawn.Transparency = 1
spawn.Parent = workspace
print("Obby game created! Press Play to test.")

View File

@@ -0,0 +1,12 @@
-- Example: Spinning Part Script
-- Put this in a Script inside a Part to make it spin
local part = script.Parent
while true do
-- Rotate the part
part.CFrame = part.CFrame * CFrame.Angles(0, math.rad(5), 0)
-- Wait for the next frame
task.wait()
end

48
examples/start_button.lua Normal file
View File

@@ -0,0 +1,48 @@
-- Example: Simple Start Button GUI
-- Creates a ScreenGui with a clickable button
-- Create ScreenGui
local screenGui = Instance.new("ScreenGui")
screenGui.Name = "StartGameGui"
screenGui.Parent = game:GetService("StarterGui")
-- Create main frame
local frame = Instance.new("Frame")
frame.Name = "MainFrame"
frame.Size = UDim2.new(0, 400, 0, 300)
frame.Position = UDim2.new(0.5, -200, 0.5, -150)
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
frame.Parent = screenGui
-- Create title
local title = Instance.new("TextLabel")
title.Name = "Title"
title.Size = UDim2.new(1, 0, 0, 100)
title.Position = UDim2.new(0, 0, 0, 50)
title.BackgroundTransparency = 1
title.Text = "MY AWESOME GAME"
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.TextScaled = true
title.Font = Enum.Font.GothamBold
title.Parent = frame
-- Create start button
local startButton = Instance.new("TextButton")
startButton.Name = "StartButton"
startButton.Size = UDim2.new(0, 200, 0, 50)
startButton.Position = UDim2.new(0.5, -100, 0, 150)
startButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
startButton.TextColor3 = Color3.fromRGB(255, 255, 255)
startButton.Text = "START GAME"
startButton.TextScaled = true
startButton.Font = Enum.Font.GothamBold
startButton.Parent = frame
-- Button click handler
startButton.MouseButton1Click:Connect(function()
print("Start button clicked!")
screenGui:Destroy() -- Remove the GUI
-- Add your game start logic here
end)
print("Start button GUI created in StarterGui!")