brave-real-browser-mcp-server 2.9.16 → 2.9.17

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
@@ -114,8 +114,8 @@ assistants to control a real browser, extract content, and more.
114
114
 
115
115
  - **🔄 Auto-Update System**: Automatically updates all dependencies to latest versions on every `npm install`
116
116
  - **Stealth by default**: All browser instances use anti-detection features
117
- - **Enhanced Windows support**: Comprehensive Brave detection and ECONNREFUSED error fixes
118
- - **Smart Brave detection**: Registry-based detection + 13+ installation paths (Windows)
117
+ - **Enhanced Windows support**: Comprehensive Chrome detection and ECONNREFUSED error fixes (v1.3.0)
118
+ - **Smart Chrome detection**: Registry-based detection + 15+ installation paths (Windows)
119
119
  - **Connection resilience**: Automatic localhost/127.0.0.1 fallback with port management
120
120
  - **Multiple retry strategies**: 5 different connection approaches with progressive fallback
121
121
  - **Advanced configuration**: Full support for all brave-real-browser options
@@ -133,24 +133,25 @@ assistants to control a real browser, extract content, and more.
133
133
 
134
134
  - Node.js >= 18.0.0
135
135
  - npm or yarn
136
- - Brave Browser 13+ installed
136
+ - Google Chrome or Chromium browser installed
137
137
  - Basic understanding of TypeScript/JavaScript (for development)
138
138
 
139
139
  ### Platform-Specific Requirements
140
140
 
141
141
  **Windows:**
142
- - Brave Browser installation (automatic detection includes):
143
- - Standard installations: `C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe`
144
- - 32-bit installations: `C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe`
145
- - User installations: `%LOCALAPPDATA%\BraveSoftware\Brave-Browser\Application\brave.exe`
142
+ - Google Chrome installation (automatic detection in v1.3.0+ includes):
143
+ - Standard installations: `C:\Program Files\Google\Chrome\Application\chrome.exe`
144
+ - 32-bit installations: `C:\Program Files (x86)\Google\Chrome\Application\chrome.exe`
145
+ - User installations: `%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe`
146
+ - Chrome Canary: `%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe`
146
147
  - Portable installations and Registry-detected paths
147
- - Manual path specification: Use `BRAVE_PATH` environment variable
148
+ - Manual path specification: Use `CHROME_PATH` environment variable
148
149
 
149
150
  **macOS:**
150
- - Brave Browser must be installed in `/Applications/Brave Browser.app`
151
+ - Google Chrome or Chromium must be installed in `/Applications/`
151
152
 
152
153
  **Linux:**
153
- - Install Brave: `sudo apt install brave-browser` or via snap: `sudo snap install brave`
154
+ - Install Chrome/Chromium: `sudo apt-get install -y google-chrome-stable` or `sudo apt-get install -y chromium-browser`
154
155
  - Install xvfb for headless operation: `sudo apt-get install -y xvfb`
155
156
 
156
157
  ## Installation for Developers
@@ -230,11 +231,11 @@ This command:
230
231
 
231
232
  #### Method 2: Add with Environment Variables
232
233
 
233
- If you need to configure proxy settings or custom Brave paths:
234
+ If you need to configure proxy settings or custom Chrome paths:
234
235
 
235
236
  ```bash
236
237
  claude mcp add brave-real-browser \
237
- -e BRAVE_PATH="/path/to/brave" \
238
+ -e CHROME_PATH="/path/to/chrome" \
238
239
  -e PROXY_URL="http://proxy:8080" \
239
240
  -- npx brave-real-browser-mcp-server@latest
240
241
  ```
@@ -261,7 +262,7 @@ claude mcp add-json brave-real-browser '{
261
262
  "command": "npx",
262
263
  "args": ["brave-real-browser-mcp-server@latest"],
263
264
  "env": {
264
- "BRAVE_PATH": "/path/to/brave",
265
+ "CHROME_PATH": "/path/to/chrome",
265
266
  "PROXY_URL": "http://proxy:8080"
266
267
  }
267
268
  }'
@@ -298,7 +299,7 @@ After adding the server:
298
299
 
299
300
  - **Automatic Updates**: Using `@latest` ensures you get bug fixes and improvements
300
301
  - **No Installation**: npx handles downloading and running automatically
301
- - **Environment Variables**: Easy configuration of proxies, Brave paths, etc.
302
+ - **Environment Variables**: Easy configuration of proxies, Chrome paths, etc.
302
303
  - **Scope Control**: Choose where the server is available (local/project/user)
303
304
  - **Team Sharing**: Project scope allows sharing configurations with teammates
304
305
  - **Status Monitoring**: Built-in `/mcp` command for server health checks
@@ -336,7 +337,7 @@ Cursor IDE uses the same npx approach - no installation needed! Here are the set
336
337
 
337
338
  > **Important:** Just like Claude Desktop, Cursor will use `npx` to automatically download and run the server. You don't need to install anything with npm!
338
339
 
339
- **Windows-Specific Configuration (if experiencing Brave path issues):**
340
+ **Windows-Specific Configuration (if experiencing Chrome path issues):**
340
341
  ```json
341
342
  {
342
343
  "mcpServers": {
@@ -344,7 +345,7 @@ Cursor IDE uses the same npx approach - no installation needed! Here are the set
344
345
  "command": "npx",
345
346
  "args": ["brave-real-browser-mcp-server@latest"],
346
347
  "env": {
347
- "BRAVE_PATH": "C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe"
348
+ "CHROME_PATH": "C:/Program Files/Google/Chrome/Application/chrome.exe"
348
349
  }
349
350
  }
350
351
  }
@@ -353,7 +354,7 @@ Cursor IDE uses the same npx approach - no installation needed! Here are the set
353
354
 
354
355
  > **Note**: Browser options like headless mode should be configured when initializing the browser through the `browser_init` tool, not via environment variables.
355
356
 
356
- **Advanced Configuration with Custom Brave Path:**
357
+ **Advanced Configuration with Custom Chrome Path:**
357
358
  ```json
358
359
  {
359
360
  "mcpServers": {
@@ -361,7 +362,7 @@ Cursor IDE uses the same npx approach - no installation needed! Here are the set
361
362
  "command": "npx",
362
363
  "args": ["brave-real-browser-mcp-server@latest"],
363
364
  "env": {
364
- "BRAVE_PATH": "C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe"
365
+ "CHROME_PATH": "C:/Program Files/Google/Chrome/Application/chrome.exe"
365
366
  }
366
367
  }
367
368
  }
@@ -370,34 +371,34 @@ Cursor IDE uses the same npx approach - no installation needed! Here are the set
370
371
 
371
372
  > **Note**: Proxy settings and browser options should be configured when asking Claude to initialize the browser using the `browser_init` tool.
372
373
 
373
- #### Platform-Specific Brave Paths for Cursor IDE
374
+ #### Platform-Specific Chrome Paths for Cursor IDE
374
375
 
375
- If Brave auto-detection fails, you can specify the Brave path using the `BRAVE_PATH` environment variable:
376
+ If Chrome auto-detection fails, you can specify the Chrome path using the `CHROME_PATH` environment variable:
376
377
 
377
378
  **Windows:**
378
379
  ```json
379
380
  "env": {
380
- "BRAVE_PATH": "C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe"
381
+ "CHROME_PATH": "C:/Program Files/Google/Chrome/Application/chrome.exe"
381
382
  }
382
383
  ```
383
384
  Alternative Windows paths:
384
- - `"C:/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"`
385
- - `"%LOCALAPPDATA%/BraveSoftware/Brave-Browser/Application/brave.exe"`
385
+ - `"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"`
386
+ - `"%LOCALAPPDATA%/Google/Chrome/Application/chrome.exe"`
386
387
 
387
388
  **macOS:**
388
389
  ```json
389
390
  "env": {
390
- "BRAVE_PATH": "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
391
+ "CHROME_PATH": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
391
392
  }
392
393
  ```
393
394
 
394
395
  **Linux:**
395
396
  ```json
396
397
  "env": {
397
- "BRAVE_PATH": "/usr/bin/brave-browser"
398
+ "CHROME_PATH": "/usr/bin/google-chrome"
398
399
  }
399
400
  ```
400
- Alternative Linux paths: `/usr/bin/brave`, `/snap/bin/brave`
401
+ Alternative Linux paths: `/usr/bin/chromium-browser`, `/snap/bin/chromium`
401
402
 
402
403
 
403
404
  #### Testing Cursor IDE Setup
@@ -422,9 +423,9 @@ If successful, you should see:
422
423
  - Ensure Node.js 18+ is installed
423
424
 
