brave-real-browser-mcp-server 2.3.2 → 2.3.3
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/dist/browser-manager.js +13 -31
- package/package.json +2 -10
package/dist/browser-manager.js
CHANGED
|
@@ -422,16 +422,12 @@ export async function initializeBrowser(options) {
|
|
|
422
422
|
return [...baseFlags, ...platformFlags];
|
|
423
423
|
};
|
|
424
424
|
const isRetryAttempt = options?._isRetryAttempt ?? false;
|
|
425
|
-
|
|
425
|
+
// CRITICAL: Default must be false to allow brave-real-browser's flag modification logic
|
|
426
|
+
// When ignoreAllFlags=true, brave-real-browser skips DEFAULT_FLAGS modification
|
|
427
|
+
// which causes the analytics popup issue
|
|
428
|
+
const useIgnoreAllFlags = options?.ignoreAllFlags ?? false;
|
|
429
|
+
// Don't pass chromeFlags in customConfig - let brave-real-browser handle it via ignoreAllFlags=false
|
|
426
430
|
const chromeConfig = {
|
|
427
|
-
ignoreDefaultFlags: false,
|
|
428
|
-
chromeFlags: useIgnoreAllFlags ? [
|
|
429
|
-
'--no-first-run',
|
|
430
|
-
'--no-default-browser-check',
|
|
431
|
-
'--disable-default-apps',
|
|
432
|
-
'--start-maximized',
|
|
433
|
-
'--disable-blink-features=AutomationControlled'
|
|
434
|
-
] : getOptimalChromeFlags(platform === 'win32', isRetryAttempt),
|
|
435
431
|
...customConfig
|
|
436
432
|
};
|
|
437
433
|
if (detectedChromePath && !chromeConfig.chromePath) {
|
|
@@ -442,14 +438,9 @@ export async function initializeBrowser(options) {
|
|
|
442
438
|
customConfig: chromeConfig,
|
|
443
439
|
turnstile: true,
|
|
444
440
|
disableXvfb: options?.disableXvfb ?? true,
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
'--no-default-browser-check',
|
|
449
|
-
'--disable-default-apps',
|
|
450
|
-
'--start-maximized',
|
|
451
|
-
'--disable-blink-features=AutomationControlled'
|
|
452
|
-
] : [],
|
|
441
|
+
// CRITICAL: Must be false by default to allow brave-real-browser to modify flags
|
|
442
|
+
ignoreAllFlags: options?.ignoreAllFlags ?? false,
|
|
443
|
+
args: [],
|
|
453
444
|
connectOption: {
|
|
454
445
|
defaultViewport: null,
|
|
455
446
|
timeout: platform === 'win32' ? 60000 : 30000,
|
|
@@ -489,7 +480,7 @@ export async function initializeBrowser(options) {
|
|
|
489
480
|
};
|
|
490
481
|
return { strategyName, strategy };
|
|
491
482
|
};
|
|
492
|
-
// Primary strategy: User-defined configuration
|
|
483
|
+
// Primary strategy: User-defined configuration with modified flags
|
|
493
484
|
const primaryStrategy = {
|
|
494
485
|
strategyName: 'User-Defined Configuration',
|
|
495
486
|
strategy: {
|
|
@@ -497,21 +488,12 @@ export async function initializeBrowser(options) {
|
|
|
497
488
|
headless: options?.headless ?? false,
|
|
498
489
|
turnstile: true,
|
|
499
490
|
args: [
|
|
500
|
-
"--start-maximized"
|
|
501
|
-
"--disable-blink-features=AutomationControlled",
|
|
491
|
+
"--start-maximized"
|
|
502
492
|
],
|
|
503
493
|
disableXvfb: true,
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
chromeFlags: [
|
|
508
|
-
"--no-first-run",
|
|
509
|
-
"--no-default-browser-check",
|
|
510
|
-
"--disable-default-apps",
|
|
511
|
-
"--start-maximized",
|
|
512
|
-
"--disable-blink-features=AutomationControlled",
|
|
513
|
-
]
|
|
514
|
-
},
|
|
494
|
+
// CRITICAL: Must be false to allow brave-real-browser to process DEFAULT_FLAGS
|
|
495
|
+
ignoreAllFlags: false,
|
|
496
|
+
customConfig: chromeConfig,
|
|
515
497
|
connectOption: {
|
|
516
498
|
defaultViewport: null,
|
|
517
499
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brave-real-browser-mcp-server",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.3",
|
|
4
4
|
"description": "MCP server for brave-real-browser",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,15 +28,7 @@
|
|
|
28
28
|
"test:integration": "vitest run test/integration",
|
|
29
29
|
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
30
30
|
"test:e2e:watch": "vitest --config vitest.e2e.config.ts",
|
|
31
|
-
"test:chrome:cleanup": "pkill -f 'Google Chrome' || true"
|
|
32
|
-
"test:full": "cd tests/mcp-testing && npm test",
|
|
33
|
-
"test:performance": "node tests/performance/performance-tests.js",
|
|
34
|
-
"test:debug": "node debug-server.js",
|
|
35
|
-
"test:all": "npm run test:ci && npm run test:full && npm run test:performance",
|
|
36
|
-
"test:dashboard": "node test-runner.js",
|
|
37
|
-
"test:brave:cjs": "node test-brave/cjs/test.cjs",
|
|
38
|
-
"test:brave:esm": "node test-brave/esm/test.js",
|
|
39
|
-
"test:brave": "npm run test:brave:cjs && npm run test:brave:esm"
|
|
31
|
+
"test:chrome:cleanup": "pkill -f 'Google Chrome' || true"
|
|
40
32
|
},
|
|
41
33
|
"dependencies": {
|
|
42
34
|
"@modelcontextprotocol/sdk": "^1.19.1",
|