mcp-web-inspector 0.9.3 → 0.9.4

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.
@@ -396,10 +396,14 @@ export async function ensureBrowser(browserSettings) {
396
396
  console.error(`No viewport specified, using screen size: ${viewportWidth}x${viewportHeight}`);
397
397
  }
398
398
  }
399
+ // LocalNetworkAccessChecks: Chrome blocks fetch/XHR from public origins to private/CGNAT
400
+ // IPs (e.g. Tailscale 100.64.0.0/10). This breaks environments where the API is on an
401
+ // internal network but the app is served from a public CDN.
399
402
  // Prepare context options
400
403
  const contextOptions = {
401
404
  headless,
402
405
  executablePath: executablePath,
406
+ args: ['--disable-features=LocalNetworkAccessChecks'],
403
407
  };
404
408
  // If device config exists, use it; otherwise use manual viewport/userAgent
405
409
  if (deviceConfig) {
@@ -528,13 +532,22 @@ export async function ensureBrowser(browserSettings) {
528
532
  const { join } = await import('node:path');
529
533
  try {
530
534
  const dirs = readdirSync(installPath);
531
- const chromiumDir = dirs.find(d => d.startsWith('chromium-') && !d.includes('headless'));
532
- if (chromiumDir) {
533
- const chromePath = join(installPath, chromiumDir, 'chrome-linux', 'chrome');
534
- if (existsSync(chromePath)) {
535
- process.env.CHROME_EXECUTABLE_PATH = chromePath;
536
- console.error(`Chromium installed at ${chromePath}`);
535
+ // Sort descending to prefer the newest chromium revision
536
+ const chromiumDirs = dirs
537
+ .filter(d => d.startsWith('chromium-') && !d.includes('headless'))
538
+ .sort().reverse();
539
+ for (const chromiumDir of chromiumDirs) {
540
+ // Newer Playwright uses chrome-linux64/, older uses chrome-linux/
541
+ for (const subdir of ['chrome-linux64', 'chrome-linux']) {
542
+ const chromePath = join(installPath, chromiumDir, subdir, 'chrome');
543
+ if (existsSync(chromePath)) {
544
+ process.env.CHROME_EXECUTABLE_PATH = chromePath;
545
+ console.error(`Chromium installed at ${chromePath}`);
546
+ break;
547
+ }
537
548
  }
549
+ if (process.env.CHROME_EXECUTABLE_PATH)
550
+ break;
538
551
  }
539
552
  }
540
553
  catch {
@@ -598,6 +611,7 @@ export async function ensureBrowser(browserSettings) {
598
611
  const retryContextOptions = {
599
612
  headless,
600
613
  executablePath: executablePath,
614
+ args: ['--disable-features=LocalNetworkAccessChecks'],
601
615
  };
602
616
  // If device config exists, use it; otherwise use manual viewport/userAgent
603
617
  if (deviceConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-web-inspector",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Web Inspector MCP: Give LLMs visual superpowers to see, debug, and test any web page.",
5
5
  "license": "MIT",
6
6
  "author": "Anton",
@@ -29,8 +29,9 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@modelcontextprotocol/sdk": "1.21.0",
32
- "@playwright/browser-chromium": "1.56.1",
33
- "playwright": "1.56.1",
32
+ "@playwright/browser-chromium": "1.58.2",
33
+ "playwright": "1.58.2",
34
+ "playwright-core": "1.58.2",
34
35
  "uuid": "13.0.0"
35
36
  },
36
37
  "keywords": [