424
425
  2. **"Browser failed to launch" on Windows**
425
- - Add explicit Brave path in `executablePath`
426
+ - Add explicit Chrome path in `executablePath`
426
427
  - Try running Cursor IDE as Administrator
427
- - Check Windows Defender isn't blocking Brave
428
+ - Check Windows Defender isn't blocking Chrome
428
429
 
429
430
  3. **"Permission denied"**
430
431
  - Use `sudo npm install -g brave-real-browser-mcp-server` on Linux/Mac
@@ -547,7 +548,7 @@ AI: I'll set up the browser with your proxy configuration.
547
548
  The server includes intelligent element discovery capabilities through the `find_selector` tool:
548
549
 
549
550
  - **Text-based element finding**: Automatically locates elements containing specific text
550
- - **Smart CSS selector generation**: Creates unique, robust CSS selectors similar to browser DevTools
551
+ - **Smart CSS selector generation**: Creates unique, robust CSS selectors similar to Chrome DevTools
551
552
  - **Element type filtering**: Optionally restrict search to specific HTML elements (e.g., buttons, links)
552
553
  - **Exact or partial text matching**: Choose between precise text matching or substring searches
553
554
  - **Universal compatibility**: Works across any website without hardcoded selectors
@@ -585,27 +586,27 @@ brave-real-browser implementation.
585
586
 
586
587
  ## Configuration
587
588
 
588
- ### Automatic Brave Path Detection
589
+ ### Automatic Chrome Path Detection (Enhanced in v1.3.0)
589
590
 
590
- The server automatically detects Brave Browser installation paths across different operating systems:
591
+ The server automatically detects Chrome installation paths across different operating systems with significantly improved Windows support:
591
592
 
592
- - **Windows**:
593
- - Registry-based detection for installed Brave versions
594
- - Searches 13+ common installation directories including Program Files, user-specific locations, and portable installations
595
- - Support for Brave Nightly fallback
596
- - Environment variable detection (`BRAVE_PATH`)
597
- - Detailed troubleshooting guidance when Brave is not found
593
+ - **Windows (v1.3.0+)**:
594
+ - Registry-based detection for installed Chrome versions
595
+ - Searches 15+ common installation directories including Program Files, user-specific locations, and portable installations
596
+ - Support for Chrome Canary fallback
597
+ - Environment variable detection (`CHROME_PATH`, `PUPPETEER_EXECUTABLE_PATH`)
598
+ - Detailed troubleshooting guidance when Chrome is not found
598
599
 
599
- - **macOS**: Looks for Brave in `/Applications/Brave Browser.app/` and Brave Nightly locations
600
+ - **macOS**: Looks for Chrome in `/Applications/Google Chrome.app/` and Chrome Canary locations
600
601
 
601
- - **Linux**: Checks multiple locations including `/usr/bin/brave-browser`, `/usr/bin/brave`, and snap installations
602
+ - **Linux**: Checks multiple locations including `/usr/bin/google-chrome`, `/usr/bin/chromium-browser`, and snap installations
602
603
 
603
- **Windows Registry Detection**:
604
- The server queries Windows Registry to find Brave installations, making detection more reliable across different installation types.
604
+ **Windows Registry Detection** (NEW in v1.3.0):
605
+ The server now queries Windows Registry to find Chrome installations, making detection more reliable across different installation types.
605
606
 
606
- If Brave is not found automatically, you can specify a custom path using:
607
- 1. Environment variable: `set BRAVE_PATH="C:\Your\Brave\Path\brave.exe"`
608
- 2. Browser init option: `customConfig.bravePath` when initializing the browser
607
+ If Chrome is not found automatically, you can specify a custom path using:
608
+ 1. Environment variable: `set CHROME_PATH="C:\Your\Chrome\Path\chrome.exe"`
609
+ 2. Browser init option: `customConfig.chromePath` when initializing the browser
609
610
 
610
611
  ### Configuring Custom Options (like headless mode)
611
612
  Custom options like headless mode are **not configured in the MCP config file**. Instead, they're passed when initializing the browser using the `browser_init` tool:
@@ -632,7 +633,7 @@ When initializing with `browser_init`, you can configure:
632
633
 
633
634
  - `headless`: true/false (Set to true for headless operation)
634
635
  - `disableXvfb`: true/false (Disable X Virtual Framebuffer)
635
- - `ignoreAllFlags`: true/false (Ignore all browser flags)
636
+ - `ignoreAllFlags`: true/false (Ignore all Chrome flags)
636
637
  - `proxy`: "https://proxy:8080" (Proxy server URL)
637
638
  - `plugins`: ["plugin1", "plugin2"] (Array of plugins to load)
638
639
  - `connectOption`: Additional connection options like:
@@ -661,11 +662,11 @@ When initializing the browser with `browser_init`, you can configure:
661
662
 
662
663
  ### Advanced Configuration Examples
663
664
 
664
- #### Specifying Custom Brave Path
665
+ #### Specifying Custom Chrome Path
665
666
  ```json
666
667
  {
667
668
  "customConfig": {
668
- "bravePath": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
669
+ "chromePath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
669
670
  }
670
671
  }
671
672
  ```
@@ -708,14 +709,14 @@ For advanced users, you can modify the server behavior by editing the source cod
708
709
 
709
710
  Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0.1:60725` error commonly experienced on Windows systems:
710
711
 
711
- **Enhanced Brave Path Detection:**
712
- - Added Windows Registry-based Brave detection
713
- - Expanded search to 13+ Windows installation locations including portable installations
714
- - Added support for Brave Nightly fallback
715
- - Environment variable support (`BRAVE_PATH`)
712
+ **Enhanced Chrome Path Detection:**
713
+ - Added Windows Registry-based Chrome detection
714
+ - Expanded search to 15+ Windows installation locations including portable installations
715
+ - Added support for Chrome Canary fallback
716
+ - Environment variable support (`CHROME_PATH`, `PUPPETEER_EXECUTABLE_PATH`)
716
717
 
717
718
  **Windows-Specific Launch Optimizations:**
718
- - 20+ Windows-specific browser flags for better compatibility
719
+ - 20+ Windows-specific Chrome flags for better compatibility
719
720
  - Multiple fallback strategies (5 different connection approaches)
720
721
  - Progressive retry logic with exponential backoff
721
722
  - Enhanced timeout handling (120s for Windows vs 90s for other platforms)
@@ -730,12 +731,12 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
730
731
 
731
732
  1. **Environment Variables (Recommended):**
732
733
  ```bash
733
- set BRAVE_PATH="C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe"
734
+ set CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe"
734
735
  ```
735
736
 
736
- 2. **Manual Brave Path Configuration:**
737
+ 2. **Manual Chrome Path Configuration:**
737
738
  ```text
738
- Ask Claude: "Initialize browser with custom Brave path at C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
739
+ Ask Claude: "Initialize browser with custom Chrome path at C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
739
740
  ```
740
741
 
741
742
  3. **Network Troubleshooting:**
@@ -749,10 +750,10 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
749
750
  # Ensure: 127.0.0.1 localhost
750
751
  ```
751
752
 
752
- 4. **Brave Process Management:**
753
+ 4. **Chrome Process Management:**
753
754
  ```bash
754
- # Kill existing Brave processes
755
- taskkill /f /im brave.exe
755
+ # Kill existing Chrome processes
756
+ taskkill /f /im chrome.exe
756
757
  ```
757
758
 
758
759
  ### Common Issues
@@ -811,20 +812,20 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
811
812
  - Check your PATH includes npm global binaries: `npm config get prefix`
812
813
 
813
814
  3. **Browser won't start**
814
- - Check if Brave Browser is installed in standard locations
815
+ - Check if Chrome/Chromium is installed in standard locations
815
816
  - **Windows specific troubleshooting**:
816
817
 
817
- **Step 1: Verify Brave Installation Paths**
818
+ **Step 1: Verify Chrome Installation Paths**
818
819
  Check these locations in order:
819
- - `C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe`
820
- - `C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe`
821
- - `%LOCALAPPDATA%\BraveSoftware\Brave-Browser\Application\brave.exe`
822
- - `%PROGRAMFILES%\BraveSoftware\Brave-Browser\Application\brave.exe`
820
+ - `C:\Program Files\Google\Chrome\Application\chrome.exe`
821
+ - `C:\Program Files (x86)\Google\Chrome\Application\chrome.exe`
822
+ - `%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe`
823
+ - `%PROGRAMFILES%\Google\Chrome\Application\chrome.exe`
823
824
 
824
825
  **Step 2: Manual Path Configuration**
