brave-real-browser-mcp-server 2.9.12 → 2.9.14
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 +137 -264
- package/dist/browser-manager.js +127 -307
- package/dist/browser-manager.test.js +99 -46
- package/dist/handlers/api-integration-handlers.js +1 -1
- package/dist/handlers/browser-handlers.js +1 -14
- package/dist/handlers/captcha-handlers.js +1 -1
- package/dist/handlers/content-handlers.js +1 -1
- package/dist/handlers/interaction-handlers.test.js +1 -7
- package/dist/handlers/navigation-handlers.js +2 -2
- package/dist/handlers/navigation-handlers.test.js +5 -12
- package/dist/handlers/pagination-handlers.js +10 -25
- package/dist/handlers/visual-tools-handlers.js +1 -1
- package/dist/index.js +60 -268
- package/dist/tool-definitions.js +2 -584
- package/dist/workflow-validation.js +2 -53
- package/package.json +8 -26
- package/dist/handlers/specialized-tools-handlers.js +0 -1738
- package/dist/handlers/video-extraction-handlers.js +0 -368
- package/dist/video-extraction/dom-extractors.js +0 -522
- package/dist/video-extraction/network-extractors.js +0 -421
- package/dist/video-extraction/types.js +0 -61
package/README.md
CHANGED
|
@@ -43,46 +43,6 @@ If you're just using this MCP server (not developing it), you don't need to run
|
|
|
43
43
|
- Download and install Node.js (version 18 or higher)
|
|
44
44
|
- Verify installation by opening terminal/command prompt and typing: `node --version`
|
|
45
45
|
|
|
46
|
-
## Installation for Developers
|
|
47
|
-
|
|
48
|
-
> **Note for Claude Desktop Users:** You don't need to install anything! The npx command in your configuration automatically handles everything. Skip to the [Usage](#usage) section.
|
|
49
|
-
|
|
50
|
-
This section is for developers who want to:
|
|
51
|
-
- Contribute to the project
|
|
52
|
-
- Run the server locally for development
|
|
53
|
-
- Create custom modifications
|
|
54
|
-
|
|
55
|
-
### Global Installation (For Command Line Usage)
|
|
56
|
-
|
|
57
|
-
If you want to run the server directly from the command line without using npx:
|
|
58
|
-
|
|
59
|
-
```bash
|
|
60
|
-
npm install -g brave-real-browser-mcp-server@latest
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
After global installation, you can run:
|
|
64
|
-
```bash
|
|
65
|
-
brave-real-browser-mcp-server
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Development Setup (For Contributors)
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
# Clone the repository
|
|
72
|
-
git clone https://github.com/withLinda/brave-real-browser-mcp-server.git
|
|
73
|
-
cd brave-real-browser-mcp-server
|
|
74
|
-
|
|
75
|
-
# Install dependencies
|
|
76
|
-
npm install
|
|
77
|
-
|
|
78
|
-
# Build the project
|
|
79
|
-
npm run build
|
|
80
|
-
|
|
81
|
-
# Run in development mode
|
|
82
|
-
npm run dev
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
|
|
86
46
|
#### 2. Configure Claude Desktop
|
|
87
47
|
|
|
88
48
|
**For Windows:**
|
|
@@ -101,20 +61,6 @@ npm run dev
|
|
|
101
61
|
}
|
|
102
62
|
```
|
|
103
63
|
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"mcpServers": {
|
|
107
|
-
"brave-real-browser": {
|
|
108
|
-
"command": "npx",
|
|
109
|
-
"args": ["brave-real-browser-mcp-server@latest"],
|
|
110
|
-
"env": {
|
|
111
|
-
"BRAVE_PATH": "C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
64
|
**For Mac:**
|
|
119
65
|
1. Open Finder and press `Cmd+Shift+G`
|
|
120
66
|
2. Go to: `~/Library/Application Support/Claude/`
|
|
@@ -167,23 +113,15 @@ assistants to control a real browser, extract content, and more.
|
|
|
167
113
|
## Features
|
|
168
114
|
|
|
169
115
|
- **🔄 Auto-Update System**: Automatically updates all dependencies to latest versions on every `npm install`
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
- Full compatibility with Brave Browser's privacy features
|
|
174
|
-
- Automatic detection across all Brave versions (Stable, Beta, Dev, Nightly)
|
|
175
|
-
- **Stealth by default**: All browser instances use anti-detection features powered by `brave-real-browser`
|
|
176
|
-
- **Enhanced cross-platform support**: Comprehensive Brave browser detection on Windows/Mac/Linux
|
|
177
|
-
- **Windows**: Registry-based detection + 15+ installation paths
|
|
178
|
-
- **macOS**: Application bundle detection for all Brave variants
|
|
179
|
-
- **Linux**: Package manager and manual installation detection
|
|
180
|
-
- **Smart browser detection**: Multi-layer detection system with automatic fallbacks
|
|
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)
|
|
181
119
|
- **Connection resilience**: Automatic localhost/127.0.0.1 fallback with port management
|
|
182
120
|
- **Multiple retry strategies**: 5 different connection approaches with progressive fallback
|
|
183
121
|
- **Advanced configuration**: Full support for all brave-real-browser options
|
|
184
122
|
- **Dynamic selector discovery**: Intelligent element finding without hardcoded selectors
|
|
185
123
|
- **Random scrolling**: Tools for natural scrolling to avoid detection
|
|
186
|
-
- **Comprehensive toolset**:
|
|
124
|
+
- **Comprehensive toolset**: 11 tools covering all browser automation needs
|
|
187
125
|
- **Proxy support**: Built-in proxy configuration for enhanced privacy
|
|
188
126
|
- **Captcha handling**: Support for solving reCAPTCHA, hCaptcha, and Turnstile
|
|
189
127
|
- **Robust error handling**: Advanced error recovery with circuit breaker pattern
|
|
@@ -195,58 +133,64 @@ assistants to control a real browser, extract content, and more.
|
|
|
195
133
|
|
|
196
134
|
- Node.js >= 18.0.0
|
|
197
135
|
- npm or yarn
|
|
198
|
-
-
|
|
136
|
+
- Brave Browser 13+ installed
|
|
199
137
|
- Basic understanding of TypeScript/JavaScript (for development)
|
|
200
138
|
|
|
201
|
-
###
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
-
|
|
209
|
-
-
|
|
210
|
-
- **🚀 Superior Performance**: Faster page loads and reduced memory usage
|
|
211
|
-
- **🛡️ Anti-Detection**: Better stealth capabilities compared to regular browsers
|
|
212
|
-
- **✅ Advanced Auto-Detection**: Multi-layer detection system across all platforms
|
|
213
|
-
- **🎯 Reliability**: Simplified codebase focused on single browser for better stability
|
|
214
|
-
- **🦁 Native Integration**: Custom launch arguments and configurations optimized for Brave
|
|
215
|
-
|
|
216
|
-
**Install Brave:**
|
|
217
|
-
- **All Platforms**: Download from [brave.com/download](https://brave.com/download/)
|
|
218
|
-
- Brave is automatically detected in all standard installation locations
|
|
219
|
-
- Use `BRAVE_PATH` environment variable for custom installations
|
|
220
|
-
|
|
221
|
-
**Windows (Advanced Detection):**
|
|
222
|
-
- **Registry-Based Detection**: Queries Windows Registry for all Brave installations
|
|
223
|
-
- **File System Scanning**: Searches 15+ common installation paths
|
|
224
|
-
- **Standard Paths Detected**:
|
|
225
|
-
- System-wide: `C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe`
|
|
226
|
-
- 32-bit: `C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe`
|
|
227
|
-
- User-specific: `%LOCALAPPDATA%\BraveSoftware\Brave-Browser\Application\brave.exe`
|
|
228
|
-
- Portable installations in common directories
|
|
229
|
-
- **All Brave Variants Supported**:
|
|
230
|
-
- Brave Browser (Stable)
|
|
231
|
-
- Brave Browser Beta
|
|
232
|
-
- Brave Browser Dev
|
|
233
|
-
- Brave Browser Nightly
|
|
234
|
-
- **Environment Variable Support**: `BRAVE_PATH` for custom locations
|
|
235
|
-
- **Automatic Fallback**: Progressive detection with multiple strategies
|
|
139
|
+
### Platform-Specific Requirements
|
|
140
|
+
|
|
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`
|
|
146
|
+
- Portable installations and Registry-detected paths
|
|
147
|
+
- Manual path specification: Use `BRAVE_PATH` environment variable
|
|
236
148
|
|
|
237
149
|
**macOS:**
|
|
238
|
-
-
|
|
239
|
-
- `/Applications/Brave Browser.app/Contents/MacOS/Brave Browser`
|
|
240
|
-
- `/Applications/Brave Browser Beta.app/Contents/MacOS/Brave Browser Beta`
|
|
241
|
-
- `/Applications/Brave Browser Nightly.app/Contents/MacOS/Brave Browser Nightly`
|
|
242
|
-
- `/Applications/Brave Browser Dev.app/Contents/MacOS/Brave Browser Dev`
|
|
150
|
+
- Brave Browser must be installed in `/Applications/Brave Browser.app`
|
|
243
151
|
|
|
244
152
|
**Linux:**
|
|
245
|
-
-
|
|
246
|
-
- Install: `sudo apt install brave-browser` or from [brave.com](https://brave.com/)
|
|
247
|
-
- Detected paths: `/usr/bin/brave-browser`, `/snap/bin/brave`, `/usr/bin/brave`, `/opt/brave.com/brave/brave-browser`
|
|
153
|
+
- Install Brave: `sudo apt install brave-browser` or via snap: `sudo snap install brave`
|
|
248
154
|
- Install xvfb for headless operation: `sudo apt-get install -y xvfb`
|
|
249
155
|
|
|
156
|
+
## Installation for Developers
|
|
157
|
+
|
|
158
|
+
> **Note for Claude Desktop Users:** You don't need to install anything! The npx command in your configuration automatically handles everything. Skip to the [Usage](#usage) section.
|
|
159
|
+
|
|
160
|
+
This section is for developers who want to:
|
|
161
|
+
- Contribute to the project
|
|
162
|
+
- Run the server locally for development
|
|
163
|
+
- Create custom modifications
|
|
164
|
+
|
|
165
|
+
### Global Installation (For Command Line Usage)
|
|
166
|
+
|
|
167
|
+
If you want to run the server directly from the command line without using npx:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
npm install -g brave-real-browser-mcp-server@latest
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
After global installation, you can run:
|
|
174
|
+
```bash
|
|
175
|
+
brave-real-browser-mcp-server
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Development Setup (For Contributors)
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Clone the repository
|
|
182
|
+
git clone https://github.com/withLinda/brave-real-browser-mcp-server.git
|
|
183
|
+
cd brave-real-browser-mcp-server
|
|
184
|
+
|
|
185
|
+
# Install dependencies
|
|
186
|
+
npm install
|
|
187
|
+
|
|
188
|
+
# Build the project
|
|
189
|
+
npm run build
|
|
190
|
+
|
|
191
|
+
# Run in development mode
|
|
192
|
+
npm run dev
|
|
193
|
+
```
|
|
250
194
|
|
|
251
195
|
## Usage
|
|
252
196
|
|
|
@@ -453,7 +397,7 @@ Alternative Windows paths:
|
|
|
453
397
|
"BRAVE_PATH": "/usr/bin/brave-browser"
|
|
454
398
|
}
|
|
455
399
|
```
|
|
456
|
-
Alternative Linux paths: `/
|
|
400
|
+
Alternative Linux paths: `/usr/bin/brave`, `/snap/bin/brave`
|
|
457
401
|
|
|
458
402
|
|
|
459
403
|
#### Testing Cursor IDE Setup
|
|
@@ -478,9 +422,9 @@ If successful, you should see:
|
|
|
478
422
|
- Ensure Node.js 18+ is installed
|
|
479
423
|
|
|
480
424
|
2. **"Browser failed to launch" on Windows**
|
|
481
|
-
- Add explicit Brave path in `
|
|
425
|
+
- Add explicit Brave path in `executablePath`
|
|
482
426
|
- Try running Cursor IDE as Administrator
|
|
483
|
-
- Check Windows Defender isn't blocking Brave
|
|
427
|
+
- Check Windows Defender isn't blocking Brave
|
|
484
428
|
|
|
485
429
|
3. **"Permission denied"**
|
|
486
430
|
- Use `sudo npm install -g brave-real-browser-mcp-server` on Linux/Mac
|
|
@@ -553,106 +497,48 @@ AI: I'll set up the browser with your proxy configuration.
|
|
|
553
497
|
|
|
554
498
|
## Available Tools
|
|
555
499
|
|
|
556
|
-
###
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
30. `html_to_text` - Convert HTML to clean text
|
|
599
|
-
31. `price_parser` - Extract numbers from currency strings
|
|
600
|
-
32. `date_normalizer` - Convert various date formats to standard format
|
|
601
|
-
33. `contact_extractor` - Detect phone numbers and email addresses
|
|
602
|
-
34. `schema_validator` - Validate data against JSON schema
|
|
603
|
-
35. `required_fields_checker` - Check for missing required fields
|
|
604
|
-
36. `duplicate_remover` - Remove duplicate items from arrays
|
|
605
|
-
|
|
606
|
-
### 🤖 **AI-Powered Features (5 Tools)**
|
|
607
|
-
37. `smart_selector_generator` - AI-based CSS selector generation
|
|
608
|
-
38. `content_classification` - Classify webpage content into categories
|
|
609
|
-
39. `sentiment_analysis` - Analyze sentiment of page content
|
|
610
|
-
40. `summary_generator` - Generate page content summaries using TF-IDF
|
|
611
|
-
41. `translation_support` - Detect language and provide translation info
|
|
612
|
-
|
|
613
|
-
### 🔍 **Search & Filter Tools (5 Tools)**
|
|
614
|
-
42. `keyword_search` - Advanced keyword search with context
|
|
615
|
-
43. `regex_pattern_matcher` - Search using regular expressions
|
|
616
|
-
44. `xpath_support` - Query elements using XPath expressions
|
|
617
|
-
45. `advanced_css_selectors` - Support for complex CSS selectors
|
|
618
|
-
46. `visual_element_finder` - Find elements by visual properties
|
|
619
|
-
|
|
620
|
-
### 🔧 **Data Quality & Validation (5 Tools)**
|
|
621
|
-
47. `data_deduplication` - Advanced duplicate removal with fuzzy matching
|
|
622
|
-
48. `missing_data_handler` - Detect and handle missing data
|
|
623
|
-
49. `data_type_validator` - Validate data types against JSON schema
|
|
624
|
-
50. `outlier_detection` - Detect outliers in numerical data
|
|
625
|
-
51. `consistency_checker` - Check data consistency across fields
|
|
626
|
-
|
|
627
|
-
### 🛡️ **Advanced Captcha Handling (3 Tools)**
|
|
628
|
-
52. `ocr_engine` - Extract text from images using OCR
|
|
629
|
-
53. `audio_captcha_solver` - Handle audio captchas
|
|
630
|
-
54. `puzzle_captcha_handler` - Handle slider and puzzle captchas
|
|
631
|
-
|
|
632
|
-
### 📸 **Screenshot & Visual Tools (5 Tools)**
|
|
633
|
-
55. `full_page_screenshot` - Capture complete page screenshots
|
|
634
|
-
56. `element_screenshot` - Capture screenshots of specific elements
|
|
635
|
-
57. `pdf_generation` - Convert pages to PDF
|
|
636
|
-
58. `video_recording` - Record browser sessions
|
|
637
|
-
59. `visual_comparison` - Compare two screenshots for differences
|
|
638
|
-
|
|
639
|
-
### 🌐 **Website API Integration (3 Tools)**
|
|
640
|
-
60. `rest_api_endpoint_finder` - Discover REST API endpoints
|
|
641
|
-
61. `webhook_support` - Set up and test webhooks
|
|
642
|
-
62. `all_website_api_finder` - Comprehensive API discovery
|
|
643
|
-
|
|
644
|
-
---
|
|
645
|
-
|
|
646
|
-
### 📝 **Usage Examples**
|
|
647
|
-
|
|
648
|
-
| Category | Example Usage |
|
|
649
|
-
|----------|---------------|
|
|
650
|
-
| **Basic Browsing** | `browser_init` → `navigate` → `get_content` |
|
|
651
|
-
| **Data Extraction** | `scrape_table` → `smart_text_cleaner` → `duplicate_remover` |
|
|
652
|
-
| **Form Automation** | `find_selector` → `type` → `click` → `wait` |
|
|
653
|
-
| **Content Analysis** | `get_content` → `sentiment_analysis` → `summary_generator` |
|
|
654
|
-
| **Visual Capture** | `full_page_screenshot` → `element_screenshot` |
|
|
655
|
-
| **Quality Control** | `data_type_validator` → `consistency_checker` |
|
|
500
|
+
### Core Browser Tools
|
|
501
|
+
|
|
502
|
+
| Tool Name | Description | Required Parameters | Optional Parameters |
|
|
503
|
+
|-----------|-------------|---------------------|-------------------|
|
|
504
|
+
| `browser_init` | Initialize stealth browser with advanced options | None | `headless`, `disableXvfb`, `ignoreAllFlags`, `proxy`, `plugins`, `connectOption` |
|
|
505
|
+
| `navigate` | Navigate to a URL | `url` | `waitUntil` |
|
|
506
|
+
| `get_content` | Get page content (HTML or text) | None | `type`, `selector` |
|
|
507
|
+
| `browser_close` | Close the browser instance | None | None |
|
|
508
|
+
|
|
509
|
+
### Interaction Tools
|
|
510
|
+
|
|
511
|
+
| Tool Name | Description | Required Parameters | Optional Parameters |
|
|
512
|
+
|-----------|-------------|---------------------|-------------------|
|
|
513
|
+
| `click` | Standard click on element | `selector` | `waitForNavigation` |
|
|
514
|
+
| `type` | Type text into input field | `selector`, `text` | `delay` |
|
|
515
|
+
| `wait` | Wait for various conditions | `type`, `value` | `timeout` |
|
|
516
|
+
| `find_selector` | Find CSS selector for element containing specific text | `text` | `elementType`, `exact` |
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
### Behavior Tools
|
|
520
|
+
|
|
521
|
+
| Tool Name | Description | Required Parameters | Optional Parameters |
|
|
522
|
+
|-----------|-------------|---------------------|-------------------|
|
|
523
|
+
| `random_scroll` | Perform random scrolling with natural timing | None | None |
|
|
524
|
+
|
|
525
|
+
### Element Discovery Tools
|
|
526
|
+
|
|
527
|
+
| Tool Name | Description | Required Parameters | Optional Parameters |
|
|
528
|
+
|-----------|-------------|---------------------|-------------------|
|
|
529
|
+
| `find_selector` | Find CSS selector for element containing specific text | `text` | `elementType`, `exact` |
|
|
530
|
+
|
|
531
|
+
### Content Tools
|
|
532
|
+
|
|
533
|
+
| Tool Name | Description | Required Parameters | Optional Parameters |
|
|
534
|
+
|-----------|-------------|---------------------|-------------------|
|
|
535
|
+
| `save_content_as_markdown` | Extract page content and save it as a formatted markdown file | `filePath` | `contentType`, `selector`, `formatOptions` |
|
|
536
|
+
|
|
537
|
+
### Anti-Detection Tools
|
|
538
|
+
|
|
539
|
+
| Tool Name | Description | Required Parameters | Optional Parameters |
|
|
540
|
+
|-----------|-------------|---------------------|-------------------|
|
|
541
|
+
| `solve_captcha` | Attempt to solve captchas | `type` | None |
|
|
656
542
|
|
|
657
543
|
## Advanced Features
|
|
658
544
|
|
|
@@ -661,7 +547,7 @@ This MCP server provides **62 professional-grade tools** organized into 11 major
|
|
|
661
547
|
The server includes intelligent element discovery capabilities through the `find_selector` tool:
|
|
662
548
|
|
|
663
549
|
- **Text-based element finding**: Automatically locates elements containing specific text
|
|
664
|
-
- **Smart CSS selector generation**: Creates unique, robust CSS selectors similar to
|
|
550
|
+
- **Smart CSS selector generation**: Creates unique, robust CSS selectors similar to browser DevTools
|
|
665
551
|
- **Element type filtering**: Optionally restrict search to specific HTML elements (e.g., buttons, links)
|
|
666
552
|
- **Exact or partial text matching**: Choose between precise text matching or substring searches
|
|
667
553
|
- **Universal compatibility**: Works across any website without hardcoded selectors
|
|
@@ -699,27 +585,27 @@ brave-real-browser implementation.
|
|
|
699
585
|
|
|
700
586
|
## Configuration
|
|
701
587
|
|
|
702
|
-
### Automatic Brave Path Detection
|
|
588
|
+
### Automatic Brave Path Detection
|
|
703
589
|
|
|
704
|
-
The server automatically detects Brave Browser installation paths across different operating systems
|
|
590
|
+
The server automatically detects Brave Browser installation paths across different operating systems:
|
|
705
591
|
|
|
706
|
-
- **Windows
|
|
707
|
-
- Registry-based detection for
|
|
708
|
-
- Searches
|
|
709
|
-
- Support for
|
|
710
|
-
- Environment variable detection (`BRAVE_PATH
|
|
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`)
|
|
711
597
|
- Detailed troubleshooting guidance when Brave is not found
|
|
712
598
|
|
|
713
|
-
- **macOS**:
|
|
599
|
+
- **macOS**: Looks for Brave in `/Applications/Brave Browser.app/` and Brave Nightly locations
|
|
714
600
|
|
|
715
|
-
- **Linux**: Checks multiple locations including
|
|
601
|
+
- **Linux**: Checks multiple locations including `/usr/bin/brave-browser`, `/usr/bin/brave`, and snap installations
|
|
716
602
|
|
|
717
|
-
**
|
|
718
|
-
The server
|
|
603
|
+
**Windows Registry Detection**:
|
|
604
|
+
The server queries Windows Registry to find Brave installations, making detection more reliable across different installation types.
|
|
719
605
|
|
|
720
606
|
If Brave is not found automatically, you can specify a custom path using:
|
|
721
607
|
1. Environment variable: `set BRAVE_PATH="C:\Your\Brave\Path\brave.exe"`
|
|
722
|
-
2. Browser init option: `customConfig.
|
|
608
|
+
2. Browser init option: `customConfig.bravePath` when initializing the browser
|
|
723
609
|
|
|
724
610
|
### Configuring Custom Options (like headless mode)
|
|
725
611
|
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:
|
|
@@ -746,7 +632,7 @@ When initializing with `browser_init`, you can configure:
|
|
|
746
632
|
|
|
747
633
|
- `headless`: true/false (Set to true for headless operation)
|
|
748
634
|
- `disableXvfb`: true/false (Disable X Virtual Framebuffer)
|
|
749
|
-
- `ignoreAllFlags`: true/false (Ignore all
|
|
635
|
+
- `ignoreAllFlags`: true/false (Ignore all browser flags)
|
|
750
636
|
- `proxy`: "https://proxy:8080" (Proxy server URL)
|
|
751
637
|
- `plugins`: ["plugin1", "plugin2"] (Array of plugins to load)
|
|
752
638
|
- `connectOption`: Additional connection options like:
|
|
@@ -779,7 +665,7 @@ When initializing the browser with `browser_init`, you can configure:
|
|
|
779
665
|
```json
|
|
780
666
|
{
|
|
781
667
|
"customConfig": {
|
|
782
|
-
"
|
|
668
|
+
"bravePath": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
|
|
783
669
|
}
|
|
784
670
|
}
|
|
785
671
|
```
|
|
@@ -823,13 +709,13 @@ For advanced users, you can modify the server behavior by editing the source cod
|
|
|
823
709
|
Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0.1:60725` error commonly experienced on Windows systems:
|
|
824
710
|
|
|
825
711
|
**Enhanced Brave Path Detection:**
|
|
826
|
-
- Added Windows Registry-based Brave detection
|
|
827
|
-
- Expanded search to
|
|
828
|
-
- Added support for
|
|
829
|
-
- Environment variable support (`BRAVE_PATH
|
|
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`)
|
|
830
716
|
|
|
831
717
|
**Windows-Specific Launch Optimizations:**
|
|
832
|
-
- 20+ Windows-specific
|
|
718
|
+
- 20+ Windows-specific browser flags for better compatibility
|
|
833
719
|
- Multiple fallback strategies (5 different connection approaches)
|
|
834
720
|
- Progressive retry logic with exponential backoff
|
|
835
721
|
- Enhanced timeout handling (120s for Windows vs 90s for other platforms)
|
|
@@ -949,7 +835,7 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
|
|
|
949
835
|
|
|
950
836
|
**Step 4: Windows-Specific Solutions**
|
|
951
837
|
- **Run as Administrator**: Try running your IDE/terminal as Administrator
|
|
952
|
-
- **Windows Defender**: Add Brave
|
|
838
|
+
- **Windows Defender**: Add Brave and Node.js to Windows Defender exclusions
|
|
953
839
|
- **Antivirus Software**: Temporarily disable antivirus to test if it's blocking Brave
|
|
954
840
|
- **User Account Control**: Lower UAC settings temporarily for testing
|
|
955
841
|
- **Brave Processes**: Kill any existing Brave processes in Task Manager
|
|
@@ -970,8 +856,8 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
|
|
|
970
856
|
- Clear npm cache: `npm cache clean --force`
|
|
971
857
|
- Reinstall global packages: `npm install -g brave-real-browser-mcp-server@latest`
|
|
972
858
|
|
|
973
|
-
- **Linux**: Install Brave: `sudo apt install brave-browser`
|
|
974
|
-
- **macOS**: Ensure Brave is in `/Applications/Brave Browser.app
|
|
859
|
+
- **Linux**: Install Brave: `sudo apt install brave-browser`
|
|
860
|
+
- **macOS**: Ensure Brave is in `/Applications/Brave Browser.app`
|
|
975
861
|
- Try with `headless: true` first
|
|
976
862
|
- Check console output for Brave path detection messages
|
|
977
863
|
|
|
@@ -1030,7 +916,7 @@ Version 1.3.0 includes comprehensive fixes for the `connect ECONNREFUSED 127.0.0
|
|
|
1030
916
|
- **JSON Syntax Validation**:
|
|
1031
917
|
- Use [jsonlint.com](https://jsonlint.com/) to validate JSON syntax
|
|
1032
918
|
- Common issues: missing commas, incorrect quotes, trailing commas
|
|
1033
|
-
- Ensure proper escaping of Windows paths: `"C:/Program Files/
|
|
919
|
+
- Ensure proper escaping of Windows paths: `"C:/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe"`
|
|
1034
920
|
|
|
1035
921
|
- **Cursor IDE Restart Process**:
|
|
1036
922
|
- Close Cursor IDE completely (check Task Manager on Windows)
|
|
@@ -1122,11 +1008,11 @@ A: Supports reCAPTCHA, hCaptcha, and Cloudflare Turnstile through brave-real-bro
|
|
|
1122
1008
|
**Q: Is this detectable by websites?**
|
|
1123
1009
|
A: brave-real-browser includes anti-detection features, but no solution is 100% undetectable.
|
|
1124
1010
|
|
|
1125
|
-
**Q: Can I use custom
|
|
1126
|
-
A: Yes, through the `plugins` option in browser_init.
|
|
1011
|
+
**Q: Can I use custom browser extensions?**
|
|
1012
|
+
A: Yes, through the `plugins` option in browser_init.
|
|
1127
1013
|
|
|
1128
1014
|
**Q: Does it work on all operating systems?**
|
|
1129
|
-
A: Yes, tested on Windows, macOS, and Linux. The server automatically detects Brave
|
|
1015
|
+
A: Yes, tested on Windows, macOS, and Linux. The server automatically detects Brave installations on all platforms.
|
|
1130
1016
|
|
|
1131
1017
|
**Q: What's the difference between Claude Desktop, Claude Code CLI, and Cursor IDE configurations?**
|
|
1132
1018
|
A: Here's a comparison:
|
|
@@ -1148,29 +1034,29 @@ A: Here's a comparison:
|
|
|
1148
1034
|
- **Cursor IDE**: One-click install or manual JSON config
|
|
1149
1035
|
|
|
1150
1036
|
**Q: What if Brave is installed in a non-standard location?**
|
|
1151
|
-
A:
|
|
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:
|
|
1152
1038
|
1. Set environment variable: `set BRAVE_PATH="C:\Your\Brave\Path\brave.exe"`
|
|
1153
|
-
2. Use the `customConfig.
|
|
1039
|
+
2. Use the `customConfig.bravePath` option: `{"customConfig": {"bravePath": "C:\\Custom\\Brave\\brave.exe"}}`
|
|
1154
1040
|
|
|
1155
1041
|
**Q: Why am I getting "Brave not found" or ECONNREFUSED errors on Windows?**
|
|
1156
|
-
A:
|
|
1042
|
+
A: The server includes comprehensive fixes for Windows Brave detection and connection issues. The server now automatically searches these locations and more:
|
|
1157
1043
|
- `C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe`
|
|
1158
1044
|
- `C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe`
|
|
1159
1045
|
- `%LOCALAPPDATA%\BraveSoftware\Brave-Browser\Application\brave.exe`
|
|
1160
1046
|
- `%USERPROFILE%\AppData\Local\BraveSoftware\Brave-Browser\Application\brave.exe`
|
|
1161
|
-
-
|
|
1047
|
+
- Brave Nightly installations
|
|
1162
1048
|
- Portable Brave installations
|
|
1163
1049
|
- Registry-detected installations
|
|
1164
1050
|
|
|
1165
|
-
The server also implements multiple connection strategies with automatic fallback between localhost and 127.0.0.1, plus enhanced Windows-specific
|
|
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.
|
|
1166
1052
|
|
|
1167
|
-
**Q: I'm still getting ECONNREFUSED errors
|
|
1053
|
+
**Q: I'm still getting ECONNREFUSED errors. What should I do?**
|
|
1168
1054
|
A: Try these steps in order:
|
|
1169
1055
|
1. Set the `BRAVE_PATH` environment variable to your Brave location
|
|
1170
1056
|
2. Kill all existing Brave processes: `taskkill /f /im brave.exe`
|
|
1171
1057
|
3. Check your Windows hosts file contains: `127.0.0.1 localhost`
|
|
1172
1058
|
4. Try running your IDE as Administrator
|
|
1173
|
-
5. Add Brave
|
|
1059
|
+
5. Add Brave to Windows Defender exclusions
|
|
1174
1060
|
6. If using a VPN/proxy, try disabling it temporarily
|
|
1175
1061
|
|
|
1176
1062
|
### Debug Mode
|
|
@@ -1269,7 +1155,7 @@ npm run test:debug # Environment diagnostics and troubleshooting
|
|
|
1269
1155
|
|
|
1270
1156
|
Debug tools provide:
|
|
1271
1157
|
- Environment validation (Node.js version, platform, memory)
|
|
1272
|
-
- Brave
|
|
1158
|
+
- Brave installation detection with specific paths
|
|
1273
1159
|
- Quick server health check with startup timing
|
|
1274
1160
|
- Network connectivity validation
|
|
1275
1161
|
- Build status verification
|
|
@@ -1311,22 +1197,9 @@ This project is licensed under the MIT License - see the LICENSE file for detail
|
|
|
1311
1197
|
|
|
1312
1198
|
## Acknowledgments
|
|
1313
1199
|
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
This MCP server is built upon the excellent **[brave-real-browser](https://github.com/ZFC-Digital/brave-real-browser)** library by **ZFC-Digital**, which provides the core automation capabilities.
|
|
1317
|
-
|
|
1318
|
-
**Why brave-real-browser is Amazing:**
|
|
1319
|
-
- **🛡️ Advanced Anti-Detection**: Sophisticated techniques to bypass bot detection
|
|
1320
|
-
- **🦁 Brave Browser Optimized**: Specifically designed for Brave Browser
|
|
1321
|
-
- **🔒 Privacy-First**: Built with privacy and security in mind
|
|
1322
|
-
- **🎨 Stealth Capabilities**: Natural human-like interactions
|
|
1323
|
-
- **⚡ High Performance**: Optimized for speed and reliability
|
|
1324
|
-
- **🔧 Professional Grade**: Enterprise-level automation features
|
|
1200
|
+
This MCP server is based on the excellent [brave-real-browser](https://github.com/ZFC-Digital/brave-real-browser) library by ZFC-Digital.
|
|
1325
1201
|
|
|
1326
1202
|
**Thank you** to the brave-real-browser team for creating such a powerful and detection-resistant browser automation solution!
|
|
1327
1203
|
|
|
1328
|
-
|
|
1329
|
-
-
|
|
1330
|
-
- **npm Package**: [https://www.npmjs.com/package/brave-real-browser](https://www.npmjs.com/package/brave-real-browser)
|
|
1331
|
-
- **Documentation**: Comprehensive guides and examples
|
|
1332
|
-
- **Community**: Active development and support
|
|
1204
|
+
- GitHub: [https://github.com/ZFC-Digital/brave-real-browser](https://github.com/ZFC-Digital/brave-real-browser)
|
|
1205
|
+
- npm: [https://www.npmjs.com/package/brave-real-browser](https://www.npmjs.com/package/brave-real-browser)
|