roblox-mcp-server

Rxuser2/roblox-mcp-server

3.2

If you are the rightful owner of roblox-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This document provides a comprehensive overview of a production-ready Roblox MCP Server designed for seamless integration with Roblox Studio, offering HTTP endpoints and MCP tool functionality.

Tools
4
Resources
0
Prompts
0

🚀 Roblox MCP Server - Production Deployment

A complete, production-ready server that provides both HTTP endpoints and MCP tool functionality for Roblox Studio integration.

✨ Features

🎯 Complete MCP Functionality

  • HTTP API Endpoints: Full REST API for Roblox Studio plugins
  • MCP Tools via HTTP: All MCP protocols accessible through HTTP
  • Web Admin Interface: Beautiful management dashboard
  • Public Deployment Ready: Configured for cloud platforms

🌐 Available Endpoints

Core HTTP Endpoints
  • GET /health - Server health and status
  • POST /receiveScript - Receive scripts from Roblox plugins
  • GET /scripts - List all stored scripts
  • GET /scripts/:id - Get specific script by ID
MCP Tools via HTTP
  • POST /mcp/generateRobloxScript - Generate new Roblox Lua scripts
  • POST /mcp/pushToRobloxStudio - Send scripts to Roblox Studio
  • POST /mcp/updateRobloxScript - Update existing scripts
  • GET /mcp/listScripts - List scripts via MCP protocol
  • GET /mcp-tools - Get MCP tools information

🚀 Quick Start

1. Install Dependencies

npm install

2. Start the Server

npm start
# or
node server.js

3. Access the Server

🌐 Cloud Deployment

Heroku (Recommended)

# Install Heroku CLI first
heroku create your-app-name
git init && git add . && git commit -m "Initial commit"
git push heroku main

Vercel

npm install -g vercel
vercel --prod

Railway

npm install -g @railway/cli
railway login
railway deploy

Render

  1. Connect GitHub repository
  2. Build command: npm install
  3. Start command: node server.js

DigitalOcean/AWS/GCP

git clone <your-repo>
cd roblox-mcp-server
npm install
PORT=80 node server.js

🎮 Roblox Studio Integration

Update your Roblox plugin configuration:

-- In your Roblox Studio plugin
local SERVER_ENDPOINT = "https://your-deployed-domain.com/receiveScript"
local API_BASE = "https://your-deployed-domain.com"
local MCP_BASE = "https://your-deployed-domain.com/mcp"

local httpService = game:GetService("HttpService")

-- Send script to server
local function sendScriptToServer(scriptName, code)
    local response = httpService:PostAsync(SERVER_ENDPOINT, 
        httpService:JSONEncode({
            scriptName = scriptName,
            code = code,
            timestamp = os.time()
        }),
        Enum.HttpContentType.ApplicationJson
    )
    
    if response.Success then
        local result = httpService:JSONDecode(response.Body)
        print("Script sent successfully! ID:", result.script.id)
        return true
    else
        print("Failed to send script: " .. response.StatusCode)
        return false
    end
end

📋 API Usage Examples

Health Check

curl https://your-domain.com/health

Send Script

curl -X POST https://your-domain.com/receiveScript \
  -H "Content-Type: application/json" \
  -d '{
    "scriptName": "MyScript",
    "code": "print(\"Hello World!\")",
    "timestamp": "2025-11-02T17:12:18Z"
  }'

Generate Script via MCP

curl -X POST https://your-domain.com/mcp/generateRobloxScript \
  -H "Content-Type: application/json" \
  -d '{
    "feature": "Player movement controller",
    "style": "OOP",
    "requirements": ["smooth movement", "collision detection"]
  }'

List Scripts

curl https://your-domain.com/scripts

🛠️ Development

Local Development

npm run dev

Environment Variables

  • PORT - Server port (default: 3000)
  • NODE_ENV - Environment mode

Project Structure

roblox-mcp-server/
├── server.js              # Main server application
├── package.json           # Dependencies and scripts
├── README.md             # This file
├── public/
│   └── index.html        # Admin web interface
└── node_modules/         # Dependencies

📊 Features

Performance

  • ⚡ In-memory script storage for fast access
  • 🔄 UUID-based script identification
  • 🚀 Concurrent request handling
  • 📏 10MB request size limit

Security

  • 🔐 CORS enabled for Roblox integration
  • ✅ Input validation and sanitization
  • 📝 Request logging and monitoring
  • 🛡️ Comprehensive error handling

Monitoring

  • 💓 Health check endpoints
  • 📊 Real-time script tracking
  • 📈 Performance metrics
  • 🔍 Error logging

🆘 Troubleshooting

Common Issues

Port Already in Use

# Find process
lsof -i :3000
# Kill process
kill -9 <PID>

Dependencies Missing

npm install

Permission Issues

sudo chown -R $USER:$USER ./

📞 Testing

After deployment, test these endpoints:

  1. Health: https://your-domain.com/health
  2. Scripts: https://your-domain.com/scripts
  3. MCP Tools: https://your-domain.com/mcp-tools
  4. Admin: https://your-domain.com/

🎯 Next Steps

  1. Deploy to Cloud Platform
  2. Test All Endpoints
  3. Update Roblox Plugin Configuration
  4. Start Using with Roblox Studio

📄 License

MIT License - See LICENSE file for details

🆘 Support

For issues or questions:

  • Check the troubleshooting section above
  • Review server logs for error details
  • Test endpoints with curl commands
  • Verify Roblox plugin configuration

✅ Ready for Production!

This server is production-ready and can be deployed to any cloud platform immediately. It provides all the functionality needed for Roblox MCP integration while being simple to deploy and maintain.