# Roblox MCP Connection Helper # This script helps set up the Roblox MCP connection Write-Host "=== Roblox MCP Connection Helper ===" -ForegroundColor Cyan Write-Host "" # Check if Roblox Studio is running $robloxProcess = Get-Process | Where-Object {$_.Name -like "*RobloxStudio*"} if ($robloxProcess) { Write-Host "✓ Roblox Studio is running (PID: $($robloxProcess.Id))" -ForegroundColor Green } else { Write-Host "✗ Roblox Studio is NOT running" -ForegroundColor Red Write-Host " Please start Roblox Studio first" -ForegroundColor Yellow exit 1 } Write-Host "" Write-Host "=== Setup Instructions ===" -ForegroundColor Cyan Write-Host "" Write-Host "1. In Roblox Studio, go to:" -ForegroundColor White Write-Host " File → Game Settings → Security" -ForegroundColor Yellow Write-Host "" Write-Host "2. Enable BOTH options:" -ForegroundColor White Write-Host " ☑ Enable Studio Access to API Services" -ForegroundColor Yellow Write-Host " ☑ Allow HTTP Requests" -ForegroundColor Yellow Write-Host "" Write-Host "3. Click Save" -ForegroundColor Yellow Write-Host "" Write-Host "4. In Explorer → ServerScriptService → Right-click → Insert Object → Script" -ForegroundColor White Write-Host "" Write-Host "5. Copy the script below and paste it into the Script:" -ForegroundColor White Write-Host "" # Read the script file $scriptPath = "C:\Users\Admin\roblox-mcp-server\roblox-plugin\RobloxMCPServer_HTTP.lua" if (Test-Path $scriptPath) { $scriptContent = Get-Content $scriptPath -Raw # Copy to clipboard Set-Clipboard -Value $scriptContent Write-Host " [SCRIPT COPIED TO CLIPBOARD]" -ForegroundColor Green Write-Host " Just paste it in Roblox Studio (Ctrl+V)" -ForegroundColor Green Write-Host "" } else { Write-Host " ✗ Script file not found: $scriptPath" -ForegroundColor Red } Write-Host "6. Press Play (green ▶ button) in Roblox Studio" -ForegroundColor White Write-Host "" Write-Host "7. You should see: [RobloxMCP] Starting Roblox MCP Server" -ForegroundColor Green Write-Host "" # Check MCP server status Write-Host "=== Checking MCP Server ===" -ForegroundColor Cyan try { $response = Invoke-RestMethod -Uri "http://127.0.0.1:37423/health" -TimeoutSec 2 Write-Host "✓ MCP Server is running" -ForegroundColor Green Write-Host " Status: $($response.status)" -ForegroundColor White Write-Host " Connected: $($response.studioConnected)" -ForegroundColor White } catch { Write-Host "✗ MCP Server is NOT responding" -ForegroundColor Red Write-Host " Make sure to run: npm start" -ForegroundColor Yellow } Write-Host "" Write-Host "Press any key to check connection again..." -ForegroundColor Cyan $null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") # Re-check try { $response = Invoke-RestMethod -Uri "http://127.0.0.1:37423/health" -TimeoutSec 2 if ($response.studioConnected -or $response.pendingCommands -gt 0) { Write-Host "" Write-Host "✓✓✓ ROBLOX STUDIO IS CONNECTED! ✓✓✓" -ForegroundColor Green Write-Host "" Write-Host "You can now ask Claude to create things in Roblox!" -ForegroundColor Cyan } else { Write-Host "" Write-Host "Still waiting for connection..." -ForegroundColor Yellow Write-Host "Make sure you pressed Play in Roblox Studio!" -ForegroundColor Yellow } } catch { Write-Host "✗ Cannot reach MCP server" -ForegroundColor Red }