MCP ExplorerExplorer

Robloxstudio Mcp

@boshyxdon 10 days ago
5ย MIT
FreeCommunity
AI Systems
A powerful MCP server for AI access to Roblox Studio projects with 18 tools.

Overview

What is Robloxstudio Mcp

robloxstudio-mcp is a powerful MCP (Model Context Protocol) server designed to provide AI assistants with comprehensive access to Roblox Studio projects. It enables users to explore game architecture, analyze scripts, debug issues, and understand complex Roblox projects through 18 specialized AI tools, including mass operations for bulk editing.

Use cases

Use cases for robloxstudio-mcp include: 1) Analyzing and debugging scripts in Roblox games; 2) Performing bulk edits on game assets; 3) Understanding complex game architectures; 4) Streamlining the development process with AI tools; 5) Enhancing collaboration between developers and AI assistants.

How to use

To use robloxstudio-mcp, you can quickly set it up with a single command for Claude Code users: claude mcp add robloxstudio -- npx -y robloxstudio-mcp. For other MCP clients, configure it in your MCP server settings. Additionally, a companion Roblox Studio plugin must be installed, which can be done via the Roblox Creator Store or manually downloading the plugin file.

Key features

Key features of robloxstudio-mcp include: 1) Comprehensive access to Roblox Studio projects; 2) 18 specialized AI tools for various tasks; 3) Mass operations for bulk editing; 4) Dual-component system that connects Roblox Studio with AI assistants; 5) Easy setup through a plugin.

Where to use

robloxstudio-mcp is primarily used in game development environments, specifically within Roblox Studio. It is ideal for developers and designers looking to enhance their workflow with AI assistance while working on Roblox projects.

Content

Roblox Studio MCP Server

A powerful MCP (Model Context Protocol) server that gives AI assistants comprehensive access to Roblox Studio projects. Explore game architecture, analyze scripts, debug issues, and understand complex Roblox projects through 18 specialized AI tools including mass operations for bulk editing.

Roblox Studio Server MCP server

โšก Quick Start (One Command)

For Claude Code users:

claude mcp add robloxstudio -- npx -y robloxstudio-mcp

For other MCP clients (Claude Desktop, etc.):

{
  "mcpServers": {
    "robloxstudio-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "robloxstudio-mcp"
      ],
      "description": "Advanced Roblox Studio integration for AI assistants"
    }
  }
}

๐Ÿ”Œ Studio Plugin Setup (Required)

The MCP server requires a companion Roblox Studio plugin:

  1. Roblox Creator Store (Easiest โญ):

  2. Manual download:

    • Download MCPPlugin.rbxmx
    • Save to your %LOCALAPPDATA%/Roblox/Plugins folder
  3. Advanced setup:

After installation:

  • โœ… Enable โ€œAllow HTTP Requestsโ€ in Game Settings โ†’ Security
  • ๐Ÿ”˜ Click the โ€œMCP Serverโ€ button in the Plugins toolbar
  • ๐ŸŸข Status should show โ€œConnectedโ€ when working

๐Ÿ—๏ธ Architecture Overview

This is a dual-component system bridging Roblox Studio with AI assistants:

