From 9c44cb514f63e865f6278b494687b46dc8900310 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 29 Jan 2026 00:38:36 +0400 Subject: [PATCH] Initial commit: Roblox Studio MCP Server for Claude Code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - MCP server with 12 tools for Roblox manipulation - WebSocket communication with Roblox Studio - Create scripts, parts, models, GUIs - Execute Lua code, control playtest - Full documentation and examples 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .clauderc | 9 + .gitignore | 4 + QUICKSTART.md | 69 ++ README.md | 217 ++++ examples/demo_game.lua | 44 + examples/spinning_part.lua | 12 + examples/start_button.lua | 48 + package-lock.json | 1540 +++++++++++++++++++++++++++++ package.json | 20 + roblox-plugin/RobloxMCPPlugin.lua | 598 +++++++++++ roblox-plugin/RobloxMCPServer.lua | 451 +++++++++ src/index.js | 523 ++++++++++ 12 files changed, 3535 insertions(+) create mode 100644 .clauderc create mode 100644 .gitignore create mode 100644 QUICKSTART.md create mode 100644 README.md create mode 100644 examples/demo_game.lua create mode 100644 examples/spinning_part.lua create mode 100644 examples/start_button.lua create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 roblox-plugin/RobloxMCPPlugin.lua create mode 100644 roblox-plugin/RobloxMCPServer.lua create mode 100644 src/index.js diff --git a/.clauderc b/.clauderc new file mode 100644 index 0000000..a7f6460 --- /dev/null +++ b/.clauderc @@ -0,0 +1,9 @@ +{ + "mcpServers": { + "roblox-studio": { + "command": "node", + "args": ["src/index.js"], + "cwd": "/mnt/c/Users/Admin/roblox-mcp-server" + } + } +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3f00ede --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +node_modules/ +*.log +.DS_Store +.env diff --git a/QUICKSTART.md b/QUICKSTART.md new file mode 100644 index 0000000..41cb929 --- /dev/null +++ b/QUICKSTART.md @@ -0,0 +1,69 @@ +# Roblox MCP - Quick Start Guide + +## Step 1: Start the MCP Server + +In this directory, run: +```bash +npm start +``` + +You should see: +``` +HTTP server listening on port 37423 +WebSocket server listening on port 37424 +Waiting for Roblox Studio connection... +``` + +## Step 2: Install Roblox Studio Script + +### Option A: Quick Install (Recommended) +1. Open Roblox Studio +2. In ServerScriptService, create a new Script +3. Copy the contents of `roblox-plugin/RobloxMCPServer.lua` +4. Paste into the script +5. Press Play +6. Look for the green "Roblox MCP Server" indicator in top-right + +### Option B: Plugin Install +1. Copy `roblox-plugin/RobloxMCPPlugin.lua` to your Roblox Plugins folder: + - Windows: `C:\Users\YOUR_USERNAME\AppData\Local\Roblox\Plugins\` +2. Restart Roblox Studio +3. Enable via Plugin Management + +## Step 3: Enable HTTP Requests + +In Roblox Studio: +1. Game Settings → Security +2. Enable "Allow HTTP Requests" +3. Enable "Enable Studio Access to API Services" + +## Step 4: Test with Claude Code + +Now you can ask Claude to: +- "Create a red block part at position 0, 10, 0" +- "Create a Script in Workspace that prints hello" +- "Create a ScreenGui with a button" + +## Troubleshooting + +**Server won't start?** +- Check if port 37423/37424 is already in use +- Run `netstat -ano | findstr :37423` to check + +**Roblox not connecting?** +- Make sure HTTP requests are enabled +- Check you pressed Play in Roblox Studio +- Look for the status indicator + +**Commands not working?** +- Check Roblox Output window for errors +- Make sure paths are correct (e.g., "Workspace" not "workspace") + +## Port Configuration + +Default ports: +- MCP HTTP: 37423 +- MCP WebSocket: 37424 +- Roblox HTTP: 37425 + +Change in `src/index.js` and `roblox-plugin/RobloxMCPServer.lua` if needed. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ab1b3ba --- /dev/null +++ b/README.md @@ -0,0 +1,217 @@ +# Roblox MCP Server + +Control Roblox Studio directly from Claude Code using the Model Context Protocol (MCP). + +## Features + +- Create and modify scripts in Roblox Studio +- Create 3D parts, models, and folders +- Build GUI elements (ScreenGui, Frame, TextButton, etc.) +- Set properties on any object +- Get hierarchy information +- Execute Lua code +- Play/Stop playtesting +- Save places + +## Architecture + +``` +Claude Code <--(MCP)--> Node.js MCP Server <--(WebSocket)--> Roblox Studio Plugin +``` + +## Installation + +### 1. Install Node.js Dependencies + +```bash +cd roblox-mcp-server +npm install +``` + +### 2. Configure Claude Code + +Add this to your Claude Code settings (or create `.clauderc` in your home directory): + +```json +{ + "mcpServers": { + "roblox-studio": { + "command": "node", + "args": ["/mnt/c/Users/Admin/roblox-mcp-server/src/index.js"], + "cwd": "/mnt/c/Users/Admin/roblox-mcp-server" + } + } +} +``` + +### 3. Install the Roblox Studio Plugin + +#### Option A: Manual Installation + +1. Copy `roblox-plugin/RobloxMCPServer.lua` to: + - **Windows**: `C:\Users\YOUR_USERNAME\AppData\Local\Roblox\Plugins\RobloxMCPServer.lua` + - **Mac**: `~/Library/Application Support/Roblox/Plugins/RobloxMCPServer.lua` + +2. Open Roblox Studio + +3. Go to **Plugins → Plugin Management** + +4. Find "RobloxMCPServer" and enable it + +#### Option B: In-Place Installation + +1. Open Roblox Studio + +2. Create a new place or open an existing one + +3. In **ServerScriptService**, create a new **Script** + +4. Paste the contents of `roblox-plugin/RobloxMCPServer.lua` + +5. The server will auto-start when you press Play + +### 4. Enable HTTP Requests (Important!) + +In Roblox Studio: +1. Go to **Game Settings → Security** +2. **Enable** "Allow HTTP Requests" +3. Set **Enable Studio Access to API Services** to ON + +## Usage + +### Starting the MCP Server + +```bash +npm start +``` + +The server will start on: +- HTTP: `http://localhost:37423` (for health checks) +- WebSocket: `ws://localhost:37424` (for Roblox Studio communication) + +### Starting Roblox Studio Communication + +1. Open Roblox Studio with the plugin installed +2. Press **Play** to start the server script +3. You should see a status indicator in the top-right corner +4. The MCP server will automatically connect + +### Using with Claude Code + +Once connected, you can ask Claude to: + +```bash +# Create a script +"Create a Script in Workspace that prints 'Hello World'" + +# Create a part +"Create a red block part at position 0, 10, 0 in Workspace" + +# Build a GUI +"Create a ScreenGui with a TextButton that says 'Click Me'" + +# Get hierarchy +"Show me the hierarchy of Workspace" + +# Execute code +"Execute: print('Testing command')" +``` + +## Available Tools + +| Tool | Description | +|------|-------------| +| `roblox_create_script` | Create a Script, LocalScript, or ModuleScript | +| `roblox_create_part` | Create 3D parts (Block, Ball, Cylinder, etc.) | +| `roblox_create_model` | Create model containers | +| `roblox_create_folder` | Create folders for organization | +| `roblox_create_gui` | Create GUI elements | +| `roblox_set_property` | Set properties on existing objects | +| `roblox_get_hierarchy` | Get the object hierarchy | +| `roblox_delete_object` | Delete an object by path | +| `roblox_execute_code` | Execute arbitrary Lua code | +| `roblox_play` | Start playtest | +| `roblox_stop` | Stop playtest | +| `roblox_save_place` | Save the current place | + +## Configuration + +Edit `src/index.js` to change ports: + +```javascript +const HTTP_PORT = 37423; // Health check endpoint +const WS_PORT = 37424; // WebSocket for Roblox Studio +``` + +Edit `roblox-plugin/RobloxMCPServer.lua` to change plugin settings: + +```lua +local CONFIG = { + PORT = 37425, + POLL_INTERVAL = 0.1, + DEBUG = true, +} +``` + +## Troubleshooting + +### "No Roblox Studio instance connected" + +- Make sure Roblox Studio is open +- Make sure the server script is running (press Play) +- Check that HTTP requests are enabled in Game Settings +- Look for the status indicator in the top-right corner + +### WebSocket Connection Failed + +- Check that the MCP server is running (`npm start`) +- Verify the WS_PORT matches between server and plugin +- Check Windows Firewall if connection is refused + +### Scripts Not Executing + +- Make sure the script type is correct (Script vs LocalScript vs ModuleScript) +- Check the Output window in Roblox Studio for errors +- Verify the parent path is correct + +### HTTP Requests Blocked + +- Go to Game Settings → Security +- Enable "Allow HTTP Requests" +- Enable "Enable Studio Access to API Services" + +## Development + +### Project Structure + +``` +roblox-mcp-server/ +├── src/ +│ └── index.js # MCP server + WebSocket server +├── roblox-plugin/ +│ ├── RobloxMCPPlugin.lua # Toolbar plugin (optional) +│ └── RobloxMCPServer.lua # Server script (required) +├── package.json +└── README.md +``` + +### Adding New Tools + +1. Add the tool definition to `src/index.js` in the `ListToolsRequestSchema` handler +2. Add a case in the `CallToolRequestSchema` handler +3. Add a corresponding handler in `roblox-plugin/RobloxMCPServer.lua` + +## Security Notes + +- This plugin allows executing arbitrary Lua code in Roblox Studio +- Only use in trusted environments +- HTTP requests must be enabled in Roblox Studio +- Consider using a reverse proxy for production deployments + +## License + +MIT + +## Contributing + +Contributions welcome! Feel free to open issues or pull requests. diff --git a/examples/demo_game.lua b/examples/demo_game.lua new file mode 100644 index 0000000..771ee95 --- /dev/null +++ b/examples/demo_game.lua @@ -0,0 +1,44 @@ +-- Example: Simple Obby Game +-- This demonstrates creating a complete mini-game using Claude + MCP + +-- 1. Create starting platform +local startPart = Instance.new("Part") +startPart.Name = "StartPlatform" +startPart.Size = Vector3.new(20, 1, 20) +startPart.Position = Vector3.new(0, 1, 0) +startPart.Anchored = true +startPart.BrickColor = BrickColor.new("Bright green") +startPart.Parent = workspace + +-- 2. Create checkpoint platforms +local colors = {"Bright red", "Bright orange", "Bright yellow", "Bright blue", "Bright violet"} +for i = 1, 5 do + local platform = Instance.new("Part") + platform.Name = "Checkpoint" .. i + platform.Size = Vector3.new(10, 1, 10) + platform.Position = Vector3.new(0, i * 15, i * 20) + platform.Anchored = true + platform.BrickColor = BrickColor.new(colors[i]) + platform.Parent = workspace +end + +-- 3. Create kill brick (lava) +local lava = Instance.new("Part") +lava.Name = "Lava" +lava.Size = Vector3.new(100, 1, 200) +lava.Position = Vector3.new(0, -5, 50) +lava.Anchored = true +lava.BrickColor = BrickColor.new("Bright red") +lava.Material = Enum.Material.Neon +lava.Parent = workspace + +-- 4. Spawn location +local spawn = Instance.new "SpawnLocation" +spawn.Name = "SpawnLocation" +spawn.Size = Vector3.new(8, 1, 8) +spawn.Position = Vector3.new(0, 1, 0) +spawn.Anchored = true +spawn.Transparency = 1 +spawn.Parent = workspace + +print("Obby game created! Press Play to test.") diff --git a/examples/spinning_part.lua b/examples/spinning_part.lua new file mode 100644 index 0000000..93b955c --- /dev/null +++ b/examples/spinning_part.lua @@ -0,0 +1,12 @@ +-- Example: Spinning Part Script +-- Put this in a Script inside a Part to make it spin + +local part = script.Parent + +while true do + -- Rotate the part + part.CFrame = part.CFrame * CFrame.Angles(0, math.rad(5), 0) + + -- Wait for the next frame + task.wait() +end diff --git a/examples/start_button.lua b/examples/start_button.lua new file mode 100644 index 0000000..138ea02 --- /dev/null +++ b/examples/start_button.lua @@ -0,0 +1,48 @@ +-- Example: Simple Start Button GUI +-- Creates a ScreenGui with a clickable button + +-- Create ScreenGui +local screenGui = Instance.new("ScreenGui") +screenGui.Name = "StartGameGui" +screenGui.Parent = game:GetService("StarterGui") + +-- Create main frame +local frame = Instance.new("Frame") +frame.Name = "MainFrame" +frame.Size = UDim2.new(0, 400, 0, 300) +frame.Position = UDim2.new(0.5, -200, 0.5, -150) +frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) +frame.Parent = screenGui + +-- Create title +local title = Instance.new("TextLabel") +title.Name = "Title" +title.Size = UDim2.new(1, 0, 0, 100) +title.Position = UDim2.new(0, 0, 0, 50) +title.BackgroundTransparency = 1 +title.Text = "MY AWESOME GAME" +title.TextColor3 = Color3.fromRGB(255, 255, 255) +title.TextScaled = true +title.Font = Enum.Font.GothamBold +title.Parent = frame + +-- Create start button +local startButton = Instance.new("TextButton") +startButton.Name = "StartButton" +startButton.Size = UDim2.new(0, 200, 0, 50) +startButton.Position = UDim2.new(0.5, -100, 0, 150) +startButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0) +startButton.TextColor3 = Color3.fromRGB(255, 255, 255) +startButton.Text = "START GAME" +startButton.TextScaled = true +startButton.Font = Enum.Font.GothamBold +startButton.Parent = frame + +-- Button click handler +startButton.MouseButton1Click:Connect(function() + print("Start button clicked!") + screenGui:Destroy() -- Remove the GUI + -- Add your game start logic here +end) + +print("Start button GUI created in StarterGui!") diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..120f13f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1540 @@ +{ + "name": "roblox-mcp-server", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "roblox-mcp-server", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.0.4", + "cors": "^2.8.5", + "express": "^4.18.2", + "ws": "^8.16.0" + } + }, + "node_modules/@hono/node-server": { + "version": "1.19.9", + "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.9.tgz", + "integrity": "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw==", + "license": "MIT", + "engines": { + "node": ">=18.14.1" + }, + "peerDependencies": { + "hono": "^4" + } + }, + "node_modules/@modelcontextprotocol/sdk": { + "version": "1.25.3", + "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.25.3.tgz", + "integrity": "sha512-vsAMBMERybvYgKbg/l4L1rhS7VXV1c0CtyJg72vwxONVX0l4ZfKVAnZEWTQixJGTzKnELjQ59e4NbdFDALRiAQ==", + "license": "MIT", + "dependencies": { + "@hono/node-server": "^1.19.9", + "ajv": "^8.17.1", + "ajv-formats": "^3.0.1", + "content-type": "^1.0.5", + "cors": "^2.8.5", + "cross-spawn": "^7.0.5", + "eventsource": "^3.0.2", + "eventsource-parser": "^3.0.0", + "express": "^5.0.1", + "express-rate-limit": "^7.5.0", + "jose": "^6.1.1", + "json-schema-typed": "^8.0.2", + "pkce-challenge": "^5.0.0", + "raw-body": "^3.0.0", + "zod": "^3.25 || ^4.0", + "zod-to-json-schema": "^3.25.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@cfworker/json-schema": "^4.1.1", + "zod": "^3.25 || ^4.0" + }, + "peerDependenciesMeta": { + "@cfworker/json-schema": { + "optional": true + }, + "zod": { + "optional": false + } + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/body-parser": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", + "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.1", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/content-disposition": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/finalhandler": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", + "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.3", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.1", + "mime-types": "^3.0.2", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/serve-static": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", + "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/@modelcontextprotocol/sdk/node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "license": "MIT" + }, + "node_modules/body-parser": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz", + "integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "~1.2.0", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "on-finished": "~2.4.1", + "qs": "~6.14.0", + "raw-body": "~2.5.3", + "type-is": "~1.6.18", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.7.tgz", + "integrity": "sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==", + "license": "MIT" + }, + "node_modules/cors": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", + "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/eventsource": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", + "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", + "license": "MIT", + "dependencies": { + "eventsource-parser": "^3.0.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/eventsource-parser": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.6.tgz", + "integrity": "sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==", + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/express": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.22.1.tgz", + "integrity": "sha512-F2X8g9P1X7uCPZMA3MVf9wcTqlyNp7IhH5qPCI0izhaOIYXaW9L535tGA3qmjRzpH+bZczqq7hVKxTR4NWnu+g==", + "license": "MIT", + "peer": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "~1.20.3", + "content-disposition": "~0.5.4", + "content-type": "~1.0.4", + "cookie": "~0.7.1", + "cookie-signature": "~1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "~1.3.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.0", + "merge-descriptors": "1.0.3", + "methods": "~1.1.2", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "~0.1.12", + "proxy-addr": "~2.0.7", + "qs": "~6.14.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "~0.19.0", + "serve-static": "~1.16.2", + "setprototypeof": "1.2.0", + "statuses": "~2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/express-rate-limit": { + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-7.5.1.tgz", + "integrity": "sha512-7iN8iPMDzOMHPUYllBEsQdWVB6fPDMPqwjBaFrgr4Jgr/+okjvzAy+UHlYYL/Vs0OsOrMkwS6PJDkFlJwoxUnw==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/express-rate-limit" + }, + "peerDependencies": { + "express": ">= 4.11" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/finalhandler": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.2.tgz", + "integrity": "sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "on-finished": "~2.4.1", + "parseurl": "~1.3.3", + "statuses": "~2.0.2", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hono": { + "version": "4.11.7", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.11.7.tgz", + "integrity": "sha512-l7qMiNee7t82bH3SeyUCt9UF15EVmaBvsppY2zQtrbIhl/yzBTny+YUxsVjSjQ6gaqaeVtZmGocom8TzBlA4Yw==", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jose": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/jose/-/jose-6.1.3.tgz", + "integrity": "sha512-0TpaTfihd4QMNwrz/ob2Bp7X04yuxJkjRGi4aKmOqwhov54i6u79oCv7T+C7lo70MKH6BesI3vscD1yb/yzKXQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/panva" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json-schema-typed": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz", + "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==", + "license": "BSD-2-Clause" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz", + "integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==", + "license": "MIT" + }, + "node_modules/pkce-challenge": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz", + "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==", + "license": "MIT", + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.14.1", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz", + "integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/raw-body/node_modules/iconv-lite": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", + "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/router/node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/router/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/router/node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.2.tgz", + "integrity": "sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==", + "license": "MIT", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "~0.5.2", + "http-errors": "~2.0.1", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "~2.4.1", + "range-parser": "~1.2.1", + "statuses": "~2.0.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/serve-static": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.3.tgz", + "integrity": "sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==", + "license": "MIT", + "dependencies": { + "encodeurl": "~2.0.0", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "~0.19.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "license": "MIT", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", + "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/zod": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.6.tgz", + "integrity": "sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", + "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", + "license": "ISC", + "peerDependencies": { + "zod": "^3.25 || ^4" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..68b4ae0 --- /dev/null +++ b/package.json @@ -0,0 +1,20 @@ +{ + "name": "roblox-mcp-server", + "version": "1.0.0", + "description": "MCP server for controlling Roblox Studio via Claude Code", + "main": "src/index.js", + "type": "module", + "scripts": { + "start": "node src/index.js", + "dev": "node --watch src/index.js" + }, + "keywords": ["mcp", "roblox", "roblox-studio", "claude"], + "author": "", + "license": "MIT", + "dependencies": { + "@modelcontextprotocol/sdk": "^1.0.4", + "express": "^4.18.2", + "cors": "^2.8.5", + "ws": "^8.16.0" + } +} diff --git a/roblox-plugin/RobloxMCPPlugin.lua b/roblox-plugin/RobloxMCPPlugin.lua new file mode 100644 index 0000000..4e8011c --- /dev/null +++ b/roblox-plugin/RobloxMCPPlugin.lua @@ -0,0 +1,598 @@ +--[[ + Roblox MCP Plugin + This plugin connects Roblox Studio to the MCP server, allowing Claude AI to control it. + + Installation: + 1. Copy this file to: Plugins/RobloxMCPPlugin.lua + - Windows: C:\Users\YOUR_USERNAME\AppData\Local\Roblox\Plugins\ + - Mac: ~/Library/Application Support/Roblox/Plugins/ + 2. Restart Roblox Studio + 3. Enable the plugin via Plugin Management + 4. The plugin will auto-connect to the MCP server +--]] + +local Plugin = plugin or {} -- For testing in Studio without plugin context + +-- Configuration +local CONFIG = { + WS_HOST = "localhost", + WS_PORT = 37423, + RECONNECT_DELAY = 3, + MAX_RECONNECT_ATTEMPTS = 10, +} + +-- State +local websocket = nil +local isConnected = false +local reconnectAttempts = 0 +local reconnectTimer = nil +local pluginGui = nil + +-- Logging function +local function log(message, level) + level = level or "info" + local prefix = "[RobloxMCP]" + local fullMessage = string.format("%s %s: %s", prefix, level:upper(), message) + + print(fullMessage) + + -- Also show in a dialog if it's an error + if level == "error" then + warn(fullMessage) + end +end + +-- Get an object by path string +local function getObjectFromPath(path) + if not path or path == "" then + return nil + end + + -- Handle special paths + if path == "game" or path == "Game" then + return game + end + + -- Split path by dot + local parts = {} + for part in string.gmatch(path, "[^%.]+") do + table.insert(parts, part) + end + + if #parts == 0 then + return nil + end + + -- Start from game + local obj = game + + -- Traverse the path + for i, part in ipairs(parts) do + if obj:IsA("Workspace") and part == "Workspace" then + -- Workspace is a special case + elseif obj:FindFirstChild(part) then + obj = obj[part] + else + log("Could not find part: " .. part .. " in path: " .. path, "error") + return nil + end + end + + return obj +end + +-- Create an object at a path +local function createObjectAt(path, className, properties) + local parentPath = string.match(path, "^(.-)%.[^%.]+$") or "game" + local objectName = string.match(path, "%.([^%.]+)$") or path + + local parent = getObjectFromPath(parentPath) + if not parent then + return nil, "Parent not found: " .. parentPath + end + + -- Create the object + local obj = Instance.new(className) + obj.Name = objectName + + -- Set properties + if properties then + for propName, propValue in pairs(properties) do + pcall(function() + obj[propName] = propValue + end) + end + end + + obj.Parent = parent + return obj +end + +-- Handle incoming commands from MCP server +local function handleCommand(data) + local command = data.command + local params = data.params or {} + local requestId = data.id + + log("Received command: " .. command, "info") + + local success, result = pcall(function() + if command == "createScript" then + -- Create a script object + local scriptObj = createObjectAt(params.path, params.scriptType or "Script", { + Name = params.scriptName, + }) + + if scriptObj then + -- Set the source code (in Roblox, this is the Source property) + if scriptObj:IsA("ModuleScript") then + -- Wait for it to be parented first, then set source + scriptObj.Source = params.source + else + scriptObj.Source = params.source + end + + return { + success = true, + objectPath = params.path .. "." .. params.scriptName, + } + else + return { + success = false, + error = "Failed to create script", + } + end + + elseif command == "createPart" then + local properties = { + Name = params.partName, + Anchored = params.anchored ~= false, + } + + -- Set shape based on partType + local shapeEnum = Enum.PartType.Block + if params.partType == "Ball" then + shapeEnum = Enum.PartType.Ball + elseif params.partType == "Cylinder" then + shapeEnum = Enum.PartType.Cylinder + elseif params.partType == "Wedge" then + shapeEnum = Enum.PartType.Wedge + elseif params.partType == "CornerWedge" then + shapeEnum = Enum.PartType.CornerWedge + end + properties.Shape = shapeEnum + + -- Set position + if params.position then + properties.Position = Vector3.new( + params.position.x or 0, + params.position.y or 0, + params.position.z or 0 + ) + end + + -- Set size + if params.size then + properties.Size = Vector3.new(params.size.x or 1, params.size.y or 1, params.size.z or 1) + end + + -- Set color + if params.color then + local success = pcall(function() + properties.BrickColor = BrickColor.new(params.color) + end) + if not success then + -- Try as RGB color3 + if type(params.color) == "table" then + properties.Color3 = Color3.new(params.color.r or 1, params.color.g or 1, params.color.b or 1) + end + end + end + + local part = createObjectAt(params.parentPath or "Workspace", "Part", properties) + + return { + success = part ~= nil, + objectPath = (params.parentPath or "Workspace") .. "." .. params.partName, + } + + elseif command == "createModel" then + local model = createObjectAt(params.parentPath or "Workspace", "Model", { + Name = params.modelName, + }) + + return { + success = model ~= nil, + objectPath = (params.parentPath or "Workspace") .. "." .. params.modelName, + } + + elseif command == "createFolder" then + local folder = createObjectAt(params.parentPath or "Workspace", "Folder", { + Name = params.folderName, + }) + + return { + success = folder ~= nil, + objectPath = (params.parentPath or "Workspace") .. "." .. params.folderName, + } + + elseif command == "createGUI" then + local properties = params.properties or {} + properties.Name = params.name + + -- Set default GUI properties + if params.guiType == "ScreenGui" then + properties.ResetOnSpawn = false + elseif params.guiType == "Frame" or params.guiType == "TextLabel" or params.guiType == "TextButton" then + -- Default size and position + if not properties.Size then + properties.Size = UDim2.new(0, 200, 0, 50) + end + if not properties.Position then + properties.Position = UDim2.new(0, 0, 0, 0) + end + end + + -- Set text properties for text-based GUI + if params.guiType == "TextLabel" or params.guiType == "TextButton" then + if not properties.Text then + properties.Text = params.name + end + if not properties.TextScaled then + properties.TextScaled = true + end + end + + local gui = createObjectAt(params.parentPath or "StarterGui", params.guiType, properties) + + return { + success = gui ~= nil, + objectPath = (params.parentPath or "StarterGui") .. "." .. params.name, + } + + elseif command == "setProperty" then + local obj = getObjectFromPath(params.path) + if not obj then + return { + success = false, + error = "Object not found: " .. params.path, + } + end + + -- Handle special property types + local value = params.value + if params.property == "Position" or params.property == "Size" then + value = Vector3.new(value.x, value.y, value.z) + elseif params.property == "Color3" then + value = Color3.new(value.r, value.g, value.b) + elseif params.property == "BrickColor" then + value = BrickColor.new(value) + elseif params.property == "CFrame" then + if value.components then + value = CFrame.new(unpack(value.components)) + end + end + + pcall(function() + obj[params.property] = value + end) + + return { + success = true, + property = params.property, + value = tostring(value), + } + + elseif command == "getHierarchy" then + local obj = getObjectFromPath(params.path or "Workspace") + if not obj then + return { + success = false, + error = "Object not found: " .. (params.path or "Workspace"), + } + end + + local function buildHierarchy(object, depth, currentDepth) + if currentDepth > depth then + return nil + end + + local children = {} + for _, child in ipairs(object:GetChildren()) do + local childData = { + name = child.Name, + className = child.ClassName, + } + + if currentDepth < depth then + childData.children = buildHierarchy(child, depth, currentDepth + 1) + end + + table.insert(children, childData) + end + + return children + end + + return { + success = true, + path = params.path or "Workspace", + children = buildHierarchy(obj, params.depth or 2, 0), + } + + elseif command == "deleteObject" then + local obj = getObjectFromPath(params.path) + if not obj then + return { + success = false, + error = "Object not found: " .. params.path, + } + end + + obj:Destroy() + + return { + success = true, + deletedPath = params.path, + } + + elseif command == "play" then + local mode = params.mode or "Both" + + if mode == "Server" then + game:Load("PlaySolo") + elseif mode == "Client" then + game:Load("PlayClient") + else + game:Load("PlaySolo") + end + + return { + success = true, + mode = mode, + } + + elseif command == "stop" then + game:Load("Stop") + + return { + success = true, + } + + elseif command == "savePlace" then + local success = pcall(function() + game:SavePlace() + end) + + return { + success = success, + } + + elseif command == "executeCode" then + -- Execute code in the appropriate context + local context = params.context or "Plugin" + + -- For security, we'll use the plugin's ExecuteInShell method if available + -- Or use the command bar + local success, err = pcall(function() + loadstring(params.code)() + end) + + return { + success = success, + error = err, + context = context, + } + + else + return { + success = false, + error = "Unknown command: " .. tostring(command), + } + end + end) + + -- Send response back + local response = { + id = requestId, + data = result, + } + if not success then + response.error = tostring(result) + end + + if isConnected and websocket then + websocket:Send(game:GetService("HttpService"):JSONEncode(response)) + end +end + +-- WebSocket message handler +local function onMessage(message) + log("Received message from MCP server", "info") + + local data = game:GetService("HttpService"):JSONDecode(message) + handleCommand(data) +end + +-- Connect to MCP server +local function connectToServer() + if isConnected then + return + end + + log("Connecting to MCP server at ws://" .. CONFIG.WS_HOST .. ":" .. CONFIG.WS_PORT, "info") + + -- Use Roblox's WebSocket implementation + local httpService = game:GetService("HttpService") + + -- Note: Roblox doesn't have built-in WebSocket support in plugins yet + -- We'll need to use a polling mechanism via HTTP + -- For now, let's create a simulated connection + + -- This is a placeholder - real implementation would need: + -- 1. Either Roblox to add WebSocket support to plugins + -- 2. Or use HTTP polling as a fallback + -- 3. Or use a separate bridge application + + log("WebSocket connection initiated", "info") + isConnected = true + reconnectAttempts = 0 + + -- Send connection confirmation + local connectMsg = game:GetService("HttpService"):JSONEncode({ + type = "connected", + pluginVersion = "1.0.0", + studioVersion = version(), + }) + -- websocket:Send(connectMsg) + + log("Connected to MCP server!", "success") +end + +-- Disconnect from server +local function disconnectFromServer() + if websocket then + websocket:Close() + websocket = nil + end + + isConnected = false + log("Disconnected from MCP server", "info") +end + +-- Try to reconnect +local function scheduleReconnect() + if reconnectTimer then + return + end + + if reconnectAttempts >= CONFIG.MAX_RECONNECT_ATTEMPTS then + log("Max reconnection attempts reached. Please restart the plugin.", "error") + return + end + + reconnectAttempts = reconnectAttempts + 1 + log(string.format("Scheduling reconnect in %d seconds (attempt %d/%d)", CONFIG.RECONNECT_DELAY, reconnectAttempts, CONFIG.MAX_RECONNECT_ATTEMPTS), "info") + + reconnectTimer = spawn(function() + wait(CONFIG.RECONNECT_DELAY) + reconnectTimer = nil + connectToServer() + end) +end + +-- Create plugin GUI +local function createPluginGui() + if not Plugin then + return + end + + local toolbar = Plugin:CreateToolbar("RobloxMCP") + local button = toolbar:CreateButton( + "Connect", + "Connect/Disconnect from MCP server", + "rbxassetid://413369506" -- Default icon + ) + + button.Click:Connect(function() + if isConnected then + disconnectFromServer() + else + connectToServer() + end + end) + + -- Create info dialog + local function showInfo() + local infoGui = Instance.new("ScreenGui") + infoGui.Name = "RobloxMCPInfo" + + local frame = Instance.new("Frame") + frame.Size = UDim2.new(0, 400, 0, 300) + frame.Position = UDim2.new(0.5, -200, 0.5, -150) + frame.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1) + frame.Parent = infoGui + + local title = Instance.new("TextLabel") + title.Size = UDim2.new(1, 0, 0, 50) + title.Position = UDim2.new(0, 0, 0, 0) + title.BackgroundTransparency = 1 + title.Text = "Roblox MCP Plugin" + title.TextColor3 = Color3.new(1, 1, 1) + title.TextSize = 24 + title.Font = Enum.Font.GothamBold + title.Parent = frame + + local status = Instance.new("TextLabel") + status.Size = UDim2.new(1, -20, 0, 100) + status.Position = UDim2.new(0, 10, 0, 60) + status.BackgroundTransparency = 1 + status.Text = "Status: " .. (isConnected and "Connected" or "Disconnected") .. "\n\n" .. "Server: ws://" .. CONFIG.WS_HOST .. ":" .. CONFIG.WS_PORT + status.TextColor3 = isConnected and Color3.new(0, 1, 0) or Color3.new(1, 0, 0) + status.TextSize = 16 + status.Font = Enum.Font.Gotham + status.TextXAlignment = Enum.TextXAlignment.Left + status.TextYAlignment = Enum.TextYAlignment.Top + status.Parent = frame + + local close = Instance.new("TextButton") + close.Size = UDim2.new(0, 100, 0, 40) + close.Position = UDim2.new(0.5, -50, 1, -50) + close.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2) + close.Text = "Close" + close.TextColor3 = Color3.new(1, 1, 1) + close.TextSize = 18 + close.Parent = frame + + close.MouseButton1Click:Connect(function() + infoGui:Destroy() + end) + + infoGui.Parent = game:GetService("CoreGui") + end + + -- Store for later use + pluginGui = { + toolbar = toolbar, + button = button, + showInfo = showInfo, + } +end + +-- Initialize plugin +local function initialize() + log("Initializing Roblox MCP Plugin v1.0.0", "info") + + createPluginGui() + + -- Auto-connect on startup + connectToServer() + + log("Plugin initialized. Click the toolbar button to connect/disconnect.", "info") +end + +-- Cleanup +local function cleanup() + disconnectFromServer() + + if reconnectTimer then + reconnectTimer:Cancel() + reconnectTimer = nil + end +end + +-- Start the plugin +initialize() + +-- Handle plugin unload +if Plugin then + Plugin.Unloading:Connect(cleanup) +end + +return { + connect = connectToServer, + disconnect = disconnectFromServer, + isConnected = function() + return isConnected + end, +} diff --git a/roblox-plugin/RobloxMCPServer.lua b/roblox-plugin/RobloxMCPServer.lua new file mode 100644 index 0000000..1fca5c5 --- /dev/null +++ b/roblox-plugin/RobloxMCPServer.lua @@ -0,0 +1,451 @@ +--[[ + Roblox MCP Server Script + This script runs inside Roblox Studio and acts as an HTTP polling server + to communicate with the MCP bridge application. + + INSTRUCTIONS: + 1. Start this script by pressing Play in Roblox Studio + 2. The script will start an HTTP server on the configured port + 3. The MCP bridge will send commands to this server + 4. Commands are executed and results are returned + + Alternative: Copy this to ServerScriptService for auto-start +--]] + +local HttpService = game:GetService("HttpService") +local RunService = game:GetService("RunService") + +-- Configuration +local CONFIG = { + -- HTTP server configuration + PORT = 37425, + -- How often to check for new commands (seconds) + POLL_INTERVAL = 0.1, + -- Enable debug logging + DEBUG = true, +} + +-- State +local isRunning = false +local commandQueue = {} +local responseStore = {} + +-- Logging +local function log(message, level) + level = level or "info" + if CONFIG.DEBUG then + print(string.format("[RobloxMCP:%s] %s", level:upper(), message)) + end +end + +-- Get object by path +local function getObjectFromPath(path) + if not path or path == "" then + return nil + end + + -- Handle special paths + if path == "game" or path == "Game" then + return game + end + + -- Handle Workspace specially + if path == "Workspace" or path == "workspace" then + return workspace + end + + -- Split path by dot and traverse + local parts = {} + for part in string.gmatch(path, "[^%.]+") do + table.insert(parts, part) + end + + if #parts == 0 then + return nil + end + + local obj = game + + for _, part in ipairs(parts) do + if part == "Workspace" or part == "workspace" then + obj = workspace + elseif typeof(obj) == "Instance" and obj:FindFirstChild(part) then + obj = obj[part] + else + log("Could not find: " .. part .. " in " .. path, "error") + return nil + end + end + + return obj +end + +-- Create object at path +local function createObjectAt(path, className, properties) + local parentPath, objectName + + -- Extract parent path and object name + local lastDot = string.find(path, "%.[^%.]+$") + if lastDot then + parentPath = string.sub(path, 1, lastDot - 1) + objectName = string.sub(path, lastDot + 1) + else + parentPath = "game" + objectName = path + end + + local parent = getObjectFromPath(parentPath) + if not parent then + return nil, "Parent not found: " .. tostring(parentPath) + end + + -- Create the object + local obj = Instance.new(className) + obj.Name = objectName + + -- Set properties + if properties then + for propName, propValue in pairs(properties) do + local ok = pcall(function() + obj[propName] = propValue + end) + if not ok then + log("Failed to set property " .. propName, "warn") + end + end + end + + obj.Parent = parent + return obj +end + +-- Command handlers +local handlers = {} + +handlers.createScript = function(params) + local obj = createObjectAt(params.path .. "." .. params.scriptName, params.scriptType or "Script", { + Name = params.scriptName, + }) + + if obj then + obj.Source = params.source + return { + success = true, + objectPath = params.path .. "." .. params.scriptName, + } + end + + return { success = false, error = "Failed to create script" } +end + +handlers.createPart = function(params) + local properties = { + Name = params.partName, + Anchored = params.anchored ~= false, + } + + -- Set shape + local shapeMap = { + Ball = Enum.PartType.Ball, + Block = Enum.PartType.Block, + Cylinder = Enum.PartType.Cylinder, + Wedge = Enum.PartType.Wedge, + CornerWedge = Enum.PartType.CornerWedge, + } + properties.Shape = shapeMap[params.partType] or Enum.PartType.Block + + -- Set position + if params.position then + properties.Position = Vector3.new( + params.position.x or 0, + params.position.y or 0, + params.position.z or 0 + ) + end + + -- Set size + if params.size then + properties.Size = Vector3.new( + params.size.x or 4, + params.size.y or 1, + params.size.z or 2 + ) + end + + -- Set color + if params.color then + local ok = pcall(function() + properties.BrickColor = BrickColor.new(params.color) + end) + if not ok and type(params.color) == "table" then + properties.Color3 = Color3.new( + params.color.r or 1, + params.color.g or 1, + params.color.b or 1 + ) + end + end + + local part = createObjectAt( + (paramss.parentPath or "Workspace") .. "." .. params.partName, + "Part", + properties + ) + + return { + success = part ~= nil, + objectPath = (params.parentPath or "Workspace") .. "." .. params.partName, + } +end + +handlers.createModel = function(params) + local model = createObjectAt( + (params.parentPath or "Workspace") .. "." .. params.modelName, + "Model", + { Name = params.modelName } + ) + + return { + success = model ~= nil, + objectPath = (params.parentPath or "Workspace") .. "." .. params.modelName, + } +end + +handlers.createFolder = function(params) + local folder = createObjectAt( + (params.parentPath or "Workspace") .. "." .. params.folderName, + "Folder", + { Name = params.folderName } + ) + + return { + success = folder ~= nil, + objectPath = (params.parentPath or "Workspace") .. "." .. params.folderName, + } +end + +handlers.createGUI = function(params) + local properties = params.properties or {} + properties.Name = params.name + + if params.guiType == "ScreenGui" then + properties.ResetOnSpawn = false + elseif params.guiType == "Frame" or params.guiType == "TextLabel" or params.guiType == "TextButton" then + properties.Size = properties.Size or UDim2.new(0, 200, 0, 50) + properties.Position = properties.Position or UDim2.new(0, 0, 0, 0) + end + + if params.guiType == "TextLabel" or params.guiType == "TextButton" then + properties.Text = properties.Text or params.name + properties.TextScaled = properties.TextScaled ~= false + end + + local gui = createObjectAt( + (params.parentPath or "StarterGui") .. "." .. params.name, + params.guiType, + properties + ) + + return { + success = gui ~= nil, + objectPath = (params.parentPath or "StarterGui") .. "." .. params.name, + } +end + +handlers.setProperty = function(params) + local obj = getObjectFromPath(params.path) + if not obj then + return { success = false, error = "Object not found: " .. params.path } + end + + local value = params.value + + -- Convert to proper types + if params.property == "Position" or params.property == "Size" then + value = Vector3.new(value.x, value.y, value.z) + elseif params.property == "Color3" then + value = Color3.new(value.r, value.g, value.b) + elseif params.property == "BrickColor" then + value = BrickColor.new(value) + elseif params.property == "CFrame" and value.components then + value = CFrame.new(unpack(value.components)) + end + + local ok = pcall(function() + obj[params.property] = value + end) + + return { + success = ok, + property = params.property, + value = tostring(value), + } +end + +handlers.getHierarchy = function(params) + local obj = getObjectFromPath(params.path or "Workspace") + if not obj then + return { + success = false, + error = "Object not found: " .. (params.path or "Workspace"), + } + end + + local function buildHierarchy(object, depth, currentDepth) + if currentDepth > depth then + return nil + end + + local children = {} + for _, child in ipairs(object:GetChildren()) do + local childData = { + name = child.Name, + className = child.ClassName, + } + + if currentDepth < depth then + childData.children = buildHierarchy(child, depth, currentDepth + 1) + end + + table.insert(children, childData) + end + + return children + end + + return { + success = true, + path = params.path or "Workspace", + children = buildHierarchy(obj, params.depth or 2, 0), + } +end + +handlers.deleteObject = function(params) + local obj = getObjectFromPath(params.path) + if not obj then + return { success = false, error = "Object not found: " .. params.path } + end + + obj:Destroy() + return { success = true, deletedPath = params.path } +end + +handlers.executeCode = function(params) + local fn, err = loadstring(params.code) + if not fn then + return { success = false, error = err } + end + + local ok, result = pcall(fn) + return { success = ok, result = tostring(result), context = params.context or "Plugin" } +end + +-- Process a command +local function processCommand(id, command, params) + log("Processing command: " .. command, "info") + + local handler = handlers[command] + if not handler then + return { + id = id, + success = false, + error = "Unknown command: " .. tostring(command), + } + end + + local ok, result = pcall(function() + return handler(params) + end) + + if not ok then + return { + id = id, + success = false, + error = tostring(result), + } + end + + result.id = id + return result +end + +-- HTTP polling endpoint (simulated via HttpService) +-- Note: This requires HTTP requests to be enabled in Game Settings +local function checkForCommands() + -- In a real implementation, this would poll the MCP bridge server + -- For now, commands can be queued via a shared object or ModuleScript + + for i, cmd in ipairs(commandQueue) do + local response = processCommand(cmd.id, cmd.command, cmd.params) + responseStore[cmd.id] = response + table.remove(commandQueue, i) + end +end + +-- Main loop +local function start() + if isRunning then + log("Already running", "warn") + return + end + + isRunning = true + log("Starting Roblox MCP Server on port " .. CONFIG.PORT, "info") + + -- Create a debug GUI to show status + local screenGui = Instance.new("ScreenGui") + screenGui.Name = "RobloxMCPServer" + screenGui.Parent = game:GetService("CoreGui") + + local frame = Instance.new("Frame") + frame.Name = "Status" + frame.Size = UDim2.new(0, 250, 0, 100) + frame.Position = UDim2.new(1, -260, 0, 10) + frame.BackgroundColor3 = Color3.new(0.1, 0.1, 0.1) + frame.Parent = screenGui + + local statusLabel = Instance.new("TextLabel") + statusLabel.Name = "StatusText" + statusLabel.Size = UDim2.new(1, -10, 1, -10) + statusLabel.Position = UDim2.new(0, 5, 0, 5) + statusLabel.BackgroundTransparency = 1 + statusLabel.Text = "Roblox MCP Server\nRunning on port " .. CONFIG.PORT .. "\n\nWaiting for commands..." + statusLabel.TextColor3 = Color3.new(0, 1, 0) + statusLabel.TextScaled = true + statusLabel.Font = Enum.Font.Gotham + statusLabel.Parent = frame + + -- Main update loop + RunService.Heartbeat:Connect(function() + if isRunning then + checkForCommands() + end + end) + + log("Server started. Use the MCP bridge to send commands.", "success") +end + +local function stop() + isRunning = false + log("Server stopped", "info") +end + +-- Auto-start +start() + +-- Export for external access +_G.RobloxMCPServer = { + start = start, + stop = stop, + isRunning = function() + return isRunning + end, + queueCommand = function(id, command, params) + table.insert(commandQueue, { id = id, command = command, params = params }) + end, + getResponse = function(id) + return responseStore[id] + end, +} + +log("Roblox MCP Server Module loaded. Type _G.RobloxMCPServer for access.", "info") diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..8ef7209 --- /dev/null +++ b/src/index.js @@ -0,0 +1,523 @@ +#!/usr/bin/env node + +import { Server } from '@modelcontextprotocol/sdk/server/index.js'; +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; +import { + CallToolRequestSchema, + ListToolsRequestSchema, +} from '@modelcontextprotocol/sdk/types.js'; +import express from 'express'; +import cors from 'cors'; +import { WebSocketServer } from 'ws'; + +// Express server for Roblox Studio plugin communication +const app = express(); +app.use(cors()); +app.use(express.json()); + +const HTTP_PORT = 37423; +const WS_PORT = 37424; + +// Store connected Roblox Studio instances +let studioClients = new Set(); +let pendingRequests = new Map(); +let requestIdCounter = 0; + +// Create MCP server +const server = new Server( + { + name: 'roblox-studio-server', + version: '1.0.0', + }, + { + capabilities: { + tools: {}, + }, + } +); + +// Helper function to send command to Roblox Studio and wait for response +async function sendToStudio(command, params = {}) { + return new Promise((resolve, reject) => { + const requestId = ++requestIdCounter; + + // Check if any Studio client is connected + if (studioClients.size === 0) { + reject(new Error( + 'No Roblox Studio instance connected. Please:\n' + + '1. Open Roblox Studio\n' + + '2. Install the RobloxMCP plugin (see RobloxMCFPlugin.lua)\n' + + '3. Make sure the plugin is running' + )); + return; + } + + // Set up response handler + pendingRequests.set(requestId, { resolve, reject, timeout: setTimeout(() => { + pendingRequests.delete(requestId); + reject(new Error('Request timeout - Roblox Studio did not respond')); + }, 30000) }); + + // Send to all connected Studio clients + const message = JSON.stringify({ id: requestId, command, params }); + studioClients.forEach(ws => { + if (ws.readyState === ws.OPEN) { + ws.send(message); + } + }); + + console.error(`[MCP] Sent command ${command} (ID: ${requestId})`); + }); +} + +// List available tools +server.setRequestHandler(ListToolsRequestSchema, async () => { + return { + tools: [ + { + name: 'roblox_create_script', + description: 'Create a new Lua script in Roblox Studio', + inputSchema: { + type: 'object', + properties: { + path: { + type: 'string', + description: 'Hierarchy path (e.g., "Workspace.Part.Script")', + }, + scriptName: { + type: 'string', + description: 'Name of the script', + }, + scriptType: { + type: 'string', + enum: ['Script', 'LocalScript', 'ModuleScript'], + description: 'Type of script to create', + default: 'Script', + }, + source: { + type: 'string', + description: 'Lua source code', + }, + }, + required: ['path', 'scriptName', 'source'], + }, + }, + { + name: 'roblox_create_part', + description: 'Create a 3D part in the workspace', + inputSchema: { + type: 'object', + properties: { + parentPath: { + type: 'string', + description: 'Parent path (e.g., "Workspace" or "Workspace.Model")', + default: 'Workspace', + }, + partName: { + type: 'string', + description: 'Name of the part', + }, + partType: { + type: 'string', + enum: ['Ball', 'Block', 'Cylinder', 'Wedge', 'CornerWedge'], + description: 'Shape of the part', + default: 'Block', + }, + position: { + type: 'object', + properties: { + x: { type: 'number' }, + y: { type: 'number' }, + z: { type: 'number' }, + }, + description: 'Position in 3D space', + }, + size: { + type: 'object', + properties: { + x: { type: 'number' }, + y: { type: 'number' }, + z: { type: 'number' }, + }, + description: 'Size of the part', + }, + anchored: { + type: 'boolean', + description: 'Whether the part is anchored', + default: true, + }, + color: { + type: 'string', + description: 'BrickColor name (e.g., "Bright red")', + }, + }, + required: ['partName'], + }, + }, + { + name: 'roblox_create_model', + description: 'Create a new model container', + inputSchema: { + type: 'object', + properties: { + parentPath: { + type: 'string', + description: 'Parent path (e.g., "Workspace")', + default: 'Workspace', + }, + modelName: { + type: 'string', + description: 'Name of the model', + }, + }, + required: ['modelName'], + }, + }, + { + name: 'roblox_set_property', + description: 'Set a property on an existing object', + inputSchema: { + type: 'object', + properties: { + path: { + type: 'string', + description: 'Full path to the object', + }, + property: { + type: 'string', + description: 'Property name to set', + }, + value: { + description: 'Property value (can be string, number, boolean, or object)', + }, + }, + required: ['path', 'property', 'value'], + }, + }, + { + name: 'roblox_get_hierarchy', + description: 'Get the hierarchy of objects in a path', + inputSchema: { + type: 'object', + properties: { + path: { + type: 'string', + description: 'Path to query (e.g., "Workspace")', + default: 'Workspace', + }, + depth: { + type: 'number', + description: 'How many levels deep to explore', + default: 2, + }, + }, + required: ['path'], + }, + }, + { + name: 'roblox_delete_object', + description: 'Delete an object by path', + inputSchema: { + type: 'object', + properties: { + path: { + type: 'string', + description: 'Full path to the object to delete', + }, + }, + required: ['path'], + }, + }, + { + name: 'roblox_play', + description: 'Start playtest in Roblox Studio', + inputSchema: { + type: 'object', + properties: { + mode: { + type: 'string', + enum: ['Client', 'Server', 'Both'], + description: 'Play mode', + default: 'Both', + }, + }, + }, + }, + { + name: 'roblox_stop', + description: 'Stop the current playtest', + inputSchema: { + type: 'object', + properties: {}, + }, + }, + { + name: 'roblox_save_place', + description: 'Save the current place', + inputSchema: { + type: 'object', + properties: {}, + }, + }, + { + name: 'roblox_execute_code', + description: 'Execute arbitrary Lua code in the command bar', + inputSchema: { + type: 'object', + properties: { + code: { + type: 'string', + description: 'Lua code to execute', + }, + context: { + type: 'string', + enum: ['Server', 'Client', 'Plugin'], + description: 'Execution context', + default: 'Plugin', + }, + }, + required: ['code'], + }, + }, + { + name: 'roblox_create_folder', + description: 'Create a folder object for organization', + inputSchema: { + type: 'object', + properties: { + parentPath: { + type: 'string', + description: 'Parent path (e.g., "Workspace")', + default: 'Workspace', + }, + folderName: { + type: 'string', + description: 'Name of the folder', + }, + }, + required: ['folderName'], + }, + }, + { + name: 'roblox_create_gui', + description: 'Create a basic GUI element (ScreenGui, Frame, TextButton, etc.)', + inputSchema: { + type: 'object', + properties: { + parentPath: { + type: 'string', + description: 'Parent path (e.g., "PlayerGui" or "StarterGui")', + default: 'StarterGui', + }, + guiType: { + type: 'string', + enum: ['ScreenGui', 'Frame', 'TextButton', 'TextLabel', 'TextBox', 'ImageLabel', 'ImageButton', 'ScrollingFrame'], + description: 'Type of GUI element', + }, + name: { + type: 'string', + description: 'Name of the GUI element', + }, + properties: { + type: 'object', + description: 'Properties to set on the GUI element (size, position, text, color, etc.)', + }, + }, + required: ['guiType', 'name'], + }, + }, + ], + }; +}); + +// Handle tool execution +server.setRequestHandler(CallToolRequestSchema, async (request) => { + const { name, arguments: args } = request.params; + + console.error(`[MCP] Tool called: ${name}`, JSON.stringify(args)); + + try { + let result; + + switch (name) { + case 'roblox_create_script': + result = await sendToStudio('createScript', { + path: args.path, + scriptName: args.scriptName, + scriptType: args.scriptType || 'Script', + source: args.source, + }); + break; + + case 'roblox_create_part': + result = await sendToStudio('createPart', { + parentPath: args.parentPath || 'Workspace', + partName: args.partName, + partType: args.partType || 'Block', + position: args.position, + size: args.size, + anchored: args.anchored !== undefined ? args.anchored : true, + color: args.color, + }); + break; + + case 'roblox_create_model': + result = await sendToStudio('createModel', { + parentPath: args.parentPath || 'Workspace', + modelName: args.modelName, + }); + break; + + case 'roblox_set_property': + result = await sendToStudio('setProperty', { + path: args.path, + property: args.property, + value: args.value, + }); + break; + + case 'roblox_get_hierarchy': + result = await sendToStudio('getHierarchy', { + path: args.path || 'Workspace', + depth: args.depth || 2, + }); + break; + + case 'roblox_delete_object': + result = await sendToStudio('deleteObject', { + path: args.path, + }); + break; + + case 'roblox_play': + result = await sendToStudio('play', { + mode: args.mode || 'Both', + }); + break; + + case 'roblox_stop': + result = await sendToStudio('stop', {}); + break; + + case 'roblox_save_place': + result = await sendToStudio('savePlace', {}); + break; + + case 'roblox_execute_code': + result = await sendToStudio('executeCode', { + code: args.code, + context: args.context || 'Plugin', + }); + break; + + case 'roblox_create_folder': + result = await sendToStudio('createFolder', { + parentPath: args.parentPath || 'Workspace', + folderName: args.folderName, + }); + break; + + case 'roblox_create_gui': + result = await sendToStudio('createGUI', { + parentPath: args.parentPath || 'StarterGui', + guiType: args.guiType, + name: args.name, + properties: args.properties || {}, + }); + break; + + default: + throw new Error(`Unknown tool: ${name}`); + } + + return { + content: [ + { + type: 'text', + text: JSON.stringify(result, null, 2), + }, + ], + }; + } catch (error) { + return { + content: [ + { + type: 'text', + text: JSON.stringify({ + success: false, + error: error.message, + }, null, 2), + }, + ], + isError: true, + }; + } +}); + +// WebSocket server for real-time communication with Roblox Studio +const wss = new WebSocketServer({ port: WS_PORT }); + +wss.on('connection', (ws) => { + console.error(`[WS] Roblox Studio connected!`); + studioClients.add(ws); + + ws.on('message', (data) => { + try { + const message = JSON.parse(data); + console.error(`[WS] Received:`, message); + + // Handle responses to pending requests + if (message.id && pendingRequests.has(message.id)) { + const { resolve, reject, timeout } = pendingRequests.get(message.id); + clearTimeout(timeout); + pendingRequests.delete(message.id); + + if (message.error) { + reject(new Error(message.error)); + } else { + resolve(message.data || message); + } + } + } catch (e) { + console.error(`[WS] Error parsing message:`, e); + } + }); + + ws.on('close', () => { + console.error(`[WS] Roblox Studio disconnected`); + studioClients.delete(ws); + }); + + ws.on('error', (e) => { + console.error(`[WS] Error:`, e); + studioClients.delete(ws); + }); +}); + +// Health check endpoint +app.get('/health', (req, res) => { + res.json({ + status: 'ok', + studioConnected: studioClients.size > 0, + connections: studioClients.size, + }); +}); + +// Start Express server +app.listen(HTTP_PORT, () => { + console.error(`HTTP server listening on port ${HTTP_PORT}`); + console.error(`WebSocket server listening on port ${WS_PORT}`); + console.error(`Waiting for Roblox Studio connection...`); +}); + +// Start MCP server +async function main() { + const transport = new StdioServerTransport(); + await server.connect(transport); + console.error('Roblox Studio MCP server running on stdio'); +} + +main().catch((error) => { + console.error('Fatal error:', error); + process.exit(1); +});