Skip to main content
Glama

Roblox MCP Unified Server

by Rxuser2

๐ŸŽฎ Roblox MCP Unified Server

Python FastMCP License

Comprehensive MCP Server untuk Roblox Development - Ready untuk upload/register dengan semua functionality dalam satu package yang unified.

๐ŸŒŸ Key Features

๐Ÿ› ๏ธ Complete Roblox Tool Suite (8 Tools)

  • โœ… create_script - Create new Lua/Luau scripts

  • โœ… list_scripts - List all scripts in project

  • โœ… update_script - Update existing scripts

  • โœ… delete_script - Delete scripts

  • โœ… get_project_status - Get project statistics

  • โœ… validate_script - Validate script syntax dan security

  • โœ… backup_project - Create project backups

  • โœ… restore_project - Restore from backups

๐Ÿš€ Production Ready

  • ๐Ÿ“ฆ Built-in Client Library - Include client functionality dalam server package

  • ๐Ÿ” HMAC Authentication - Secure API communication

  • ๐Ÿ—„๏ธ SQLite Database - Persistent script storage

  • ๐Ÿณ Docker Deployment - Ready untuk containerization

  • ๐Ÿš‚ Railway Deployment - Cloud deployment ready

  • ๐Ÿ“Š Comprehensive Logging - Full operation tracking

๐Ÿ“š Developer Experience

  • ๐Ÿ” Interactive Examples - Basic, Advanced, Production usage

  • ๐Ÿ“– Complete Documentation - Setup, deployment, API reference

  • ๐Ÿงช Built-in Testing - Self-validation capabilities

  • โš™๏ธ Environment Configuration - Flexible deployment options

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.10+

  • uv package manager

Installation

# Clone or extract the MCP server cd roblox-mcp-unified # Dependencies will be auto-installed by run.sh # No manual installation needed!

Basic Usage

# Start the MCP server (STDIO mode) sh run.sh # Server automatically: # - Creates virtual environment # - Installs dependencies # - Initializes database # - Starts MCP protocol service

Testing All Tools

# Test each tool individually via MCP client # (client library included dalam server package)

๐Ÿ› ๏ธ Available Tools

1. create_script

Create new Roblox scripts dengan validation

Parameters:

  • name (str): Script name (unique identifier)

  • content (str): Script content (Lua/Luau code)

  • script_type (str, optional): 'lua' or 'luau' (default: 'lua')

  • project_id (str, optional): Project identifier (default: 'default')

Example:

{ "name": "PlayerController", "content": "local Players = game:GetService('Players')", "script_type": "lua", "project_id": "game_project_001" }

2. list_scripts

List all scripts dalam project dengan metadata

Parameters:

  • project_id (str, optional): Project identifier (default: 'default')

Response:

{ "success": true, "project_id": "default", "scripts": [ { "id": 1, "name": "PlayerController", "type": "lua", "created_at": "2025-11-03T08:13:41", "updated_at": "2025-11-03T08:13:41" } ], "count": 1 }

3. update_script

Update existing script content

Parameters:

  • name (str): Script name to update

  • content (str): New script content

  • project_id (str, optional): Project identifier (default: 'default')

4. delete_script

Delete script from database

Parameters:

  • name (str): Script name to delete

  • project_id (str, optional): Project identifier (default: 'default')

5. get_project_status

Get comprehensive project statistics dan health

Parameters:

  • project_id (str, optional): Project identifier (default: 'default')

Response:

{ "success": true, "project": { "id": "default", "name": "Project default", "description": "Auto-created project default", "created_at": "2025-11-03T08:13:41", "updated_at": "2025-11-03T08:13:41" }, "statistics": { "total_scripts": 5, "lua_scripts": 3, "luau_scripts": 2, "backup_count": 2, "last_updated": "2025-11-03T08:13:41" } }

6. validate_script

Validate script content untuk syntax, security, dan best practices

Parameters:

  • content (str): Script content to validate

  • script_type (str, optional): 'lua' or 'luau' (default: 'lua')

Response:

{ "valid": true, "errors": [], "warnings": ["Multiple print statements detected - consider using logging"], "suggestions": ["Use proper error handling", "Add documentation comments"], "script_type": "lua", "content_length": 245 }

7. backup_project

Create complete project backup dengan metadata

Parameters:

  • project_id (str, optional): Project identifier (default: 'default')

Response:

{ "success": true, "message": "Project 'default' backed up successfully", "backup_path": "backups/default/default_backup_20251103_081341.json", "scripts_backed_up": 5, "backup_size_bytes": 1534 }

8. restore_project

Restore project dari backup file

Parameters:

  • project_id (str): Target project identifier

  • backup_path (str, optional): Specific backup file path (uses latest if not provided)

Response:

{ "success": true, "scripts_restored": 5, "scripts_skipped": 0, "total_scripts_in_backup": 5 }

๐ŸŽฏ Available Prompts

1. roblox_script_generator

Generate script prompts based on requirements