%%{init: {'theme':'dark', 'themeVariables': {'primaryColor':'#2d3748', 'primaryTextColor':'#ffffff', 'primaryBorderColor':'#4a5568', 'lineColor':'#718096', 'sectionBkgColor':'#1a202c', 'altSectionBkgColor':'#2d3748', 'gridColor':'#4a5568', 'secondaryColor':'#2b6cb0', 'tertiaryColor':'#319795'}}}%%
graph TB
    subgraph AI_ENV ["๐Ÿค– AI Environment"]
        AI["๐Ÿค– AI Assistant<br/>Claude Code/Desktop"]
        MCP["๐Ÿ“ก MCP Server<br/>Node.js + TypeScript"]
    end
    
    subgraph COMM_LAYER ["๐Ÿ”— Communication Layer"]
        HTTP["๐ŸŒ HTTP Bridge<br/>localhost:3002"]
        QUEUE["๐Ÿ“‹ Request Queue<br/>UUID tracking"]
    end
    
    subgraph STUDIO_ENV ["๐ŸŽฎ Roblox Studio Environment"]
        PLUGIN["๐ŸŽฎ Studio Plugin<br/>Luau Script"]
        STUDIO["๐ŸŽฏ Roblox Studio<br/>APIs & Data"]
    end
    
    subgraph TOOLS ["๐Ÿ› ๏ธ 18 AI Tools"]
        FILE["๐Ÿ“ File System<br/>Trees, Search"]
        CONTEXT["๐ŸŽฏ Studio Context<br/>Services, Objects"]
        PROPS["๐Ÿ” Properties<br/>Get, Set, Mass Ops"]
        CREATE["๐Ÿ—๏ธ Object Creation<br/>Single, Mass, Properties"]
        PROJECT["๐Ÿข Project Analysis<br/>Smart Structure"]
    end
    
    AI -->|stdio| MCP
    MCP -->|HTTP POST| HTTP
    HTTP -->|Queue Request| QUEUE
    PLUGIN -->|Poll every 500ms| HTTP
    HTTP -->|Pending Work| PLUGIN
    PLUGIN -->|Execute APIs| STUDIO
    STUDIO -->|Return Data| PLUGIN
    PLUGIN -->|HTTP Response| HTTP
    HTTP -->|Resolve Promise| MCP
    MCP -->|Tool Result| AI
    
    MCP -.->|Exposes| FILE
    MCP -.->|Exposes| CONTEXT  
    MCP -.->|Exposes| PROPS
    MCP -.->|Exposes| CREATE
    MCP -.->|Exposes| PROJECT
    
    classDef aiStyle fill:#1e40af,stroke:#3b82f6,stroke-width:2px,color:#ffffff
    classDef mcpStyle fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:#ffffff
    classDef httpStyle fill:#ea580c,stroke:#f97316,stroke-width:2px,color:#ffffff
    classDef pluginStyle fill:#059669,stroke:#10b981,stroke-width:2px,color:#ffffff
    classDef studioStyle fill:#dc2626,stroke:#ef4444,stroke-width:2px,color:#ffffff
    classDef toolStyle fill:#0891b2,stroke:#06b6d4,stroke-width:2px,color:#ffffff
    
    class AI aiStyle
    class MCP mcpStyle
    class HTTP,QUEUE httpStyle
    class PLUGIN pluginStyle
    class STUDIO studioStyle
    class FILE,CONTEXT,PROPS,CREATE,PROJECT toolStyle

Key Components:

  • ๐Ÿง  MCP Server (Node.js/TypeScript) - Exposes 18 tools via stdio for AI integration
  • ๐Ÿ”— HTTP Bridge - Request/response queue on localhost:3002 with 30s timeouts
  • ๐ŸŽฎ Studio Plugin (Luau) - Polls every 500ms, executes Studio API calls, handles errors
  • ๐Ÿ“Š Smart Caching - Efficient data transfer with intelligent response limiting

๐Ÿ› ๏ธ 18 Powerful AI Tools

๐Ÿ“ File System Tools

  • get_file_tree - Complete project hierarchy with scripts, models, folders
  • search_files - Find files by name, type, or content patterns

๐ŸŽฏ Studio Context Tools

  • get_place_info - Place ID, name, game settings, workspace info
  • get_services - All Roblox services and their child counts
  • search_objects - Find instances by name, class, or properties

๐Ÿ” Instance & Property Tools

  • get_instance_properties - Complete property dump for any object
  • get_instance_children - Child objects with metadata (scripts, GUI types, etc.)
  • search_by_property - Find objects with specific property values
  • get_class_info - Available properties/methods for Roblox classes

โšก Property Modification Tools

  • set_property - Set a property on any Roblox instance
  • mass_set_property - ๐Ÿ†• NEW! Set the same property on multiple instances at once
  • mass_get_property - ๐Ÿ†• NEW! Get the same property from multiple instances at once

