brave-real-browser-mcp-server 2.11.5 → 2.11.6

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.
@@ -3,6 +3,9 @@ import * as fs from 'fs';
3
3
  import * as path from 'path';
4
4
  import * as net from 'net';
5
5
  import { execSync, spawn } from 'child_process';
6
+ import { config as dotenvConfig } from 'dotenv';
7
+ // Load environment variables from .env file
8
+ dotenvConfig();
6
9
  // Browser error categorization
7
10
  export var BrowserErrorType;
8
11
  (function (BrowserErrorType) {
@@ -461,7 +464,7 @@ export async function initializeBrowser(options) {
461
464
  braveConfig.chromePath = detectedBravePath;
462
465
  }
463
466
  const connectOptions = {
464
- headless: options?.headless ?? false,
467
+ headless: options?.headless ?? (process.env.HEADLESS === 'true'),
465
468
  customConfig: braveConfig,
466
469
  turnstile: true,
467
470
  disableXvfb: options?.disableXvfb ?? true,
@@ -512,7 +515,7 @@ export async function initializeBrowser(options) {
512
515
  strategyName: 'User-Defined Configuration',
513
516
  strategy: {
514
517
  executablePath: detectedBravePath,
515
- headless: options?.headless ?? false,
518
+ headless: options?.headless ?? (process.env.HEADLESS === 'true'),
516
519
  turnstile: true,
517
520
  args: [
518
521
  "--start-maximized"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brave-real-browser-mcp-server",
3
- "version": "2.11.5",
3
+ "version": "2.11.6",
4
4
  "description": "MCP server for brave-real-browser",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -41,6 +41,7 @@
41
41
  "cheerio": "^1.0.0-rc.12",
42
42
  "chrono-node": "^2.7.0",
43
43
  "compromise": "^14.13.0",
44
+ "dotenv": "^17.2.3",
44
45
  "franc": "^6.2.0",
45
46
  "libphonenumber-js": "^1.10.51",
46
47
  "natural": "^6.12.0",