Parameters:

  • script_type (str): 'lua' or 'luau'

  • requirements (str): Description of script functionality

2. roblox_validation_guide

Generate validation guidance based on script errors

Parameters:

  • errors (str): Script validation errors or warnings

๐Ÿšข Deployment

Docker Deployment

# Build Docker image docker build -t roblox-mcp-server . # Run container docker run -p 3000:3000 \ -e ROBLOX_MCP_HMAC_SECRET=your_secret_here \ -v roblox_data:/app/data \ roblox-mcp-server

Railway Deployment

  1. Connect Repository ke Railway

  2. Set Environment Variables:

    ROBLOX_MCP_HMAC_SECRET=your_production_secret ROBLOX_MCP_DB_PATH=/app/data/roblox_mcp.db ROBLOX_MCP_VERBOSE=false
  3. Deploy - Railway akan auto-detect dan deploy

Local Development

# Install dependencies uv sync # Run development server uv run python server.py # Or use run.sh (recommended) sh run.sh

โš™๏ธ Configuration

Environment Variables

Variable

Required

Default

Description

ROBLOX_MCP_HMAC_SECRET

No

default_secret_123

HMAC secret for authentication

ROBLOX_MCP_DB_PATH

No

roblox_mcp.db

SQLite database file path

ROBLOX_MCP_VERBOSE

No

false

Enable verbose logging

SERVER_URL

No

http://localhost:3000

Server URL for client library

Example .env File

# Production Configuration ROBLOX_MCP_HMAC_SECRET=your_secure_hmac_secret_here_32_chars ROBLOX_MCP_DB_PATH=/app/data/roblox_mcp.db ROBLOX_MCP_VERBOSE=false SERVER_URL=https://your-app.railway.app # Development Configuration ROBLOX_MCP_HMAC_SECRET=dev_secret_123 ROBLOX_MCP_DB_PATH=dev_roblox_mcp.db ROBLOX_MCP_VERBOSE=true

๐Ÿ—๏ธ Architecture

roblox-mcp-unified/ โ”œโ”€โ”€ server.py # Main FastMCP server dengan all 8 tools โ”œโ”€โ”€ run.sh # STDIO startup script โ”œโ”€โ”€ mcp-server.json # MCP configuration untuk upload/register โ”œโ”€โ”€ pyproject.toml # Python project configuration โ”œโ”€โ”€ src/ # Source code modules โ”‚ โ”œโ”€โ”€ tools/ # Individual tool implementations โ”‚ โ”œโ”€โ”€ services/ # Database, auth, services โ”‚ โ”œโ”€โ”€ client/ # Built-in client library โ”‚ โ””โ”€โ”€ utils/ # Shared utilities โ”œโ”€โ”€ examples/ # Usage examples โ”œโ”€โ”€ docs/ # Documentation files โ”œโ”€โ”€ docker/ # Docker deployment files โ””โ”€โ”€ tests/ # Test suites

๐Ÿงช Testing

Self-Test

# Test all tools functionality uv run python -c " import json from server import create_script, list_scripts, get_project_status # Test basic functionality "

Integration Testing

# Test dengan MCP client (included dalam server) python examples/basic-usage.py python examples/advanced-usage.py python examples/production-usage.py

๐Ÿ“Š API Response Format

All tools return consistent JSON responses:

Success Response:

{ "success": true, "message": "Operation completed successfully", "data": { ... }, // Tool-specific data "timestamp": "2025-11-03T08:13:41" }

Error Response:

{ "success": false, "error": "Error description", "code": "ERROR_CODE" }

๐Ÿ”’ Security Features

  • HMAC Authentication - Request signing untuk secure communication

  • Input Validation - All inputs validated dan sanitized

  • SQL Injection Protection - Parameterized queries

  • Script Security Scanning - Detect dangerous patterns (loadstring, debug hooks)

  • File Path Validation - Secure backup/restore operations

๐Ÿค Contributing

  1. Fork repository

  2. Create feature branch (git checkout -b feature/AmazingFeature)

  3. Commit changes (git commit -m 'Add some AmazingFeature')

  4. Push to branch (git push origin feature/AmazingFeature)

  5. Open Pull Request

๐Ÿ“ License

Distributed under the MIT License. See LICENSE for more information.

๐Ÿ†˜ Support

  • ๐Ÿ“– Documentation: Check docs/ folder

  • ๐Ÿงช Testing: Run test suite sebelum deployment

  • ๐Ÿš€ Deployment: Follow deployment guides

  • ๐Ÿ› Issues: Report bugs dengan detailed reproduction steps

๐Ÿ† Acknowledgments

  • FastMCP - For the excellent MCP framework

  • Roblox Development Community - For API insights and best practices

  • MiniMax Agent - For comprehensive development and testing


Ready untuk upload/register ke MCP system! ๐Ÿš€

Built dengan โค๏ธ untuk Roblox developers

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Rxuser2/Roblox-MCP-Unified'

If you have feedback or need assistance with the MCP directory API, please join our Discord server