๐Ÿ—๏ธ Object Creation Tools

  • create_object - Create a new Roblox object instance (basic)
  • create_object_with_properties - ๐Ÿ†• NEW! Create objects with initial properties
  • mass_create_objects - ๐Ÿ†• NEW! Create multiple objects at once (basic)
  • mass_create_objects_with_properties - ๐Ÿ†• NEW! Create multiple objects with properties
  • delete_object - Delete a Roblox object instance

๐Ÿข Project Analysis Tools

  • get_project_structure - ๐Ÿ”ฅ ENHANCED! Smart hierarchy with improved depth control (recommended: depth 5-10)

โš ๏ธ Note: Previous tools like get_file_content, get_file_properties, get_selection, get_dependencies, and validate_references have been removed. Use Rojo/Argon workflows or file system reading for better performance.

๐Ÿง  AI-Optimized Features

๐Ÿš€ Mass Operations (NEW in v1.3.0)

  • Bulk Property Editing: Set the same property on hundreds of instances instantly
  • Mass Object Creation: Create complex object hierarchies with one call
  • Batch Property Reading: Get properties from multiple objects efficiently
  • Atomic Operations: All mass operations are grouped into single undo/redo waypoints

Example Use Cases:

// Set all parts in workspace to red
mass_set_property(["game.Workspace.Part1", "game.Workspace.Part2"], "BrickColor", "Really red")

// Create 10 parts with properties
mass_create_objects_with_properties([
  {className: "Part", parent: "game.Workspace", name: "RedPart", properties: {BrickColor: "Really red"}},
  {className: "Part", parent: "game.Workspace", name: "BluePart", properties: {BrickColor: "Really blue"}}
])

Smart Project Structure

  • Service Overview Mode: Clean service list with child counts
  • Path-based Exploration: get_project_structure("game.ServerStorage", maxDepth=5)
  • Script-only Filtering: scriptsOnly=true for code analysis
  • Intelligent Grouping: Large folders auto-group by class type
  • Enhanced Depth Control: Recommended maxDepth=5-10 for comprehensive exploration

Rich Metadata

  • Script Status: Enabled/disabled, source detection, script types
  • GUI Intelligence: Text content, visibility, container vs interactive
  • Performance Optimized: Removed redundant tools for faster operation

๐Ÿš€ Development & Testing

Commands

npm run dev         # Development server with hot reload  
npm run build       # Production build
npm start           # Run built server
npm run lint        # ESLint code quality
npm run typecheck   # TypeScript validation

Plugin Development

  • Live reload: Plugin updates automatically detect server changes
  • Error handling: Robust timeout and retry mechanisms
  • Debug mode: Detailed logging in Studio Output window
  • Connection status: Visual indicators in plugin UI

๐Ÿ“Š Communication Protocol

