@dynamicu/chromedebug-mcp 2.4.5 → 2.5.2

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.
package/README.md CHANGED
@@ -40,24 +40,52 @@ The MCP server will automatically start both the stdio MCP server and HTTP serve
40
40
 
41
41
  #### Windows
42
42
 
43
- On Windows, the MCP server and HTTP server should be run separately for best reliability:
43
+ ⚠️ **Important: WSL2 Recommended for Windows Users**
44
44
 
45
- **Step 1: Add MCP Server for Claude Code**
46
- ```bash
47
- claude mcp add chromedebug -s user -- cmd /c chromedebug-mcp
48
- ```
45
+ ChromeDebug MCP uses stdio-based communication which works best on Unix systems. For Windows users, we **strongly recommend using WSL2** for full compatibility.
49
46
 
50
- **Step 2: Start HTTP Server for Chrome Extension (separate terminal)**
51
- ```bash
52
- chromedebug-mcp-server
53
- ```
47
+ **WSL2 Setup (5 minutes):**
48
+
49
+ 1. **Install WSL2** (PowerShell as Administrator):
50
+ ```powershell
51
+ wsl --install
52
+ ```
53
+
54
+ 2. **Restart your computer**
54
55
 
55
- **Why Separate?** On Windows, the stdio-based MCP server (for Claude Code) works best when running independently from the HTTP server (for Chrome extension). This separation provides better stability and prevents connection issues.
56
+ 3. **Open WSL terminal** and install Node.js:
57
+ ```bash
58
+ sudo apt update
59
+ sudo apt install nodejs npm -y
60
+ ```
61
+
62
+ 4. **Install ChromeDebug in WSL**:
63
+ ```bash
64
+ npm install -g @dynamicu/chromedebug-mcp
65
+ ```
66
+
67
+ 5. **Configure Claude Code** to use WSL:
68
+ ```bash
69
+ claude mcp add chromedebug -s user -- wsl chromedebug-mcp
70
+ ```
71
+
72
+ 6. **Verify it works**:
73
+ ```bash
74
+ claude mcp list
75
+ # Should show: chromedebug: wsl chromedebug-mcp - ✓ Connected
76
+ ```
77
+
78
+ **Alternative: Native Windows (Limited Support)**
79
+
80
+ If you cannot use WSL2, you can force native Windows mode, but stdio communication may be unreliable:
81
+
82
+ ```powershell
83
+ # Set environment variable to enable native Windows mode
84
+ set CHROMEDEBUG_FORCE_WINDOWS=1
85
+ chromedebug-mcp --help
86
+ ```
56
87
 
57
- **Note for Windows Users:**
58
- - Process cleanup is currently limited on Windows. The server will start successfully but won't clean up orphaned processes from previous sessions.
59
- - If you only need Claude Code integration (no Chrome extension), the MCP server alone is sufficient.
60
- - If you need the Chrome extension, run both servers in separate terminal windows.
88
+ **Note:** Native Windows may experience stdio communication issues due to cmd.exe limitations. WSL2 is strongly recommended for the best experience.
61
89
 
62
90
  ### Standalone HTTP Server (New in v2.4.3)
63
91
 
@@ -64,7 +64,7 @@ const CHROMEDEBUG_CONFIG = {
64
64
  3027
65
65
  ],
66
66
  discoveryTimeout: 3000,
67
- lastGenerated: '2025-10-01T22:12:24.724Z'
67
+ lastGenerated: '2025-10-17T23:32:00.030Z'
68
68
  };
69
69
 
70
70
  // Export for use in extension scripts
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@dynamicu/chromedebug-mcp",
3
- "version": "2.4.5",
3
+ "version": "2.5.2",
4
4
  "description": "ChromeDebug MCP - MCP server that provides full control over a Chrome browser instance for debugging and automation with AI assistants like Claude Code",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "chromedebug-mcp": "./src/cli.js",
8
+ "chromedebug-mcp": "./src/index.js",
9
9
  "chromedebug-mcp-server": "./src/standalone-server.js"
10
10
  },