825
- If Brave is in a different location, specify it manually:
826
+ If Chrome is in a different location, specify it manually:
826
827
  ```
827
- Ask Claude: "Initialize browser with custom Brave path at C:\Your\Brave\Path\brave.exe"
828
+ Ask Claude: "Initialize browser with custom Chrome path at C:\Your\Chrome\Path\chrome.exe"
828
829
  ```
829
830
 
830
831
  **Step 3: Windows Launch Arguments**
@@ -835,15 +836,15 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
835
836
 
836
837
  **Step 4: Windows-Specific Solutions**
837
838
  - **Run as Administrator**: Try running your IDE/terminal as Administrator
838
- - **Windows Defender**: Add Brave and Node.js to Windows Defender exclusions
839
- - **Antivirus Software**: Temporarily disable antivirus to test if it's blocking Brave
839
+ - **Windows Defender**: Add Chrome and Node.js to Windows Defender exclusions
840
+ - **Antivirus Software**: Temporarily disable antivirus to test if it's blocking Chrome
840
841
  - **User Account Control**: Lower UAC settings temporarily for testing
841
- - **Brave Processes**: Kill any existing Brave processes in Task Manager
842
+ - **Chrome Processes**: Kill any existing Chrome processes in Task Manager
842
843
 
843
- **Step 5: Alternative Brave Installation**
844
- If Brave detection still fails:
845
- - Download Brave directly from [brave.com/download](https://brave.com/download/)
846
- - Install to default location (`C:\Program Files\BraveSoftware\Brave-Browser\`)
844
+ **Step 5: Alternative Chrome Installation**
845
+ If Chrome detection still fails:
846
+ - Download Chrome directly from [google.com/chrome](https://www.google.com/chrome/)
847
+ - Install to default location (`C:\Program Files\Google\Chrome\`)
847
848
  - Restart your IDE after installation
848
849
 
849
850
  **Step 6: PowerShell vs Command Prompt**
@@ -856,10 +857,10 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
856
857
  - Clear npm cache: `npm cache clean --force`
857
858
  - Reinstall global packages: `npm install -g brave-real-browser-mcp-server@latest`
858
859
 
859
- - **Linux**: Install Brave: `sudo apt install brave-browser`
860
- - **macOS**: Ensure Brave is in `/Applications/Brave Browser.app`
860
+ - **Linux**: Install dependencies: `sudo apt-get install -y google-chrome-stable`
861
+ - **macOS**: Ensure Chrome is in `/Applications/`
861
862
  - Try with `headless: true` first
862
- - Check console output for Brave path detection messages
863
+ - Check console output for Chrome path detection messages
863
864
 
864
865
  4. **Claude doesn't see the MCP server**
865
866
  - Verify `claude_desktop_config.json` is in the correct location
@@ -885,7 +886,7 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
885
886
  - Check if server status shows "connected" or error messages
886
887
 
887
888
  - **Environment Variables**:
888
- - If using custom environment variables (Brave path, proxy), verify they're correctly set
889
+ - If using custom environment variables (Chrome path, proxy), verify they're correctly set
889
890
  - Test without environment variables first: `claude mcp add brave-real-browser -- npx brave-real-browser-mcp-server@latest`
890
891
 
891
892
  - **Node.js and npx Issues**:
@@ -916,7 +917,7 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
916
917
  - **JSON Syntax Validation**:
917
918
  - Use [jsonlint.com](https://jsonlint.com/) to validate JSON syntax
918
919
  - Common issues: missing commas, incorrect quotes, trailing commas
919
- - Ensure proper escaping of Windows paths: `"C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe"`
920
+ - Ensure proper escaping of Windows paths: `"C:/Program Files/Google/Chrome/Application/chrome.exe"`
920
921
 
921
922
  - **Cursor IDE Restart Process**:
922
923
  - Close Cursor IDE completely (check Task Manager on Windows)
@@ -1008,11 +1009,11 @@ A: Supports reCAPTCHA, hCaptcha, and Cloudflare Turnstile through brave-real-bro
1008
1009
  **Q: Is this detectable by websites?**
1009
1010
  A: brave-real-browser includes anti-detection features, but no solution is 100% undetectable.
1010
1011
 
1011
- **Q: Can I use custom browser extensions?**
1012
+ **Q: Can I use custom Chrome extensions?**
1012
1013
  A: Yes, through the `plugins` option in browser_init.
1013
1014
 
1014
1015
  **Q: Does it work on all operating systems?**
1015
- A: Yes, tested on Windows, macOS, and Linux. The server automatically detects Brave installations on all platforms.
1016
+ A: Yes, tested on Windows, macOS, and Linux. The server automatically detects Chrome installations on all platforms.
1016
1017
 
1017
1018
  **Q: What's the difference between Claude Desktop, Claude Code CLI, and Cursor IDE configurations?**
1018
1019
  A: Here's a comparison:
@@ -1033,30 +1034,30 @@ A: Here's a comparison:
1033
1034
  - **Claude Code CLI**: `claude mcp add brave-real-browser -- npx brave-real-browser-mcp-server@latest`
1034
1035
  - **Cursor IDE**: One-click install or manual JSON config
1035
1036
 
1036
- **Q: What if Brave is installed in a non-standard location?**
1037
- A: The server dramatically improves Brave detection by searching 13+ locations including portable installations and using Windows Registry detection. If Brave is still not found automatically, you can:
1038
- 1. Set environment variable: `set BRAVE_PATH="C:\Your\Brave\Path\brave.exe"`
1039
- 2. Use the `customConfig.bravePath` option: `{"customConfig": {"bravePath": "C:\\Custom\\Brave\\brave.exe"}}`
1040
-
1041
- **Q: Why am I getting "Brave not found" or ECONNREFUSED errors on Windows?**
1042
- A: The server includes comprehensive fixes for Windows Brave detection and connection issues. The server now automatically searches these locations and more:
1043
- - `C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe`
1044
- - `C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe`
1045
- - `%LOCALAPPDATA%\BraveSoftware\Brave-Browser\Application\brave.exe`
1046
- - `%USERPROFILE%\AppData\Local\BraveSoftware\Brave-Browser\Application\brave.exe`
1047
- - Brave Nightly installations
1048
- - Portable Brave installations
1037
+ **Q: What if Chrome is installed in a non-standard location?**
1038
+ A: Version 1.3.0 dramatically improves Chrome detection. The server now searches 15+ locations including portable installations and uses Windows Registry detection. If Chrome is still not found automatically, you can:
1039
+ 1. Set environment variable: `set CHROME_PATH="C:\Your\Chrome\Path\chrome.exe"`
1040
+ 2. Use the `customConfig.chromePath` option: `{"customConfig": {"chromePath": "C:\\Custom\\Chrome\\chrome.exe"}}`
1041
+
1042
+ **Q: Why am I getting "Chrome not found" or ECONNREFUSED errors on Windows?**
1043
+ A: Version 1.3.0 includes comprehensive fixes for Windows Chrome detection and connection issues. The server now automatically searches these locations and more:
1044
+ - `C:\Program Files\Google\Chrome\Application\chrome.exe`
1045
+ - `C:\Program Files (x86)\Google\Chrome\Application\chrome.exe`
1046
+ - `%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe`
1047
+ - `%USERPROFILE%\AppData\Local\Google\Chrome\Application\chrome.exe`
1048
+ - Chrome Canary installations
1049
+ - Portable Chrome installations
1049
1050
  - Registry-detected installations
1050
1051
 
1051
- The server also implements multiple connection strategies with automatic fallback between localhost and 127.0.0.1, plus enhanced Windows-specific browser flags for better compatibility.
1052
+ The server also implements multiple connection strategies with automatic fallback between localhost and 127.0.0.1, plus enhanced Windows-specific Chrome flags for better compatibility.
1052
1053
 
1053
- **Q: I'm still getting ECONNREFUSED errors. What should I do?**
1054
+ **Q: I'm still getting ECONNREFUSED errors after upgrading to v1.3.0. What should I do?**
1054
1055
  A: Try these steps in order:
1055
- 1. Set the `BRAVE_PATH` environment variable to your Brave location
1056
- 2. Kill all existing Brave processes: `taskkill /f /im brave.exe`
1056
+ 1. Set the `CHROME_PATH` environment variable to your Chrome location
1057
+ 2. Kill all existing Chrome processes: `taskkill /f /im chrome.exe`
1057
1058
  3. Check your Windows hosts file contains: `127.0.0.1 localhost`
1058
1059
  4. Try running your IDE as Administrator
1059
- 5. Add Brave to Windows Defender exclusions
1060
+ 5. Add Chrome to Windows Defender exclusions
1060
1061
  6. If using a VPN/proxy, try disabling it temporarily
1061
1062
 
1062
1063
  ### Debug Mode
@@ -1155,7 +1156,7 @@ npm run test:debug # Environment diagnostics and troubleshooting
1155
1156
 
1156
1157
  Debug tools provide:
1157
1158
  - Environment validation (Node.js version, platform, memory)
1158
- - Brave installation detection with specific paths
1159
+ - Chrome installation detection with specific paths
1159
1160
  - Quick server health check with startup timing
1160
1161
  - Network connectivity validation
1161
1162
  - Build status verification
@@ -1197,43 +1198,9 @@ This project is licensed under the MIT License - see the LICENSE file for detail
1197
1198
 
1198
1199
  ## Acknowledgments
1199
1200
 
1200
- This project is built upon and adapted from the following excellent open-source projects:
1201
+ This MCP server is based on the excellent [brave-real-browser](https://github.com/ZFC-Digital/brave-real-browser) library by ZFC-Digital.
1201
1202
 
1202
- ### 1. puppeteer-real-browser by ZFC-Digital
1203
+ **Thank you** to the brave-real-browser team for creating such a powerful and detection-resistant browser automation solution!
1203
1204
 
1204
- The foundation of this project is the powerful [puppeteer-real-browser](https://github.com/ZFC-Digital/puppeteer-real-browser) library by **ZFC-Digital**.
1205
-
1206
- **Thank you** to the ZFC-Digital team for creating such a powerful and detection-resistant browser automation solution!
1207
-
1208
- - **GitHub:** [https://github.com/ZFC-Digital/puppeteer-real-browser](https://github.com/ZFC-Digital/puppeteer-real-browser)
1209
- - **npm (original):** [https://www.npmjs.com/package/puppeteer-real-browser](https://www.npmjs.com/package/puppeteer-real-browser)
1210
- - **npm (Brave version):** [https://www.npmjs.com/package/brave-real-browser](https://www.npmjs.com/package/brave-real-browser)
1211
- - **License:** MIT
1212
-
1213
- ### 2. puppeteer-real-browser-mcp-server by withlinda13
1214
-
1215
- This project is also based on [puppeteer-real-browser-mcp-server](https://github.com/withLinda/puppeteer-real-browser-mcp-server) by **withlinda13**, which provides the MCP (Model Context Protocol) server wrapper for browser automation.
1216
-
1217
- **Thank you** to withlinda13 for the excellent MCP integration and server architecture!
1218
-
1219
- - **GitHub:** [https://github.com/withLinda/puppeteer-real-browser-mcp-server](https://github.com/withLinda/puppeteer-real-browser-mcp-server)
1220
- - **License:** MIT
1221
-
1222
- ### Our Contributions
1223
-
1224
- This fork (Brave Real Browser MCP Server) includes the following enhancements:
1225
-
1226
- - ✅ **Brave Browser Support:** Complete adaptation from Chrome to Brave Browser
1227
- - ✅ **60+ Specialized Tools:** Expanded from 11 to 60+ tools for comprehensive automation
1228
- - ✅ **Comprehensive Testing:** 219 unit tests ensuring reliability
1229
- - ✅ **Data Extraction Tools:** Advanced scraping capabilities (tables, lists, images, links)
1230
- - ✅ **AI-Powered Features:** Content classification, sentiment analysis, summarization
1231
- - ✅ **Visual Tools:** Screenshots, PDF generation, video recording
1232
- - ✅ **Data Processing:** Smart text cleaning, price parsing, date normalization
1233
- - ✅ **Enhanced Documentation:** Detailed guides and examples
1234
-
1235
- ### License
1236
-
1237
- This project maintains the MIT License from the original projects. See [LICENSE](LICENSE) file for complete details.
1238
-
1239
- **All credit goes to the original authors for their foundational work. This project simply adapts and extends their excellent work for Brave Browser with additional features.**
1205
+ - GitHub: [https://github.com/ZFC-Digital/brave-real-browser](https://github.com/ZFC-Digital/brave-real-browser)
1206
+ - npm: [https://www.npmjs.com/package/brave-real-browser](https://www.npmjs.com/package/brave-real-browser)
@@ -165,28 +165,28 @@ export function isCircuitBreakerOpen() {
165
165
  }
166
166
  return false;
167
167
  }
168
- // Windows Registry Brave detection
169
- function getWindowsBraveFromRegistry() {
168
+ // Windows Registry Chrome detection
169
+ function getWindowsChromeFromRegistry() {
170
170
  if (process.platform !== 'win32')
171
171
  return null;
172
172
  try {
173
173
  const { execSync } = require('child_process');
174
174
  const registryQueries = [
175
- 'reg query "HKEY_CURRENT_USER\\Software\\BraveSoftware\\Brave-Browser\\BLBeacon" /v version 2>nul',
176
- 'reg query "HKEY_LOCAL_MACHINE\\Software\\BraveSoftware\\Brave-Browser\\BLBeacon" /v version 2>nul',
177
- 'reg query "HKEY_LOCAL_MACHINE\\Software\\WOW6432Node\\BraveSoftware\\Brave-Browser\\BLBeacon" /v version 2>nul',
175
+ 'reg query "HKEY_CURRENT_USER\\Software\\Google\\Chrome\\BLBeacon" /v version 2>nul',
176
+ 'reg query "HKEY_LOCAL_MACHINE\\Software\\Google\\Chrome\\BLBeacon" /v version 2>nul',
177
+ 'reg query "HKEY_LOCAL_MACHINE\\Software\\WOW6432Node\\Google\\Chrome\\BLBeacon" /v version 2>nul',
178
178
  ];
179
179
  for (const query of registryQueries) {
180
180
  try {
181
181
  const result = execSync(query, { encoding: 'utf8', timeout: 5000 });
182
182
  if (result) {
183
183
  const standardPaths = [
184
- 'C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe',
185
- 'C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe'
184
+ 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
185
+ 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'
186
186
  ];
187
187
  for (const standardPath of standardPaths) {
188
188
  if (fs.existsSync(standardPath)) {
189
- console.error(`✓ Found Brave via Registry detection: ${standardPath}`);
189
+ console.error(`✓ Found Chrome via Registry detection: ${standardPath}`);
190
190
  return standardPath;
191
191
  }
192
192
  }
@@ -197,11 +197,11 @@ function getWindowsBraveFromRegistry() {
197
197
  }
198
198
  }
199
199
  try {
200
- const installDirQuery = 'reg query "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\brave.exe" /ve 2>nul';
200
+ const installDirQuery = 'reg query "HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe" /ve 2>nul';
201
201
  const result = execSync(installDirQuery, { encoding: 'utf8', timeout: 5000 });
202
202
  const match = result.match(/REG_SZ\s+(.+\.exe)/);
203
203
  if (match && match[1] && fs.existsSync(match[1])) {
204
- console.error(`✓ Found Brave via App Paths registry: ${match[1]}`);
204
+ console.error(`✓ Found Chrome via App Paths registry: ${match[1]}`);
205
205
  return match[1];
206
206
  }
207
207
  }
@@ -210,35 +210,39 @@ function getWindowsBraveFromRegistry() {
210
210
  }
211
211
  }
212
212
  catch (error) {
213
- console.error('Windows Registry Brave detection failed:', error instanceof Error ? error.message : String(error));
213
+ console.error('Windows Registry Chrome detection failed:', error instanceof Error ? error.message : String(error));
214
214
  }
215
215
  return null;
216
216
  }
217
- // Brave path detection for cross-platform support with enhanced Windows support
218
- export function detectBravePath() {
217
+ // Chrome path detection for cross-platform support with enhanced Windows support
218
+ export function detectChromePath() {
219
219
  const platform = process.platform;
220
220
  // Check environment variables first
221
- const envBravePath = process.env.BRAVE_PATH || process.env.PUPPETEER_EXECUTABLE_PATH;
222
- if (envBravePath && fs.existsSync(envBravePath)) {
223
- console.error(`✓ Found Brave via environment variable: ${envBravePath}`);
224
- return envBravePath;
221
+ const envChromePath = process.env.CHROME_PATH || process.env.PUPPETEER_EXECUTABLE_PATH;
222
+ if (envChromePath && fs.existsSync(envChromePath)) {
223
+ console.error(`✓ Found Chrome via environment variable: ${envChromePath}`);
224
+ return envChromePath;
225
225
  }
226
226
  let possiblePaths = [];
227
227
  switch (platform) {
228
228
  case 'win32':
229
229
  possiblePaths = [
230
- 'C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe',
231
- 'C:\\Program Files (x86)\\BraveSoftware\\Brave-Browser\\Application\\brave.exe',
232
- path.join(process.env.LOCALAPPDATA || '', 'BraveSoftware\\Brave-Browser\\Application\\brave.exe'),
233
- path.join(process.env.USERPROFILE || '', 'AppData\\Local\\BraveSoftware\\Brave-Browser\\Application\\brave.exe'),
234
- path.join(process.env.PROGRAMFILES || '', 'BraveSoftware\\Brave-Browser\\Application\\brave.exe'),
235
- path.join(process.env['PROGRAMFILES(X86)'] || '', 'BraveSoftware\\Brave-Browser\\Application\\brave.exe'),
236
- 'C:\\Users\\Public\\Desktop\\Brave Browser.lnk',
237
- 'C:\\Brave\\brave.exe',
238
- 'C:\\portable\\Brave\\brave.exe',
230
+ 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',
231
+ 'C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe',
232
+ path.join(process.env.LOCALAPPDATA || '', 'Google\\Chrome\\Application\\chrome.exe'),
233
+ path.join(process.env.USERPROFILE || '', 'AppData\\Local\\Google\\Chrome\\Application\\chrome.exe'),
234
+ path.join(process.env.PROGRAMFILES || '', 'Google\\Chrome\\Application\\chrome.exe'),
235
+ path.join(process.env['PROGRAMFILES(X86)'] || '', 'Google\\Chrome\\Application\\chrome.exe'),
236
+ path.join(process.env.LOCALAPPDATA || '', 'Google\\Chrome SxS\\Application\\chrome.exe'),
237
+ 'C:\\Program Files\\Google\\Chrome SxS\\Application\\chrome.exe',
238
+ 'C:\\Users\\Public\\Desktop\\Google Chrome.exe',
239
+ path.join(process.env.APPDATA || '', 'Google\\Chrome\\Application\\chrome.exe'),
240
+ 'C:\\Chrome\\chrome.exe',
241
+ 'C:\\google\\chrome\\chrome.exe',
242
+ 'C:\\PortableApps\\GoogleChromePortable\\App\\Chrome-bin\\chrome.exe',
239
243
  ];
240
244
  try {
241
- const registryPath = getWindowsBraveFromRegistry();
245
+ const registryPath = getWindowsChromeFromRegistry();
242
246
  if (registryPath) {
243
247
  possiblePaths.unshift(registryPath);
244
248
  }
@@ -249,28 +253,31 @@ export function detectBravePath() {
249
253
  break;
250
254
  case 'darwin':
251
255
  possiblePaths = [
252
- '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser',
253
- '/Applications/Brave Browser Nightly.app/Contents/MacOS/Brave Browser Nightly',
256
+ '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
257
+ '/Applications/Chromium.app/Contents/MacOS/Chromium',
258
+ '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'
254
259
  ];
255
260
  break;
256
261
  case 'linux':
257
262
  possiblePaths = [
258
- '/usr/bin/brave-browser',
259
- '/usr/bin/brave',
260
- '/snap/bin/brave',
261
- '/var/lib/snapd/snap/bin/brave',
262
- '/opt/brave.com/brave/brave',
263
+ '/usr/bin/google-chrome',
264
+ '/usr/bin/google-chrome-stable',
265
+ '/usr/bin/chromium-browser',
266
+ '/usr/bin/chromium',
267
+ '/snap/bin/chromium',
268
+ '/usr/bin/chrome',
269
+ '/opt/google/chrome/chrome'
263
270
  ];
264
271
  break;
265
272
  default:
266
- console.error(`Platform ${platform} not explicitly supported for Brave path detection`);
273
+ console.error(`Platform ${platform} not explicitly supported for Chrome path detection`);
267
274
  return null;
268
275
  }
269
- for (const bravePath of possiblePaths) {
276
+ for (const chromePath of possiblePaths) {
270
277
  try {
271
- if (fs.existsSync(bravePath)) {
272
- console.error(`✓ Found Brave at: ${bravePath}`);
273
- return bravePath;
278
+ if (fs.existsSync(chromePath)) {
279
+ console.error(`✓ Found Chrome at: ${chromePath}`);
280
+ return chromePath;
274
281
  }
275
282
  }
276
283
  catch (error) {
@@ -278,7 +285,7 @@ export function detectBravePath() {
278
285
  }
279
286
  }
280
287
  if (platform === 'win32') {
281
- console.error(`❌ Brave not found at any expected Windows paths:`);
288
+ console.error(`❌ Chrome not found at any expected Windows paths:`);
282
289
  console.error(` Searched ${possiblePaths.length} locations:`);
283
290
  possiblePaths.slice(0, 8).forEach(path => console.error(` - ${path}`));
284
291
  if (possiblePaths.length > 8) {
@@ -286,23 +293,23 @@ export function detectBravePath() {
286
293
  }
287
294
  console.error(`\n 🔧 Windows Troubleshooting Solutions:`);
288
295
  console.error(` 1. Environment Variables (Recommended):`);
289
- console.error(` - Set BRAVE_PATH environment variable to your Brave location`);
290
- console.error(` - Example: set BRAVE_PATH=\"C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe\"`);
296
+ console.error(` - Set CHROME_PATH environment variable to your Chrome location`);
297
+ console.error(` - Example: set CHROME_PATH="C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"`);
291
298
  console.error(` - For Cursor IDE: Add env vars to MCP configuration`);
292
- console.error(`\n 2. Brave Installation:`);
293
- console.error(` - Download/reinstall Brave: https://brave.com/download/`);
294
- console.error(` - Check if Brave is installed for all users vs current user only`);
295
- console.error(` - Try Brave Nightly if regular Brave fails`);
299
+ console.error(`\n 2. Chrome Installation:`);
300
+ console.error(` - Download/reinstall Chrome: https://www.google.com/chrome/`);
301
+ console.error(` - Check if Chrome is installed for all users vs current user only`);
302
+ console.error(` - Try Chrome Canary if regular Chrome fails`);
296
303
  console.error(`\n 3. Permissions & Security:`);
297
304
  console.error(` - Run IDE/terminal as Administrator`);
298
- console.error(` - Add Brave to Windows Defender exclusions`);
299
- console.error(` - Check if antivirus software is blocking Brave`);
305
+ console.error(` - Add Chrome to Windows Defender exclusions`);
306
+ console.error(` - Check if antivirus software is blocking Chrome`);
300
307
  console.error(`\n 4. Custom Configuration:`);
301
- console.error(` - Use customConfig.bravePath parameter in browser_init`);
302
- console.error(` - Example: {\"customConfig\": {\"bravePath\": \"C:\\\\\\custom\\\\\\path\\\\\\brave.exe\"}}`);
308
+ console.error(` - Use customConfig.chromePath parameter in browser_init`);
309
+ console.error(` - Example: {"customConfig": {"chromePath": "C:\\\\custom\\\\path\\\\chrome.exe"}}`);
303
310
  }
304
311
  else {
305
- console.error(`❌ Brave not found at any expected paths for platform: ${platform}`);
312
+ console.error(`❌ Chrome not found at any expected paths for platform: ${platform}`);
306
313
  console.error(` Searched locations:`);
307
314
  possiblePaths.forEach(path => console.error(` - ${path}`));
308
315
  }
@@ -389,10 +396,10 @@ export async function initializeBrowser(options) {
389
396
  await closeBrowser();
390
397
  }
391
398
  }