%%{init: {'theme':'dark', 'themeVariables': {'primaryColor':'#2d3748', 'primaryTextColor':'#ffffff', 'primaryBorderColor':'#4a5568', 'lineColor':'#10b981', 'sectionBkgColor':'#1a202c', 'altSectionBkgColor':'#2d3748', 'gridColor':'#4a5568', 'secondaryColor':'#3b82f6', 'tertiaryColor':'#8b5cf6', 'background':'#1a202c', 'mainBkg':'#2d3748', 'secondBkg':'#374151', 'tertiaryColor':'#6366f1'}}}%%
sequenceDiagram
    participant AI as ๐Ÿค– AI Assistant
    participant MCP as ๐Ÿ“ก MCP Server  
    participant HTTP as ๐ŸŒ HTTP Bridge
    participant PLUGIN as ๐ŸŽฎ Studio Plugin
    participant STUDIO as ๐ŸŽฏ Roblox Studio
    
    Note over AI,STUDIO: ๐Ÿš€ Tool Request Flow
    
    AI->>+MCP: Call tool (e.g., get_file_tree)
    MCP->>+HTTP: Queue request with UUID
    HTTP->>HTTP: Store in pending requests map
    HTTP-->>-MCP: Request queued โœ…
    
    Note over PLUGIN: ๐Ÿ”„ Polling every 500ms
    PLUGIN->>+HTTP: GET /poll
    HTTP->>-PLUGIN: Return pending request + UUID
    
    PLUGIN->>+STUDIO: Execute Studio APIs
    Note over STUDIO: ๐ŸŽฏ game.ServerStorage<br/>๐Ÿ“‹ Selection:Get()<br/>๐Ÿ” Instance properties
    STUDIO->>-PLUGIN: Return Studio data ๐Ÿ“Š
    
    PLUGIN->>+HTTP: POST /response with UUID + data
    HTTP->>-MCP: Resolve promise with data
    MCP->>-AI: Return tool result ๐ŸŽ‰
    
    Note over AI,STUDIO: โš ๏ธ Error Handling
    
    alt Request Timeout (30s)
        HTTP->>MCP: Reject promise with timeout โฐ
        MCP->>AI: Return error message โŒ
    end
    
    alt Plugin Disconnected
        PLUGIN->>HTTP: Connection lost ๐Ÿ”Œ
        HTTP->>HTTP: Exponential backoff retry ๐Ÿ”„
        Note over PLUGIN: Status: "Waiting for server..." โณ
    end

Features:

  • ๐Ÿ• 30-second timeouts with exponential backoff
  • ๐Ÿ”„ Automatic retries for network issues
  • ๐Ÿ“ Response limiting prevents context overflow
  • ๐ŸŽฏ Request deduplication for efficiency

๐ŸŽฏ Example Usage

// Get service overview
get_project_structure()

// Explore weapons folder
get_project_structure("game.ServerStorage.Weapons", maxDepth=2)

// Find all Sound objects  
search_by_property("ClassName", "Sound")

// Check script dependencies
get_dependencies("game.ServerScriptService.MainScript")

// Find broken references
validate_references()

// Get UI component details
get_instance_properties("game.StarterGui.MainMenu.SettingsFrame")

๐Ÿ”ง Configuration

Environment Variables:

  • MCP_SERVER_PORT - MCP server port (default: stdio)
  • HTTP_SERVER_PORT - HTTP bridge port (default: 3002)
  • PLUGIN_POLL_INTERVAL - Plugin poll frequency (default: 500ms)
  • REQUEST_TIMEOUT - Request timeout (default: 30000ms)

Studio Settings:

  • โœ… Allow HTTP Requests (Game Settings โ†’ Security)
  • ๐ŸŒ HttpService.HttpEnabled = true
  • ๐Ÿ”Œ Plugin activated via toolbar button

๐Ÿ“‹ Changelog

v1.3.0 - Mass Operations Update (Latest)

  • โž• NEW: mass_set_property - Bulk property modification
  • โž• NEW: mass_get_property - Batch property reading
  • โž• NEW: create_object_with_properties - Object creation with initial properties
  • โž• NEW: mass_create_objects - Bulk object creation
  • โž• NEW: mass_create_objects_with_properties - Bulk creation with properties
  • ๐Ÿ”ฅ ENHANCED: get_project_structure with improved depth parameter documentation
  • ๐Ÿ—‘๏ธ REMOVED: get_file_content, get_file_properties, get_selection, get_dependencies, validate_references (use Rojo/Argon workflows instead)
  • โšก PERFORMANCE: Streamlined API with 18 focused tools vs 15 mixed-purpose tools

v1.2.0 - Property Modification

  • โž• Added set_property tool for instance modification
  • โž• Added create_object and delete_object tools
  • ๐Ÿ”ง Enhanced error handling and validation

v1.1.0 - Enhanced Discovery

  • ๐Ÿ” Improved project structure analysis
  • ๐Ÿ“Š Better metadata extraction
  • ๐ŸŽฏ Script and GUI intelligence

๐Ÿ“„ License

MIT License - Feel free to use in commercial and personal projects!

Tools

No tools

Comments