Overview
The RbxGenie daemon exposes a REST API onhttp://127.0.0.1:7766 that allows any HTTP client to invoke Roblox Studio tools. This is the foundation for MCP integration and custom AI agents.
The daemon uses an event-driven long-polling architecture to bridge HTTP requests with the Roblox Studio plugin.
Base URL
7766
To use a custom port, set the PORT environment variable before starting the daemon:
Authentication
The API currently does not require authentication — it binds to127.0.0.1 (localhost only) for security.
Endpoints
POST /tool/:name
Invoke a tool by name. URL Parameters:name(string) — Tool name (e.g.,get_file_tree,set_property,execute_luau)
- JSON object containing tool-specific arguments
200 OK— Tool executed successfully500 Internal Server Error— Tool failed or timed out
- 120 seconds (2 minutes)
Success Response
ok(boolean) — Alwaystrueon successid(string) — Unique command ID (UUID)result(any) — Tool-specific result data
Error Response
ok(boolean) — Alwaysfalseon errorid(string) — Unique command ID (UUID)error(string) — Error messagetimeout(boolean) —trueif the command timed outtimeoutMs(number) — Timeout duration in milliseconds (present iftimeout: true)
GET /health
Health check endpoint. Response:GET /poll
Internal endpoint used by the Roblox Studio plugin to poll for pending commands. Behavior:- Returns immediately if a command is queued
- Waits up to 15 seconds if no command is available
- Returns
{ "hasCommand": false }on timeout
POST /result
Internal endpoint used by the Roblox Studio plugin to return command results.Request Format
All tool invocations use the same format:Examples
Response Format
Success Response
result field contains tool-specific data:
- String results — Returned as plain strings
- Object results — Returned as JSON objects
- Array results — Returned as JSON arrays
- Empty results — May be
null,{}, or""
Error Response
Timeout Response
Property Value Types
When setting properties, Roblox-specific types must be serialized as JSON:| Roblox Type | JSON Format |
|---|---|
string | "hello" |
number | 42 |
boolean | true |
Vector3 | {"type":"Vector3","value":[x,y,z]} |
Vector2 | {"type":"Vector2","value":[x,y]} |
Color3 | {"type":"Color3","value":[r,g,b]} (0–1) |
CFrame | {"type":"CFrame","value":[...12 components]} |
UDim2 | {"type":"UDim2","value":[xScale,xOffset,yScale,yOffset]} |
UDim | {"type":"UDim","value":[scale,offset]} |
Enum | {"type":"Enum","value":"Enum.Material.Grass"} |
Examples
Architecture
The HTTP API uses an event-driven command queue to bridge stateless HTTP requests with the long-lived Roblox Studio plugin connection:Plugin polls for work
The Roblox Studio plugin maintains a long-polling loop, calling
GET /poll every 15 seconds (or immediately when a command is queued).Client sends tool request
An HTTP client (MCP server, custom script, etc.) POSTs to
/tool/:name with arguments.Daemon enqueues command
The daemon generates a UUID, enqueues the command, and waits for the plugin to pick it up.
Plugin receives command
The plugin’s pending
/poll request immediately receives the queued command and starts execution.Plugin executes and returns
The plugin dispatches the tool in Studio, captures the result, and POSTs it back to
/result with the command ID.Error Handling
Timeout Errors
If the plugin does not respond within 120 seconds:- Plugin is not running or disconnected
- Studio is frozen or unresponsive
- Tool execution is taking too long (e.g., large batch operations)
Execution Errors
If the tool fails in Roblox Studio:- Invalid instance paths
- Missing permissions (e.g., trying to modify CoreGui)
- Invalid property names or types
- Luau runtime errors
Network Errors
If the daemon is unreachable:- Daemon is not running
- Wrong port or URL
- Firewall blocking localhost connections
Rate Limiting
There is no rate limiting on the API. However: Best practices:- Wait for previous commands to complete before sending more
- Use batch operations (
mass_set_property,mass_create_objects, etc.) instead of individual requests - Monitor command execution time and adjust accordingly
Next Steps
Custom Agents
Build AI agents using the HTTP API
Tools Reference
Browse all 46 available tools
Claude Desktop
Use MCP with Claude Desktop
Cursor
Use MCP with Cursor IDE