392
- const detectedBravePath = detectBravePath();
399
+ const detectedChromePath = detectChromePath();
393
400
  const customConfig = options?.customConfig ?? {};
394
401
  const platform = process.platform;
395
- const getOptimalBrowserFlags = (isWindows, isRetry = false) => {
402
+ const getOptimalChromeFlags = (isWindows, isRetry = false) => {
396
403
  // 2025 best practices: Minimal, secure, performance-focused flags
397
404
  const baseFlags = [
398
405
  '--no-first-run',
@@ -419,16 +426,16 @@ export async function initializeBrowser(options) {
419
426
  // When ignoreAllFlags=true, brave-real-browser skips DEFAULT_FLAGS modification
420
427
  // which causes the analytics popup issue
421
428
  const useIgnoreAllFlags = options?.ignoreAllFlags ?? false;
422
- // Don't pass braveFlags in customConfig - let brave-real-browser handle it via ignoreAllFlags=false
423
- const browserConfig = {
429
+ // Don't pass chromeFlags in customConfig - let brave-real-browser handle it via ignoreAllFlags=false
430
+ const chromeConfig = {
424
431
  ...customConfig
425
432
  };
426
- if (detectedBravePath && !browserConfig.bravePath) {
427
- browserConfig.bravePath = detectedBravePath;
433
+ if (detectedChromePath && !chromeConfig.chromePath) {
434
+ chromeConfig.chromePath = detectedChromePath;
428
435
  }
429
436
  const connectOptions = {
430
437
  headless: options?.headless ?? false,
431
- customConfig: browserConfig,
438
+ customConfig: chromeConfig,
432
439
  turnstile: true,
433
440
  disableXvfb: options?.disableXvfb ?? true,
434
441
  // CRITICAL: Must be false by default to allow brave-real-browser to modify flags
@@ -441,8 +448,7 @@ export async function initializeBrowser(options) {
441
448
  },
442
449
  };
443
450
  if (options?.proxy) {
444
- connectOptions.customConfig.braveFlags = connectOptions.customConfig.braveFlags || [];
445
- connectOptions.customConfig.braveFlags.push(`--proxy-server=${options.proxy}`);
451
+ connectOptions.customConfig.chromeFlags.push(`--proxy-server=${options.proxy}`);
446
452
  }
447
453
  if (options?.plugins && Array.isArray(options.plugins)) {
448
454
  connectOptions.plugins = options.plugins;
@@ -464,10 +470,10 @@ export async function initializeBrowser(options) {
464
470
  ...connectOptions,
465
471
  ...modifications,
466
472
  customConfig: {
467
- ...browserConfig,
473
+ ...chromeConfig,
468
474
  ...modifications.customConfig,
469
- braveFlags: [
470
- ...(modifications.customConfig?.braveFlags || browserConfig.braveFlags || []),
475
+ chromeFlags: [
476
+ ...(modifications.customConfig?.chromeFlags || chromeConfig.chromeFlags),
471
477
  ...(availablePort ? [`--remote-debugging-port=${availablePort}`] : ['--remote-debugging-port=0'])
472
478
  ]
473
479
  }
@@ -478,7 +484,7 @@ export async function initializeBrowser(options) {
478
484
  const primaryStrategy = {
479
485
  strategyName: 'User-Defined Configuration',
480
486
  strategy: {
481
- executablePath: detectedBravePath,
487
+ executablePath: detectedChromePath,
482
488
  headless: options?.headless ?? false,
483
489
  turnstile: true,
484
490
  args: [
@@ -487,7 +493,7 @@ export async function initializeBrowser(options) {
487
493
  disableXvfb: true,
488
494
  // CRITICAL: Must be false to allow brave-real-browser to process DEFAULT_FLAGS
489
495
  ignoreAllFlags: false,
490
- customConfig: browserConfig,
496
+ customConfig: chromeConfig,
491
497
  connectOption: {
492
498
  defaultViewport: null,
493
499
  },
@@ -499,7 +505,7 @@ export async function initializeBrowser(options) {
499
505
  createConnectionStrategy('Minimal Configuration', {
500
506
  customConfig: {
501
507
  ignoreDefaultFlags: false,
502
- braveFlags: [
508
+ chromeFlags: [
503
509
  '--no-first-run',
504
510
  '--no-default-browser-check',
505
511
  '--disable-default-apps',
@@ -511,7 +517,7 @@ export async function initializeBrowser(options) {
511
517
  createConnectionStrategy('Optimal Configuration', {
512
518
  customConfig: {
513
519
  ignoreDefaultFlags: false,
514
- braveFlags: [
520
+ chromeFlags: [
515
521
  '--no-first-run',
516
522
  '--no-default-browser-check',
517
523
  '--disable-default-apps',
@@ -523,7 +529,7 @@ export async function initializeBrowser(options) {
523
529
  createConnectionStrategy('Network Fallback', {
524
530
  customConfig: {
525
531
  ignoreDefaultFlags: false,
526
- braveFlags: [
532
+ chromeFlags: [
527
533
  '--no-first-run',
528
534
  '--no-default-browser-check',
529
535
  '--disable-default-apps',
@@ -546,8 +552,8 @@ export async function initializeBrowser(options) {
546
552
  console.error(` Strategy config: ${JSON.stringify({
547
553
  headless: strategy.headless,
548
554
  ignoreAllFlags: strategy.ignoreAllFlags,
549
- braveFlags: strategy.customConfig?.braveFlags || 'none',
550
- bravePath: strategy.customConfig?.bravePath || 'default'
555
+ chromeFlags: strategy.customConfig?.chromeFlags || 'none',
556
+ chromePath: strategy.customConfig?.chromePath || 'default'
551
557
  })}`);
552
558
  const connectResult = await connect(strategy);
553
559
  console.error(` ✅ Connection successful with ${strategyName}`);
@@ -563,8 +569,8 @@ export async function initializeBrowser(options) {
563
569
  ...strategy,
564
570
  customConfig: {
565
571
  ...strategy.customConfig,
566
- braveFlags: [
567
- ...(strategy.customConfig.braveFlags || []).filter((flag) => !flag.includes('remote-debugging-address')),
572
+ chromeFlags: [
573
+ ...strategy.customConfig.chromeFlags.filter((flag) => !flag.includes('remote-debugging-address')),
568
574
  `--remote-debugging-address=${fallbackHost}`
569
575
  ]
570
576
  }
@@ -586,13 +592,13 @@ export async function initializeBrowser(options) {
586
592
  lastError = error instanceof Error ? error : new Error(String(error));
587
593
  console.error(`❌ ${strategyName} failed:`, lastError.message);
588
594
  if (lastError.message.includes('ECONNREFUSED')) {
589
- console.error(` 🔍 ECONNREFUSED detected - likely Brave connection/port issue`);
595
+ console.error(` 🔍 ECONNREFUSED detected - likely Chrome connection/port issue`);
590
596
  }
591
597
  else if (lastError.message.includes('ENOENT') || lastError.message.includes('spawn')) {
592
- console.error(` 🔍 Brave executable issue detected`);
598
+ console.error(` 🔍 Chrome executable issue detected`);
593
599
  }
594
600
  else if (lastError.message.includes('timeout')) {
595
- console.error(` 🔍 Connection timeout - Brave may be slow to start`);
601
+ console.error(` 🔍 Connection timeout - Chrome may be slow to start`);
596
602
  }
597
603
  if (strategyIndex < connectionStrategies.length - 1) {
598
604
  const delayMs = 2000 + (strategyIndex * 1000);
@@ -603,7 +609,7 @@ export async function initializeBrowser(options) {
603
609
  }
604
610
  updateCircuitBreakerOnFailure();
605
611
  const errorMessage = lastError ? lastError.message : 'Unknown connection error';
606
- if (errorMessage.includes('ENOENT') || errorMessage.includes('spawn') || errorMessage.includes('ECONNREFUSED')) {
612
+ if (errorMessage.includes('ENOENT') || errorMessage.includes('spawn') || errorMessage.includes('chrome') || errorMessage.includes('ECONNREFUSED')) {
607
613
  if (platform === 'win32') {
608
614
  console.error(`❌ All browser connection strategies failed on Windows:`);
609
615
  console.error(` Final Error: ${errorMessage}`);
@@ -611,33 +617,34 @@ export async function initializeBrowser(options) {
611
617
  if (errorMessage.includes('ECONNREFUSED')) {
612
618
  console.error(`\n 🚨 ECONNREFUSED Error Specific Solutions:`);
613
619
  console.error(` 1. Port/Connection Issues:`);
614
- console.error(` - Browser DevTools Protocol port is being blocked`);
615
- console.error(` - Add Brave to Windows Firewall exceptions`);
620
+ console.error(` - Chrome DevTools Protocol port is being blocked`);
621
+ console.error(` - Add Chrome to Windows Firewall exceptions`);
616
622
  console.error(` - Check if localhost resolves to 127.0.0.1 (run: ping localhost)`);
617
- console.error(` - Try different browser flags: --remote-debugging-port=0`);
623
+ console.error(` - Try different Chrome flags: --remote-debugging-port=0`);
618
624
  console.error(`\n 2. Network Configuration:`);
619
625
  console.error(` - Disable VPN/proxy temporarily`);
620
626
  console.error(` - Check Windows hosts file (C:\\Windows\\System32\\drivers\\etc\\hosts)`);
621
627
  console.error(` - Ensure localhost points to 127.0.0.1`);
622
- console.error(`\n 3. Browser Process Management:`);
623
- console.error(` - Kill all brave.exe processes in Task Manager`);
624
- console.error(` - Clear Brave user data: %LOCALAPPDATA%\\BraveSoftware\\Brave-Browser\\User Data`);
625
- console.error(` - Try running Brave manually to test: brave.exe --remote-debugging-port=9222`);
628
+ console.error(`\n 3. Chrome Process Management:`);
629
+ console.error(` - Kill all chrome.exe processes in Task Manager`);
630
+ console.error(` - Clear Chrome user data: %LOCALAPPDATA%\\Google\\Chrome\\User Data`);
631
+ console.error(` - Try running Chrome manually to test: chrome.exe --remote-debugging-port=9222`);
626
632
  }
627
633
  console.error(`\n 🔧 General Solutions:`);
628
634
  console.error(` 1. Environment Variables (Recommended):`);
629
- console.error(` - Set BRAVE_PATH environment variable`);
630
- console.error(` - Example: set BRAVE_PATH="C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"`);
631
- console.error(`\n 2. Brave Installation:`);
632
- console.error(` - Download/reinstall Brave: https://brave.com/download/`);
633
- console.error(` - Try Brave Nightly: https://brave.com/download-nightly/`);
635
+ console.error(` - Set CHROME_PATH environment variable`);
636
+ console.error(` - Example: set CHROME_PATH="C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"`);
637
+ console.error(`\n 2. Chrome Installation:`);
638
+ console.error(` - Download/reinstall Chrome: https://www.google.com/chrome/`);
639
+ console.error(` - Try Chrome Canary: https://www.google.com/chrome/canary/`);
634
640
  console.error(`\n 3. Permissions & Security:`);
635
641
  console.error(` - Run as Administrator`);
636
- console.error(` - Add Brave to Windows Defender exclusions`);
642
+ console.error(` - Add Chrome to Windows Defender exclusions`);
637
643
  console.error(` - Temporarily disable antivirus software`);
638
644
  console.error(`\n 4. Advanced Configuration:`);
639
- console.error(` - Use customConfig.bravePath in browser_init`);
645
+ console.error(` - Use customConfig.chromePath in browser_init`);
640
646
  console.error(` - Try headless mode: {"headless": true}`);
647
+ console.error(` - Use environment variable: PUPPETEER_EXECUTABLE_PATH`);
641
648
  }
642
649
  else {
643
650
  console.error(`❌ Browser launch failed on ${platform}:`);
@@ -695,23 +702,21 @@ export async function closeBrowser() {
695
702
  }
696
703
  }
697
704
  }
698
- // Force kill all Brave processes system-wide
699
- export async function forceKillAllBrowserProcesses() {
705
+ // Force kill all Chrome processes system-wide
706
+ export async function forceKillAllChromeProcesses() {
700
707
  try {
701
708
  const { spawn } = await import('child_process');
702
709
  if (process.platform !== 'win32') {
703
- // Brave processes
704
- spawn('pkill', ['-f', 'Brave Browser'], { stdio: 'ignore' });
705
- spawn('pkill', ['-f', 'brave'], { stdio: 'ignore' });
710
+ spawn('pkill', ['-f', 'Google Chrome'], { stdio: 'ignore' });
711
+ spawn('pkill', ['-f', 'chrome'], { stdio: 'ignore' });
706
712
  }
707
713
  else {
708
- // Brave on Windows
709
- spawn('taskkill', ['/F', '/IM', 'brave.exe'], { stdio: 'ignore' });
710
- spawn('taskkill', ['/F', '/IM', 'Brave.exe'], { stdio: 'ignore' });
714
+ spawn('taskkill', ['/F', '/IM', 'chrome.exe'], { stdio: 'ignore' });
715
+ spawn('taskkill', ['/F', '/IM', 'GoogleChrome.exe'], { stdio: 'ignore' });
711
716
  }
712
717
  }
713
718
  catch (error) {
714
- console.error('Error force-killing browser processes:', error);
719
+ console.error('Error force-killing Chrome processes:', error);
715
720
  }
716
721
  }
717
722
  // Getters for browser instances
@@ -5,12 +5,12 @@
5
5
  * - AAA Pattern (Arrange-Act-Assert)
6
6
  * - Behavior-focused testing with proper mocking
7
7
  * - Error categorization and circuit breaker testing
8
- * - Brave detection and network utilities testing
8
+ * - Chrome detection and network utilities testing
9
9
  */
10
10
  import { describe, it, expect, beforeEach, vi } from 'vitest';
11
11
  import * as fs from 'fs';
12
12
  import * as net from 'net';
13
- import { BrowserErrorType, categorizeError, withTimeout, isPortAvailable, testHostConnectivity, findAvailablePort, updateCircuitBreakerOnFailure, updateCircuitBreakerOnSuccess, isCircuitBreakerOpen, detectBravePath, validateSession, findAuthElements, getBrowserInstance, getPageInstance, getContentPriorityConfig, updateContentPriorityConfig, forceKillAllBrowserProcesses } from './browser-manager.js';
13
+ import { BrowserErrorType, categorizeError, withTimeout, isPortAvailable, testHostConnectivity, findAvailablePort, updateCircuitBreakerOnFailure, updateCircuitBreakerOnSuccess, isCircuitBreakerOpen, detectChromePath, validateSession, findAuthElements, getBrowserInstance, getPageInstance, getContentPriorityConfig, updateContentPriorityConfig, forceKillAllChromeProcesses } from './browser-manager.js';
14
14
  // Mock external dependencies
15
15
  vi.mock('fs');
16
16
  vi.mock('net');
@@ -256,58 +256,58 @@ describe('Browser Manager', () => {
256
256
  Date.now = originalNow;
257
257
  });
258
258
  });
259
- describe('Brave Path Detection', () => {
259
+ describe('Chrome Path Detection', () => {
260
260
  it('should return environment variable path when available', () => {
261
261
  // Arrange: Set environment variable and mock file exists
262
- const bravePath = '/custom/brave/path';
263
- process.env.BRAVE_PATH = bravePath;
262
+ const chromePath = '/custom/chrome/path';
263
+ process.env.CHROME_PATH = chromePath;
264
264
  vi.mocked(fs.existsSync).mockReturnValue(true);
265
- // Act: Detect Brave path
266
- const result = detectBravePath();
265
+ // Act: Detect Chrome path
266
+ const result = detectChromePath();
267
267
  // Assert: Should return environment path
268
- expect(result).toBe(bravePath);
269
- expect(fs.existsSync).toHaveBeenCalledWith(bravePath);
268
+ expect(result).toBe(chromePath);
269
+ expect(fs.existsSync).toHaveBeenCalledWith(chromePath);
270
270
  // Cleanup
271
- delete process.env.BRAVE_PATH;
271
+ delete process.env.CHROME_PATH;
272
272
  });
273
- it('should return null when Brave is not found', () => {
273
+ it('should return null when Chrome is not found', () => {
274
274
  // Arrange: Mock file system to return false for all paths
275
275
  vi.mocked(fs.existsSync).mockReturnValue(false);
276
- delete process.env.BRAVE_PATH;
276
+ delete process.env.CHROME_PATH;
277
277
  delete process.env.PUPPETEER_EXECUTABLE_PATH;
278
- // Act: Detect Brave path
279
- const result = detectBravePath();
278
+ // Act: Detect Chrome path
279
+ const result = detectChromePath();
280
280
  // Assert: Should return null
281
281
  expect(result).toBe(null);
282
282
  });
283
- it('should detect Brave on macOS platform', () => {
283
+ it('should detect Chrome on macOS platform', () => {
284
284
  // Arrange: Mock platform and file system
285
285
  Object.defineProperty(process, 'platform', { value: 'darwin' });
286
- const expectedPath = '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser';
286
+ const expectedPath = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome';
287
287
  vi.mocked(fs.existsSync).mockImplementation((path) => path === expectedPath);
288
- delete process.env.BRAVE_PATH;
289
- // Act: Detect Brave path
290
- const result = detectBravePath();
291
- // Assert: Should return macOS Brave path
288
+ delete process.env.CHROME_PATH;
289
+ // Act: Detect Chrome path
290
+ const result = detectChromePath();
291
+ // Assert: Should return macOS Chrome path
292
292
  expect(result).toBe(expectedPath);
293
293
  });
294
- it('should detect Brave on Linux platform', () => {
294
+ it('should detect Chrome on Linux platform', () => {
295
295
  // Arrange: Mock platform and file system
296
296
  Object.defineProperty(process, 'platform', { value: 'linux' });
297
- const expectedPath = '/usr/bin/brave-browser';
297
+ const expectedPath = '/usr/bin/google-chrome';
298
298
  vi.mocked(fs.existsSync).mockImplementation((path) => path === expectedPath);
299
- delete process.env.BRAVE_PATH;
300
- // Act: Detect Brave path
301
- const result = detectBravePath();
302
- // Assert: Should return Linux Brave path
299
+ delete process.env.CHROME_PATH;
300
+ // Act: Detect Chrome path
301
+ const result = detectChromePath();
302
+ // Assert: Should return Linux Chrome path
303
303
  expect(result).toBe(expectedPath);
304
304
  });
305
305
  it('should return null for unsupported platform', () => {
306
306
  // Arrange: Mock unsupported platform
307
307
  Object.defineProperty(process, 'platform', { value: 'freebsd' });
308
- delete process.env.BRAVE_PATH;
309
- // Act: Detect Brave path
310
- const result = detectBravePath();
308
+ delete process.env.CHROME_PATH;
309
+ // Act: Detect Chrome path
310
+ const result = detectChromePath();
311
311
  // Assert: Should return null
312
312
  expect(result).toBe(null);
313
313
  });
@@ -377,17 +377,17 @@ describe('Browser Manager', () => {
377
377
  expect(page).toBe(null);
378
378
  });
379
379
  });
380
- describe('Force Kill Browser Processes', () => {
380
+ describe('Force Kill Chrome Processes', () => {
381
381
  it('should execute without throwing errors', async () => {
382
- // Arrange & Act: Force kill browser processes
382
+ // Arrange & Act: Force kill Chrome processes
383
383
  // Act & Assert: Should not throw error regardless of platform
384
- await expect(forceKillAllBrowserProcesses()).resolves.toBeUndefined();
384
+ await expect(forceKillAllChromeProcesses()).resolves.toBeUndefined();
385
385
  });
386
386
  it('should handle different platforms', async () => {
387
387
  // Arrange: Test with current platform
388
388
  const originalPlatform = process.platform;
389
389
  // Act: Execute force kill
390
- await forceKillAllBrowserProcesses();
390
+ await forceKillAllChromeProcesses();
391
391
  // Assert: Should complete without error
392
392
  expect(process.platform).toBe(originalPlatform);
393
393
  });
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ import { TOOLS, SERVER_INFO, CAPABILITIES, TOOL_NAMES } from './tool-definitions
13
13
  console.error('🔍 [DEBUG] Loading system utils...');
14
14
  import { withErrorHandling } from './system-utils.js';
15
15
  console.error('🔍 [DEBUG] Loading browser manager...');
16
- import { closeBrowser, forceKillAllBrowserProcesses } from './browser-manager.js';
16
+ import { closeBrowser, forceKillAllChromeProcesses } from './browser-manager.js';
17
17
  console.error('🔍 [DEBUG] Loading core infrastructure...');
18
18
  import { setupProcessCleanup } from './core-infrastructure.js';
19
19
  // Import handlers
@@ -266,7 +266,7 @@ async function main() {
266
266
  setupProcessCleanup(async () => {
267
267
  console.error('🔍 [DEBUG] Process cleanup triggered');
268
268
  await closeBrowser();
269
- await forceKillAllBrowserProcesses();
269
+ await forceKillAllChromeProcesses();
270
270
  });
271
271
  // Create and start the server transport
272
272
  console.error('🔍 [DEBUG] Creating StdioServerTransport...');
@@ -25,7 +25,7 @@ export const DEFAULT_CONTENT_PRIORITY_CONFIG = {
25
25
  export const TOOLS = [
26
26
  {
27
27
  name: 'browser_init',
28
- description: 'Initialize a new browser instance with anti-detection features and automatic Brave Browser path detection',
28
+ description: 'Initialize a new browser instance with anti-detection features and automatic Chrome path detection',
29
29
  inputSchema: {
30
30
  type: 'object',
31
31
  properties: {
@@ -41,7 +41,7 @@ export const TOOLS = [
41
41
  },
42
42
  ignoreAllFlags: {
43
43
  type: 'boolean',
44
- description: 'Ignore all browser flags (recommended: true for clean startup without --no-sandbox)',
44
+ description: 'Ignore all Chrome flags (recommended: true for clean startup without --no-sandbox)',
45
45
  default: true,
46
46
  },
47
47
  proxy: {
@@ -62,11 +62,11 @@ export const TOOLS = [
62
62
  },
63
63
  customConfig: {
64
64
  type: 'object',
65
- description: 'Custom configuration for Brave launcher. Use bravePath to specify custom Brave executable path',
65
+ description: 'Custom configuration for Chrome launcher. Use chromePath to specify custom Chrome executable path',
66
66
  properties: {
67
- bravePath: {
67
+ chromePath: {
68
68
  type: 'string',
69
- description: 'Custom path to Brave executable (auto-detected if not specified)',
69
+ description: 'Custom path to Chrome executable (auto-detected if not specified)',
70
70
  },
71
71
  },
72
72
  additionalProperties: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brave-real-browser-mcp-server",
3
- "version": "2.9.16",
3
+ "version": "2.9.17",
4
4
  "description": "MCP server for brave-real-browser",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,10 +28,10 @@
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:brave:cleanup": "pkill -f 'Brave Browser' || true"
31
+ "test:brave:cleanup": "taskkill /F /IM brave.exe || pkill -f brave || true"
32
32
  },
33
33
  "dependencies": {
34
- "@modelcontextprotocol/sdk": "^1.20.0",
34
+ "@modelcontextprotocol/sdk": "^1.20.1",
35
35
  "@types/turndown": "^5.0.5",
36
36
  "ajv": "^8.12.0",
37
37
  "axios": "^1.6.5",
@@ -66,24 +66,17 @@
66
66
  "keywords": [
67
67
  "mcp",
68
68
  "puppeteer",
69
- "browser-automation",
70
- "brave-browser",
71
- "web-scraping",
72
- "automation"
73
- ],
74
- "author": "codeiva4u",
75
- "contributors": [
76
- "ZFC-Digital <https://github.com/ZFC-Digital> (Original puppeteer-real-browser)",
77
- "withlinda13 <https://github.com/withLinda> (Original MCP server wrapper)"
69
+ "browser-automation"
78
70
  ],
71
+ "author": "withlinda13",
79
72
  "license": "MIT",
80
73
  "repository": {
81
74
  "type": "git",
82
- "url": "git+https://github.com/codeiva4u/Brave-Real-Browser-Mcp-Server.git"
75
+ "url": "git+https://github.com/withLinda/brave-real-browser-mcp-server.git"
83
76
  },
84
- "homepage": "https://github.com/codeiva4u/Brave-Real-Browser-Mcp-Server",
77
+ "homepage": "https://github.com/withLinda/brave-real-browser-mcp-server",
85
78
  "bugs": {
86
- "url": "https://github.com/codeiva4u/Brave-Real-Browser-Mcp-Server/issues"
79
+ "url": "https://github.com/withLinda/brave-real-browser-mcp-server/issues"
87
80
  },
88
81
  "bin": {
89
82
  "brave-real-browser-mcp-server": "dist/index.js"
package/LICENSE DELETED
@@ -1,51 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 ZFC-Digital (Original puppeteer-real-browser package)
4
- Copyright (c) 2024 withlinda13 (Original puppeteer-real-browser-mcp-server)
5
- Copyright (c) 2024 codeiva4u (Brave Browser adaptation and modifications)
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy
8
- of this software and associated documentation files (the "Software"), to deal
9
- in the Software without restriction, including without limitation the rights
10
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- copies of the Software, and to permit persons to whom the Software is
12
- furnished to do so, subject to the following conditions:
13
-
14
- The above copyright notice and this permission notice shall be included in all
15
- copies or substantial portions of the Software.
16
-
17
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
- SOFTWARE.
24
-
25
- ---
26
-
27
- ## Acknowledgments
28
-
29
- This project is built upon and adapted from the following excellent open-source projects:
30
-
31
- ### 1. puppeteer-real-browser by ZFC-Digital
32
- - Repository: https://github.com/ZFC-Digital/puppeteer-real-browser
33
- - License: MIT
34
- - Description: A puppeteer library designed to bypass bot-detecting captchas such as Cloudflare
35
- - NPM: https://www.npmjs.com/package/puppeteer-real-browser
36
-
37
- ### 2. puppeteer-real-browser-mcp-server by withlinda13
38
- - Repository: https://github.com/withLinda/puppeteer-real-browser-mcp-server
39
- - License: MIT
40
- - Description: MCP server wrapper for puppeteer-real-browser providing AI assistant integration
41
-
42
- ### Modifications in this Fork:
43
- - Adapted for Brave Browser instead of Chrome
44
- - Updated to use brave-real-browser package
45
- - Enhanced with 60+ specialized tools
46
- - Comprehensive testing suite (219 unit tests)
47
- - Improved documentation and examples
48
- - Additional data extraction and processing capabilities
49
- - AI-powered content analysis features
50
-
51
- All modifications are also released under the MIT License.