robloxstudio-mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,19 @@
1
+ export class StudioHttpClient {
2
+ bridge;
3
+ constructor(bridge) {
4
+ this.bridge = bridge;
5
+ }
6
+ async request(endpoint, data) {
7
+ try {
8
+ const response = await this.bridge.sendRequest(endpoint, data);
9
+ return response;
10
+ }
11
+ catch (error) {
12
+ if (error instanceof Error && error.message === 'Request timeout') {
13
+ throw new Error('Studio plugin connection timeout. Make sure the Roblox Studio plugin is running and activated.');
14
+ }
15
+ throw error;
16
+ }
17
+ }
18
+ }
19
+ //# sourceMappingURL=studio-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio-client.js","sourceRoot":"","sources":["../../src/tools/studio-client.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,gBAAgB;IACnB,MAAM,CAAgB;IAE9B,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,QAAgB,EAAE,IAAS;QACvC,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;YAC/D,OAAO,QAAQ,CAAC;QAClB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,KAAK,iBAAiB,EAAE,CAAC;gBAClE,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "robloxstudio-mcp",
3
+ "version": "1.0.0",
4
+ "description": "MCP Server for Roblox Studio Integration - Access Studio data, scripts, and objects through AI tools",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "robloxstudio-mcp": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist/**/*",
12
+ "studio-plugin/**/*",
13
+ "README.md",
14
+ "CLAUDE.md"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc",
18
+ "dev": "tsx src/index.ts",
19
+ "start": "node dist/index.js",
20
+ "lint": "eslint src/**/*.ts",
21
+ "typecheck": "tsc --noEmit",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "keywords": ["mcp", "roblox", "studio", "ai", "model-context-protocol", "game-development"],
25
+ "author": "",
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/your-username/robloxstudio-mcp.git"
30
+ },
31
+ "homepage": "https://github.com/your-username/robloxstudio-mcp#readme",
32
+ "bugs": {
33
+ "url": "https://github.com/your-username/robloxstudio-mcp/issues"
34
+ },
35
+ "dependencies": {
36
+ "@modelcontextprotocol/sdk": "^0.6.0",
37
+ "express": "^4.18.2",
38
+ "ws": "^8.14.2",
39
+ "cors": "^2.8.5",
40
+ "uuid": "^9.0.1"
41
+ },
42
+ "devDependencies": {
43
+ "@types/express": "^4.17.21",
44
+ "@types/ws": "^8.5.10",
45
+ "@types/cors": "^2.8.17",
46
+ "@types/node": "^20.10.0",
47
+ "@types/uuid": "^9.0.7",
48
+ "@typescript-eslint/eslint-plugin": "^7.0.0",
49
+ "@typescript-eslint/parser": "^7.0.0",
50
+ "eslint": "^8.57.0",
51
+ "tsx": "^4.6.0",
52
+ "typescript": "^5.3.2"
53
+ }
54
+ }
@@ -0,0 +1,105 @@
1
+ # Roblox Studio MCP Plugin Installation Guide
2
+
3
+ ## Prerequisites
4
+
5
+ 1. Roblox Studio installed and running
6
+ 2. MCP server running on your local machine
7
+ 3. HTTP Requests enabled in Studio (Game Settings > Security > Allow HTTP Requests)
8
+
9
+ ## Installation Steps
10
+
11
+ ### Method 1: Local Plugin Installation (Recommended for Development)
12
+
13
+ 1. **Save the plugin file:**
14
+ - Copy the `plugin.lua` file content
15
+ - In Roblox Studio, create a new Script in any location
16
+ - Paste the plugin code into the script
17
+ - Save the script locally (File > Save to File) as `MCPPlugin.lua`
18
+
19
+ 2. **Install as local plugin:**
20
+ - In Studio, go to the "Plugins" tab
21
+ - Click "Plugins Folder" to open your local plugins directory
22
+ - Copy your saved `MCPPlugin.lua` file into this folder
23
+ - Restart Roblox Studio
24
+
25
+ 3. **Verify installation:**
26
+ - After restart, you should see "MCP Integration" in your plugins toolbar
27
+ - Click the "MCP Server" button to activate the plugin
28
+
29
+ ### Method 2: Plugin Script Installation
30
+
31
+ 1. **Create plugin script:**
32
+ - In Roblox Studio, open any place
33
+ - In the Explorer, navigate to `ServerScriptService`
34
+ - Right-click and select "Insert Object" > "Script"
35
+ - Name it "MCPPlugin"
36
+ - Paste the plugin code
37
+
38
+ 2. **Convert to plugin:**
39
+ - Right-click the script
40
+ - Select "Save as Local Plugin..."
41
+ - Give it a name like "MCP Integration"
42
+ - Click Save
43
+
44
+ 3. **The plugin will be immediately available in your toolbar**
45
+
46
+ ## Configuration
47
+
48
+ 1. **Enable HTTP Requests:**
49
+ - Open Game Settings (Home tab > Game Settings)
50
+ - Navigate to Security
51
+ - Enable "Allow HTTP Requests"
52
+ - Save settings
53
+
54
+ 2. **Start MCP Server:**
55
+ - In your terminal, navigate to the MCP server directory
56
+ - Run: `npm start`
57
+ - The server should start on port 3002
58
+
59
+ 3. **Activate Plugin:**
60
+ - Click the "MCP Server" button in the toolbar
61
+ - The status window should show "MCP Server: Active" in green
62
+ - The plugin will now poll for requests from the MCP server
63
+
64
+ ## Usage
65
+
66
+ Once activated, the plugin will:
67
+ - Poll the MCP server every 500ms for incoming requests
68
+ - Process requests for Studio data (scripts, instances, properties, etc.)
69
+ - Send responses back to the MCP server
70
+ - Display connection status in the dock widget
71
+
72
+ ## Troubleshooting
73
+
74
+ ### Plugin doesn't appear in toolbar
75
+ - Ensure the plugin file was saved in the correct plugins folder
76
+ - Try restarting Roblox Studio
77
+ - Check Output window for any error messages
78
+
79
+ ### "HTTP 403 Forbidden" errors
80
+ - Make sure "Allow HTTP Requests" is enabled in Game Settings
81
+ - Verify the MCP server is running on the correct port (3002)
82
+
83
+ ### Connection timeout errors
84
+ - Check that the MCP server is running (`npm start`)
85
+ - Ensure no firewall is blocking localhost connections
86
+ - Verify the server URLs in the plugin match your setup
87
+
88
+ ### Plugin shows "Disconnected"
89
+ - Click the MCP Server button to activate
90
+ - Check the Output window for error messages
91
+ - Ensure the MCP server is accessible at http://localhost:3002
92
+
93
+ ## Security Notes
94
+
95
+ - The plugin only works with local servers (localhost)
96
+ - No external connections are made
97
+ - All data stays on your local machine
98
+ - The plugin only reads data, it doesn't modify your place
99
+
100
+ ## Development Tips
101
+
102
+ - Use the Output window to see debug messages
103
+ - The status widget shows real-time connection status
104
+ - You can modify polling interval in the plugin code if needed
105
+ - For debugging, add print statements to track request/response flow
@@ -0,0 +1,10 @@
1
+ {
2
+ "Name": "Roblox Studio MCP Plugin",
3
+ "Description": "Provides AI tool access to Roblox Studio data through MCP protocol",
4
+ "Author": "MCP Integration",
5
+ "Version": "1.0.0",
6
+ "Id": "robloxstudio-mcp-plugin",
7
+ "Permissions": [
8
+ "HTTP"
9
+ ]
10
+ }