11
11
  "publishConfig": {
@@ -116,7 +116,7 @@
116
116
  "joi": "^18.0.0",
117
117
  "jsonwebtoken": "^9.0.2",
118
118
  "multer": "^2.0.2",
119
- "puppeteer": "^23.10.0",
119
+ "puppeteer": "^24.25.0",
120
120
  "uuid": "^11.1.0",
121
121
  "web-vitals": "^5.1.0",
122
122
  "ws": "^8.16.0"
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Windows MCP Diagnostic Tool
5
+ * Helps identify why ChromeDebug MCP may not work on Windows
6
+ */
7
+
8
+ console.error('=== ChromeDebug Windows Diagnostic ===\n');
9
+
10
+ // Test 1: Environment
11
+ console.error('1. Environment Check:');
12
+ console.error(' Platform:', process.platform);
13
+ console.error(' Node Version:', process.version);
14
+ console.error(' argv[0]:', process.argv[0]);
15
+ console.error(' argv[1]:', process.argv[1]);
16
+ console.error(' CWD:', process.cwd());
17
+ console.error(' WSL:', process.env.WSL_DISTRO_NAME || 'No (native Windows)');
18
+ console.error(' Force Windows:', process.env.CHROMEDEBUG_FORCE_WINDOWS || 'No');
19
+ console.error('');
20
+
21
+ // Test 2: Module Detection
22
+ console.error('2. Module Detection:');
23
+ console.error(' import.meta.url:', import.meta.url);
24
+ console.error('');
25
+
26
+ // Test 3: Stdio Check
27
+ console.error('3. Stdio Configuration:');
28
+ console.error(' stdin.isTTY:', process.stdin.isTTY);
29
+ console.error(' stdout.isTTY:', process.stdout.isTTY);
30
+ console.error(' stderr.isTTY:', process.stderr.isTTY);
31
+ console.error('');
32
+
33
+ // Test 4: Recommendations
34
+ console.error('4. Recommendations:');
35
+ if (process.platform === 'win32' && !process.env.WSL_DISTRO_NAME) {
36
+ console.error(' ⚠️ Running on native Windows');
37
+ console.error(' ✓ Recommended: Install WSL2 for best compatibility');
38
+ console.error(' ✓ Quick setup: wsl --install');
39
+ console.error(' ✓ After WSL2: npm install -g @dynamicu/chromedebug-mcp');
40
+ console.error(' ✓ Configure Claude: claude mcp add chromedebug -s user -- wsl chromedebug-mcp');
41
+ } else if (process.env.WSL_DISTRO_NAME) {
42
+ console.error(' ✅ Running in WSL2 - Full compatibility available');
43
+ } else {
44
+ console.error(' ✅ Running on Unix-based system - Full compatibility available');
45
+ }
46
+ console.error('');
47
+
48
+ console.error('For more information:');
49
+ console.error(' https://github.com/dynamicupgrade/ChromeDebug#windows-setup');
50
+ console.error('');
51
+
52
+ // Exit successfully
53
+ process.exit(0);
package/src/index.js CHANGED
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env node
2
+
1
3
  /**
2
4
  * Chrome Debug MCP Server - Modular Architecture
3
5
  * Refactored from monolithic design to modular components
@@ -261,6 +263,34 @@ async function main() {
261
263
  // Parse arguments first to get session settings
262
264
  const args = app.parseArguments();
263
265
 
266
+ // Detect Windows and provide WSL2 guidance
267
+ if (process.platform === 'win32' && !process.env.WSL_DISTRO_NAME && !process.env.CHROMEDEBUG_FORCE_WINDOWS) {
268
+ console.error(`
269
+ ⚠️ ChromeDebug MCP runs best on Unix-based systems.
270
+
271
+ Windows users have two options:
272
+
273
+ 1. WSL2 (RECOMMENDED - Full Compatibility):
274
+ • Install WSL2: Run in PowerShell as Admin:
275
+ wsl --install
276
+ • Restart your computer
277
+ • Inside WSL, install Node.js:
278
+ sudo apt update && sudo apt install nodejs npm
279
+ • Install ChromeDebug in WSL:
280
+ npm install -g @dynamicu/chromedebug-mcp
281
+ • Configure Claude to use WSL:
282
+ claude mcp add chromedebug -s user -- wsl chromedebug-mcp
283
+
284
+ 2. Native Windows (LIMITED - May have stdio issues):
285
+ • Set: set CHROMEDEBUG_FORCE_WINDOWS=1
286
+ • Then run: chromedebug-mcp
287
+ • Note: MCP stdio communication may fail due to cmd.exe limitations
288
+
289
+ For details: https://github.com/dynamicupgrade/ChromeDebug#windows-setup
290
+ `);
291
+ process.exit(1);
292
+ }
293
+
264
294
  try {
265
295
  // Initialize unified session manager with options
266
296
  const sessionManager = await initializeSessionManager({
package/src/cli.js DELETED
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawn } from 'child_process';
4
- import { fileURLToPath } from 'url';
5
- import { dirname, join } from 'path';
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = dirname(__filename);
9
-
10
- const indexPath = join(__dirname, 'index.js');
11
-
12
- const child = spawn('node', [indexPath], {
13
- stdio: 'inherit',
14
- env: process.env
15
- });
16
-
17
- child.on('exit', (code) => {
18
- process.exit(code);
19
- });