brave-real-browser-mcp-server 2.12.7 → 2.12.8

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
@@ -14,7 +14,7 @@
14
14
 
15
15
  [📖 **All 5 Protocols Complete Guide**](./ALL-PROTOCOLS.md) 👈 **NEW! Step-by-step setup for all protocols**
16
16
 
17
- [Installation](#-installation) | [Quick Start](#-quick-start) | [Tools](#-available-tools-111) | [HTTP/WebSocket](#-httpwebsocket-setup) | [Configuration](#-ide-configurations) | [Troubleshooting](#-troubleshooting)
17
+ [Installation](#-installation) | [Quick Start](#-quick-start) | [Qoder AI Setup](#-qoder-ai---complete-integration-guide) | [Tools](#-available-tools-111) | [HTTP/WebSocket/SSE](#-httpwebsocketsse-protocol-setup) | [IDE Configurations](#-ide-configurations)
18
18
 
19
19
  </div>
20
20
 
@@ -45,7 +45,7 @@
45
45
  | **Cursor AI** | 2 min | MCP | Add config → Restart |
46
46
  | **Windsurf** | 2 min | MCP | Add config → Restart |
47
47
  | **Zed Editor** | 3 min | LSP | Add to `context_servers` → Restart |
48
- | **Qoder AI** | 4 min | HTTP | Start HTTP server → Add config → Restart |
48
+ || **Qoder AI** | 3 min | MCP (STDIO/SSE) | Add config → Restart |
49
49
  | **Custom Apps** | 1 min | HTTP/WebSocket/SSE | Start server → Use API |
50
50
 
51
51
  **Quick Commands:**
@@ -104,15 +104,26 @@ npx brave-real-browser-mcp-server@latest
104
104
  - **Cursor:** `%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
105
105
  - **Windsurf:** `%APPDATA%\Windsurf\mcp.json`
106
106
 
107
- ### For Other IDEs (Qoder AI, Custom Tools)
107
+ ### For Qoder AI
108
108
 
109
- Use HTTP/WebSocket mode - [See HTTP/WebSocket Setup](#-httpwebsocket-setup)
109
+ **Qoder AI supports 2 MCP transport types:** STDIO (local) and SSE (remote)
110
+
111
+ **Complete step-by-step guide:** [See Qoder AI Integration Guide](#-qoder-ai---complete-integration-guide)
112
+
113
+ **Quick setup (STDIO):**
114
+ 1. Add to config: `{"command": "npx", "args": ["-y", "brave-real-browser-mcp-server@latest"]}`
115
+ 2. Restart Qoder AI
116
+ 3. Use 111 browser automation tools!
117
+
118
+ ### For Other Custom Tools
119
+
120
+ Use HTTP/WebSocket/SSE mode - [See Protocol Setup](#-httpwebsocketsse-protocol-setup)
110
121
 
111
122
  ---
112
123
 
113
- ## 🌐 HTTP/WebSocket Setup
124
+ ## 🌐 HTTP/WebSocket/SSE Protocol Setup
114
125
 
115
- ### HTTP Protocol - 5 Steps
126
+ ### 1️⃣ HTTP Protocol - Complete Configuration
116
127
 
117
128
  HTTP mode works with **ANY IDE or programming language**. No special configuration needed!
118
129
 
@@ -127,6 +138,10 @@ npx brave-real-browser-mcp-server@latest --mode http --host 0.0.0.0 --port 8080
127
138
 
128
139
  # HTTP only (without WebSocket)
129
140
  npx brave-real-browser-mcp-server@latest --mode http --port 3000 --no-websocket
141
+
142
+ # With custom Brave browser path
143
+ set BRAVE_PATH=C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe
144
+ npx brave-real-browser-mcp-server@latest --mode http --port 3000
130
145
  ```
131
146
 
132
147
  **Server will start and show:**
@@ -134,6 +149,7 @@ npx brave-real-browser-mcp-server@latest --mode http --port 3000 --no-websocket
134
149
  ```
135
150
  🟢 [HTTP] Starting HTTP/WebSocket server...
136
151
  ✅ [HTTP] Server ready at http://localhost:3000
152
+ ✅ [WebSocket] Server running on ws://localhost:3000
137
153
  💡 [HTTP] Universal mode - works with ALL AI IDEs
138
154
  ```
139
155
 
@@ -145,29 +161,78 @@ curl http://localhost:3000/health
145
161
 
146
162
  # List all available tools
147
163
  curl http://localhost:3000/tools
164
+
165
+ # Get specific tool info
166
+ curl http://localhost:3000/tools/browser_init
148
167
  ```
149
168
 
150
- #### Step 5: Configure in Your IDE
169
+ #### Step 3: Available HTTP Endpoints
151
170
 
152
- **For Qoder AI:**
171
+ | Method | Endpoint | Description | Example |
172
+ |--------|----------|-------------|----------|
173
+ | **GET** | `/health` | Health check | `curl http://localhost:3000/health` |
174
+ | **GET** | `/tools` | List all 111 tools | `curl http://localhost:3000/tools` |
175
+ | **GET** | `/tools/:toolName` | Get tool info | `curl http://localhost:3000/tools/browser_init` |
176
+ | **POST** | `/tools/:toolName` | Execute any tool | See documentation |
153
177
 
178
+ #### Step 4: MCP Configuration for HTTP
179
+
180
+ If your IDE supports HTTP-based MCP servers, use this configuration:
181
+
182
+ **Config format:**
154
183
  ```json
155
184
  {
156
- "extensions": {
157
- "brave-real-browser": {
158
- "type": "http",
159
- "enabled": true,
160
- "endpoint": "http://localhost:3000"
185
+ "mcpServers": {
186
+ "brave-real-browser-http": {
187
+ "url": "http://localhost:3000",
188
+ "transport": "http",
189
+ "name": "Brave Browser (HTTP)",
190
+ "enabled": true
191
+ }
192
+ }
193
+ }
194
+ ```
195
+
196
+ **With authentication:**
197
+ ```json
198
+ {
199
+ "mcpServers": {
200
+ "brave-real-browser-http": {
201
+ "url": "http://localhost:3000",
202
+ "transport": "http",
203
+ "headers": {
204
+ "Authorization": "Bearer your-token"
205
+ },
206
+ "enabled": true
161
207
  }
162
208
  }
163
209
  }
164
210
  ```
165
211
 
166
- **For any custom tool:** Just make HTTP POST requests to `http://localhost:3000/tools/{tool_name}`
212
+ #### Step 5: Error Handling
213
+
214
+ **Success Response:**
215
+ ```json
216
+ {
217
+ "success": true,
218
+ "data": {
219
+ "result": "Browser initialized successfully"
220
+ }
221
+ }
222
+ ```
223
+
224
+ **Error Response:**
225
+ ```json
226
+ {
227
+ "success": false,
228
+ "error": "Browser initialization failed",
229
+ "details": "Brave browser not found at specified path"
230
+ }
231
+ ```
167
232
 
168
233
  ---
169
234
 
170
- ### WebSocket Protocol - Complete Setup Guide
235
+ ### 2️⃣ WebSocket Protocol - Complete Configuration
171
236
 
172
237
  WebSocket provides **real-time, bidirectional communication** for modern applications.
173
238
 
@@ -189,272 +254,223 @@ npx brave-real-browser-mcp-server@latest --mode http --port 3000
189
254
  💡 [HTTP] Universal mode - works with ALL AI IDEs
190
255
  ```
191
256
 
192
- #### Step 6: WebSocket Advanced Features
193
-
194
- **Connection Options:**
257
+ #### Step 2: WebSocket Message Format
195
258
 
196
- ```javascript
197
- const ws = new WebSocket('ws://localhost:3000', {
198
- headers: {
199
- 'Authorization': 'Bearer your-token',
200
- 'X-Custom-Header': 'value'
259
+ **Request Format:**
260
+ ```json
261
+ {
262
+ "tool": "tool_name",
263
+ "params": {
264
+ "param1": "value1",
265
+ "param2": "value2"
201
266
  }
202
- });
267
+ }
203
268
  ```
204
269
 
205
- **Reconnection Logic:**
206
-
207
- ```javascript
208
- function connectWebSocket() {
209
- const ws = new WebSocket('ws://localhost:3000');
210
-
211
- ws.on('close', () => {
212
- console.log('Connection closed, reconnecting in 5s...');
213
- setTimeout(connectWebSocket, 5000);
214
- });
215
-
216
- ws.on('error', (error) => {
217
- console.error('WebSocket error:', error);
218
- });
219
-
220
- return ws;
270
+ **Response Format:**
271
+ ```json
272
+ {
273
+ "success": true,
274
+ "tool": "browser_init",
275
+ "data": {
276
+ "result": "Browser initialized successfully"
277
+ },
278
+ "timestamp": "2025-01-25T04:20:00.000Z"
221
279
  }
222
-
223
- const ws = connectWebSocket();
224
280
  ```
225
281
 
226
- **Heartbeat/Ping-Pong:**
282
+ #### Step 3: MCP Configuration for WebSocket
227
283
 
228
- ```javascript
229
- const ws = new WebSocket('ws://localhost:3000');
284
+ If your IDE supports WebSocket-based MCP servers:
230
285
 
231
- setInterval(() => {
232
- if (ws.readyState === WebSocket.OPEN) {
233
- ws.ping();
286
+ **Config format:**
287
+ ```json
288
+ {
289
+ "mcpServers": {
290
+ "brave-real-browser-ws": {
291
+ "url": "ws://localhost:3000",
292
+ "transport": "websocket",
293
+ "name": "Brave Browser (WebSocket)",
294
+ "enabled": true
295
+ }
234
296
  }
235
- }, 30000); // Ping every 30 seconds
236
-
237
- ws.on('pong', () => {
238
- console.log('Pong received - connection alive');
239
- });
297
+ }
240
298
  ```
241
299
 
242
- #### Troubleshooting WebSocket
243
-
244
- **Issue: Connection Refused**
245
-
246
- ```bash
247
- # Check if HTTP server is running
248
- curl http://localhost:3000/health
249
-
250
- # If not running, start it:
251
- npx brave-real-browser-mcp-server@latest --mode http --port 3000
300
+ **With custom options:**
301
+ ```json
302
+ {
303
+ "mcpServers": {
304
+ "brave-real-browser-ws": {
305
+ "url": "ws://localhost:3000",
306
+ "transport": "websocket",
307
+ "reconnect": true,
308
+ "reconnectDelay": 3000,
309
+ "headers": {
310
+ "Authorization": "Bearer your-token"
311
+ },
312
+ "enabled": true
313
+ }
314
+ }
315
+ }
252
316
  ```
253
317
 
254
- **Issue: WebSocket Disabled**
318
+ #### Step 4: WebSocket Features
255
319
 
256
- ```bash
257
- # Start server with WebSocket explicitly enabled
258
- npx brave-real-browser-mcp-server@latest --mode http --port 3000
320
+ **WebSocket URL:** `ws://localhost:3000`
259
321
 
260
- # Note: WebSocket is enabled by default
261
- # To disable: use --no-websocket flag
262
- ```
322
+ **Features:**
323
+ - Real-time bidirectional communication
324
+ - ✅ Auto-reconnection support
325
+ - ✅ Ping/Pong keep-alive
326
+ - ✅ Custom headers support
327
+ - ✅ All 111 tools accessible
263
328
 
264
- **Issue: Connection Timeout**
329
+ ---
265
330
 
266
- ```javascript
267
- // Increase connection timeout
268
- const ws = new WebSocket('ws://localhost:3000', {
269
- handshakeTimeout: 10000 // 10 seconds
270
- });
271
- ```
331
+ ### 3️⃣ SSE Protocol - Complete Configuration
272
332
 
273
- **Issue: Firewall Blocking**
333
+ Server-Sent Events (SSE) provides **real-time, one-way streaming** from server to client.
334
+
335
+ #### Step 1: Start SSE Server
274
336
 
275
337
  ```bash
276
- # Windows - Allow Node.js through firewall
277
- netsh advfirewall firewall add rule name="Node.js WebSocket" dir=in action=allow program="C:\Program Files\nodejs\node.exe" enable=yes
338
+ # Default (port 3001)
339
+ npx brave-real-browser-mcp-server@latest --mode sse
278
340
 
279
- # Linux - Allow port 3000
280
- sudo ufw allow 3000
281
- ```
341
+ # Custom port
342
+ npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001
282
343
 
283
- ## 🎨 IDE Configurations
344
+ # Custom host
345
+ npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001 --host 0.0.0.0
284
346
 
285
- ### Claude Desktop
347
+ # With custom Brave path
348
+ set BRAVE_PATH=C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe
349
+ npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001
350
+ ```
286
351
 
287
- **Protocol:** MCP (STDIO) | **Setup Time:** 2 minutes | **Auto-Start:** ✅ Yes
352
+ **Server will start and show:**
288
353
 
289
- #### 📋 Step-by-Step Setup Guide:
354
+ ```
355
+ 🟢 [SSE] Starting SSE server...
356
+ ✅ [SSE] Server ready at http://localhost:3001
357
+ 💡 [SSE] Real-time monitoring enabled
358
+ ```
290
359
 
291
- **Step 1: Locate Configuration File**
360
+ #### Step 2: Test SSE Server
292
361
 
293
362
  ```bash
294
- # Windows (PowerShell)
295
- cd $env:APPDATA\Claude
296
- notepad claude_desktop_config.json
297
-
298
- # Windows (CMD)
299
- cd %APPDATA%\Claude
300
- notepad claude_desktop_config.json
301
-
302
- # Mac
303
- cd ~/Library/Application\ Support/Claude
304
- open -e claude_desktop_config.json
363
+ # Health check
364
+ curl http://localhost:3001/health
305
365
 
306
- # Linux
307
- cd ~/.config/Claude
308
- gedit claude_desktop_config.json
366
+ # List available event types
367
+ curl http://localhost:3001/events/types
309
368
  ```
310
369
 
311
- **If file doesn't exist, create it:**
370
+ #### Step 3: Available SSE Event Types
312
371
 
313
- ```bash
314
- # Windows (PowerShell)
315
- New-Item -Path "$env:APPDATA\Claude\claude_desktop_config.json" -ItemType File -Force
316
-
317
- # Mac/Linux
318
- mkdir -p ~/.config/Claude
319
- touch ~/.config/Claude/claude_desktop_config.json
320
- ```
372
+ | Event Type | Description | Example Data |
373
+ |------------|-------------|-------------|
374
+ | `browser_init_success` | Browser initialized | `{"status": "ready", "pid": 12345}` |
375
+ | `browser_init_error` | Browser failed to start | `{"error": "Brave not found"}` |
376
+ | `navigation_start` | Navigation started | `{"url": "https://example.com"}` |
377
+ | `navigation_complete` | Navigation finished | `{"url": "https://example.com", "time": 1250}` |
378
+ | `tool_start` | Tool execution started | `{"tool": "scrape_table"}` |
379
+ | `tool_success` | Tool completed successfully | `{"tool": "scrape_table", "result": [...]}` |
380
+ | `tool_error` | Tool execution failed | `{"tool": "scrape_table", "error": "Selector not found"}` |
381
+ | `content_extracted` | Content extracted | `{"type": "html", "size": 50000}` |
382
+ | `screenshot_captured` | Screenshot taken | `{"path": "/path/to/screenshot.png"}` |
383
+ | `error_occurred` | General error | `{"error": "Connection timeout"}` |
321
384
 
322
- **Step 2: Add Configuration**
385
+ #### Step 4: MCP Configuration for SSE
323
386
 
324
- Copy and paste this configuration:
387
+ If your IDE supports SSE-based MCP servers:
325
388
 
389
+ **Config format:**
326
390
  ```json
327
391
  {
328
392
  "mcpServers": {
329
- "brave-real-browser": {
330
- "command": "npx",
331
- "args": ["-y", "brave-real-browser-mcp-server@latest"]
393
+ "brave-real-browser-sse": {
394
+ "url": "http://localhost:3001/sse",
395
+ "transport": "sse",
396
+ "name": "Brave Browser (SSE)",
397
+ "enabled": true
332
398
  }
333
399
  }
334
400
  }
335
401
  ```
336
402
 
337
- **Advanced Configuration (Optional):**
338
-
403
+ **With event filters:**
339
404
  ```json
340
405
  {
341
406
  "mcpServers": {
342
- "brave-real-browser": {
343
- "command": "npx",
344
- "args": ["-y", "brave-real-browser-mcp-server@latest"],
345
- "env": {
346
- "BRAVE_PATH": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",
347
- "HEADLESS": "false"
348
- }
407
+ "brave-real-browser-sse": {
408
+ "url": "http://localhost:3001/sse?filter=tool_success,navigation_complete",
409
+ "transport": "sse",
410
+ "reconnect": true,
411
+ "enabled": true
349
412
  }
350
413
  }
351
414
  }
352
415
  ```
353
416
 
354
- **Step 3: Save and Close File**
355
-
356
- Press `Ctrl+S` (Windows/Linux) or `Cmd+S` (Mac) to save.
357
-
358
- **Step 4: Restart Claude Desktop**
417
+ #### Step 5: SSE Advanced Features
359
418
 
419
+ **Custom Event Filters:**
360
420
  ```bash
361
- # Windows
362
- taskkill /F /IM claude.exe
363
- # Then reopen Claude Desktop
364
-
365
- # Mac
366
- pkill -f Claude
367
- # Then reopen Claude Desktop
421
+ # Connect with filter query parameter
422
+ curl http://localhost:3001/events?filter=tool_success,navigation_complete
368
423
  ```
369
424
 
370
- **Step 5: Verify Installation**
371
-
372
- 1. Open Claude Desktop
373
- 2. Look for 🔧 icon or "Tools" section
374
- 3. You should see "brave-real-browser" with 111 tools
375
- 4. Try this command in Claude:
376
- ```
377
- Use browser_init tool to start the browser
378
- ```
379
-
380
- **Troubleshooting:**
381
-
382
- ```bash
383
- # Check Claude logs
384
- # Windows
385
- type "%APPDATA%\Claude\logs\mcp*.log"
386
-
387
- # Mac
388
- cat ~/Library/Logs/Claude/mcp*.log
425
+ ---
389
426
 
390
- # If server fails, test manually:
391
- npx -y brave-real-browser-mcp-server@latest
392
- ```
427
+ ## 🤖 Qoder AI - Complete Integration Guide
393
428
 
394
- **Configuration Locations:**
395
- - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
396
- - Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
397
- - Linux: `~/.config/Claude/claude_desktop_config.json`
429
+ **Qoder AI** supports MCP servers through **2 official transport types:**
430
+ - **STDIO** (Standard Input/Output) - For local MCP servers
431
+ - **SSE** (Server-Sent Events) - For remote MCP servers
398
432
 
399
- ### Cursor AI
433
+ [Official Documentation](https://docs.qoder.com/user-guide/chat/model-context-protocol)
400
434
 
401
- **Protocol:** MCP (STDIO) | **Setup Time:** 2 minutes | **Auto-Start:** ✅ Yes
435
+ ---
402
436
 
403
- #### 📋 Step-by-Step Setup Guide:
437
+ ### 🟢 Method 1: STDIO Transport (Recommended for Local)
404
438
 
405
- **Step 1: Install Cline Extension (if not installed)**
439
+ **STDIO** uses stdin/stdout streams for communication. Perfect for local MCP servers.
406
440
 
407
- 1. Open Cursor AI
408
- 2. Press `Ctrl+Shift+X` (Extensions)
409
- 3. Search for "Cline" or "Claude Dev"
410
- 4. Click Install
411
- 5. Restart Cursor
441
+ #### Step 1: Find Qoder AI MCP Config File
412
442
 
413
- **Step 2: Locate Configuration File**
443
+ **Config file locations:**
414
444
 
415
445
  ```bash
416
- # Windows (PowerShell)
417
- $configPath = "$env:APPDATA\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings"
418
- cd $configPath
419
- notepad cline_mcp_settings.json
420
-
421
- # Windows (CMD)
422
- cd %APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings
423
- notepad cline_mcp_settings.json
446
+ # Windows
447
+ %APPDATA%\Qoder\mcp_settings.json
424
448
 
425
449
  # Mac
426
- cd ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings
427
- open -e cline_mcp_settings.json
428
- ```
429
-
430
- **If file doesn't exist, create it:**
431
-
432
- ```bash
433
- # Windows (PowerShell)
434
- $settingsPath = "$env:APPDATA\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings"
435
- New-Item -Path $settingsPath -ItemType Directory -Force
436
- New-Item -Path "$settingsPath\cline_mcp_settings.json" -ItemType File -Force
450
+ ~/Library/Application Support/Qoder/mcp_settings.json
437
451
 
438
- # Mac
439
- mkdir -p ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings
440
- touch ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
452
+ # Linux
453
+ ~/.config/Qoder/mcp_settings.json
441
454
  ```
442
455
 
443
- **Step 3: Add Configuration**
456
+ #### Step 2: Add STDIO Configuration
444
457
 
445
- **Basic Configuration:**
458
+ **Windows Configuration:**
446
459
  ```json
447
460
  {
448
461
  "mcpServers": {
449
462
  "brave-real-browser": {
450
463
  "command": "npx",
451
- "args": ["-y", "brave-real-browser-mcp-server@latest"]
464
+ "args": ["-y", "brave-real-browser-mcp-server@latest"],
465
+ "env": {
466
+ "BRAVE_PATH": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
467
+ }
452
468
  }
453
469
  }
454
470
  }
455
471
  ```
456
472
 
457
- **Advanced Configuration (with Brave path):**
473
+ **Mac Configuration:**
458
474
  ```json
459
475
  {
460
476
  "mcpServers": {
@@ -462,15 +478,14 @@ touch ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claud
462
478
  "command": "npx",
463
479
  "args": ["-y", "brave-real-browser-mcp-server@latest"],
464
480
  "env": {
465
- "BRAVE_PATH": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",
466
- "HEADLESS": "false"
481
+ "BRAVE_PATH": "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
467
482
  }
468
483
  }
469
484
  }
470
485
  }
471
486
  ```
472
487
 
473
- **For Mac:**
488
+ **Linux Configuration:**
474
489
  ```json
475
490
  {
476
491
  "mcpServers": {
@@ -478,251 +493,238 @@ touch ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claud
478
493
  "command": "npx",
479
494
  "args": ["-y", "brave-real-browser-mcp-server@latest"],
480
495
  "env": {
481
- "BRAVE_PATH": "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
496
+ "BRAVE_PATH": "/usr/bin/brave-browser"
482
497
  }
483
498
  }
484
499
  }
485
500
  }
486
501
  ```
487
502
 
488
- **Step 4: Save and Restart Cursor**
489
-
490
- ```bash
491
- # Windows
492
- taskkill /F /IM Cursor.exe
493
- # Then reopen Cursor
494
-
495
- # Mac
496
- pkill -f Cursor
497
- # Then reopen Cursor
498
- ```
503
+ #### Step 3: Restart Qoder AI
499
504
 
500
- **Step 5: Verify Installation**
505
+ Close and reopen Qoder AI completely.
501
506
 
502
- 1. Open Cursor AI
503
- 2. Open Cline panel (usually in sidebar)
504
- 3. Look for MCP tools section
505
- 4. You should see "brave-real-browser" listed
506
- 5. Test with:
507
- ```
508
- @brave-real-browser browser_init
509
- ```
507
+ #### Step 4: Verify Integration
510
508
 
511
- **Step 6: Using Tools in Cursor**
509
+ In Qoder AI, test:
512
510
 
513
511
  ```
514
- # In Cline chat:
515
- Use the browser_init tool from brave-real-browser to start automation
512
+ "List all available MCP tools"
513
+ Expected: 111 tools from Brave Real Browser
516
514
 
517
- # Or directly:
518
- @brave-real-browser navigate {"url": "https://example.com"}
515
+ "Use browser_init to start the browser"
516
+ Expected: Browser opens
517
+
518
+ "Navigate to https://example.com and get content"
519
+ → Expected: Page content extracted
519
520
  ```
520
521
 
521
- **Troubleshooting:**
522
+ ---
522
523
 
523
- ```bash
524
- # Check if Cline extension is active
525
- # Cursor → Extensions → Search "Cline" → Should show "Active"
524
+ ### 🔵 Method 2: SSE Transport (For Remote MCP Servers)
526
525
 
527
- # View Cline logs
528
- # Cursor → View → Output → Select "Cline" from dropdown
526
+ **SSE** uses HTTP POST for requests and event streams for responses. Perfect for remote hosted servers.
529
527
 
530
- # Test server manually
531
- npx -y brave-real-browser-mcp-server@latest
528
+ #### Step 1: Start SSE Server
532
529
 
533
- # Clear Cursor cache
530
+ ```bash
534
531
  # Windows
535
- Remove-Item -Recurse -Force "$env:APPDATA\Cursor\Cache"
532
+ set BRAVE_PATH=C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe
533
+ npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001
536
534
 
537
535
  # Mac
538
- rm -rf ~/Library/Application\ Support/Cursor/Cache
539
- ```
540
-
541
- **Configuration Locations:**
542
- - Windows: `%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
543
- - Mac: `~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
536
+ export BRAVE_PATH="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
537
+ npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001
544
538
 
545
- ### Windsurf
539
+ # Linux
540
+ export BRAVE_PATH="/usr/bin/brave-browser"
541
+ npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001
542
+ ```
546
543
 
547
- **File:** `mcp.json`
544
+ **Server will start:**
545
+ ```
546
+ 🟢 [SSE] Starting SSE server...
547
+ ✅ [SSE] Server ready at http://localhost:3001
548
+ 💡 [SSE] Real-time monitoring enabled
549
+ ```
548
550
 
549
- **Location:**
551
+ #### Step 2: Configure Qoder AI for SSE
550
552
 
551
- - Windows: `%APPDATA%\Windsurf\mcp.json`
552
- - Mac: `~/.windsurf/mcp.json`
553
+ **In Qoder AI Settings → MCP Servers:**
553
554
 
554
555
  ```json
555
556
  {
556
- "mcpServers": {
557
- "brave-real-browser": {
558
- "command": "npx",
559
- "args": ["-y", "brave-real-browser-mcp-server@latest"]
560
- }
557
+ "brave-real-browser": {
558
+ "url": "http://localhost:3001/sse",
559
+ "transport": "sse",
560
+ "name": "Brave Real Browser (SSE)",
561
+ "enabled": true
561
562
  }
562
563
  }
563
564
  ```
564
565
 
565
- ### Cline (VSCode Extension)
566
-
567
- **File:** `cline_mcp_settings.json`
566
+ #### Step 3: Restart Qoder AI
568
567
 
569
- **Location:**
568
+ Close and reopen Qoder AI.
570
569
 
571
- - Windows: `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
572
- - Mac: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
570
+ ---
573
571
 
574
- ```json
575
- {
576
- "mcpServers": {
577
- "brave-real-browser": {
578
- "command": "npx",
579
- "args": ["-y", "brave-real-browser-mcp-server@latest"]
580
- }
581
- }
582
- }
583
- ```
572
+ ### 🛠️ Using Brave Browser in Qoder AI
584
573
 
585
- ### Zed Editor
574
+ Once configured, you can use **all 111 tools** in Qoder AI:
586
575
 
587
- **Protocol:** Context Servers (MCP)
576
+ **Example 1: Web Scraping**
577
+ ```
578
+ "Initialize browser, navigate to https://news.ycombinator.com and scrape all article titles"
579
+ ```
588
580
 
589
- **File:** `settings.json`
581
+ **Example 2: Form Automation**
582
+ ```
583
+ "Open https://example.com/login, fill the form with username 'test' and password 'pass123', then click submit"
584
+ ```
590
585
 
591
- **Location:**
586
+ **Example 3: Data Extraction**
587
+ ```
588
+ "Go to https://example.com/products and extract all product names, prices, and images"
589
+ ```
592
590
 
593
- - Windows: `%APPDATA%\Zed\settings.json`
594
- - Mac: `~/.config/zed/settings.json`
595
- - Linux: `~/.config/zed/settings.json`
591
+ **Example 4: Video Extraction**
592
+ ```
593
+ "Navigate to [video URL] and extract all video download links"
594
+ ```
596
595
 
597
- #### Step-by-Step Setup Guide:
596
+ **Example 5: Screenshot**
597
+ ```
598
+ "Take a full-page screenshot of https://example.com and save it"
599
+ ```
598
600
 
599
- **Step 1:** Open Zed Editor and press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (Mac)
601
+ ---
600
602
 
601
- **Step 2:** Type "Open Settings" and select "Zed: Open Settings"
603
+ ### Quick Troubleshooting for Qoder AI
602
604
 
603
- **Step 3:** Add the following configuration:
605
+ **Problem 1: "MCP Server timeout" or "Connection failed"**
604
606
 
605
- ```json
606
- {
607
- "context_servers": {
608
- "brave-real-browser": {
609
- "source": "custom",
610
- "command": "npx.cmd",
611
- "args": ["-y", "brave-real-browser-mcp-server"]
612
- }
613
- }
614
- }
607
+ **Solution:**
608
+ ```bash
609
+ # Install globally for faster startup
610
+ npm install -g brave-real-browser-mcp-server@latest
615
611
  ```
616
612
 
617
- **For Mac/Linux, use:**
613
+ Then update config to:
618
614
  ```json
619
615
  {
620
- "context_servers": {
616
+ "mcpServers": {
621
617
  "brave-real-browser": {
622
- "source": "custom",
623
- "command": "npx",
624
- "args": ["-y", "brave-real-browser-mcp-server"]
618
+ "command": "brave-real-browser-mcp-server",
619
+ "args": []
625
620
  }
626
621
  }
627
622
  }
628
623
  ```
629
624
 
630
- **Step 4:** Save the file and restart Zed Editor
631
-
632
- **Step 5:** Verify installation by checking Zed's output panel
633
-
634
- **Important Notes:**
635
- - ⚠️ **Zed uses `context_servers` NOT `mcpServers` or `lsp`**
636
- - ✅ Make sure you're using Zed Preview version (v0.120.0+) for MCP support
637
- - ✅ On Windows, use `npx.cmd` instead of `npx`
638
- - ✅ Server will auto-start when Zed launches
625
+ **Problem 2: "Tools not showing in Qoder AI"**
639
626
 
640
- ### Qoder AI Editor
627
+ **Solution:**
628
+ 1. Check config file path is correct
629
+ 2. Verify JSON format is valid
630
+ 3. Restart Qoder AI completely
631
+ 4. Check Qoder AI logs for errors
641
632
 
642
- **Protocol:** MCP (STDIO) | **Setup Time:** 3 minutes | **Auto-Start:** ✅ Yes
633
+ **Problem 3: "Browser not opening"**
643
634
 
644
- **✅ Good News:** Qoder AI supports standard STDIO-based MCP servers (just like Claude, Cursor, Windsurf)!
645
-
646
- #### 📋 Step-by-Step Setup Guide:
635
+ **Solution:**
636
+ ```bash
637
+ # Set Brave path explicitly in config
638
+ "env": {
639
+ "BRAVE_PATH": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
640
+ }
641
+ ```
647
642
 
648
- **Step 1: Open Qoder Settings**
643
+ **Problem 4: "SSE server not connecting"**
649
644
 
645
+ **Solution:**
650
646
  ```bash
651
- # Method 1: Using keyboard shortcut
652
- # Windows: Ctrl + Shift + ,
653
- # Mac: ⌘ + Shift + ,
647
+ # Check if server is running
648
+ curl http://localhost:3001/health
654
649
 
655
- # Method 2: Click user icon in upper-right corner
656
- # Then select "Qoder Settings"
650
+ # Try different port
651
+ npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3002
657
652
  ```
658
653
 
659
- **Step 2: Navigate to MCP Section**
654
+ ---
660
655
 
661
- 1. In left-side navigation pane, click **MCP**
662
- 2. Click on **My Servers** tab
663
- 3. Click **+ Add** button in upper-right corner
656
+ ### 📊 Available Tools in Qoder AI
664
657
 
665
- **Step 3: Install Package Globally (Important for Qoder AI)**
658
+ All **111 tools** are available:
666
659
 
667
- ```bash
668
- # Install globally for faster startup
669
- npm install -g brave-real-browser-mcp-server@latest
660
+ ✅ **Browser Management:** `browser_init`, `browser_close`
661
+ **Navigation:** `navigate`, `wait`, `click`, `type`
662
+ **Content Extraction:** `get_content`, `scrape_table`, `extract_json`, `scrape_meta_tags`
663
+ ✅ **Media Tools:** `video_link_finder`, `image_scraper`, `media_extractor`
664
+ ✅ **CAPTCHA Solving:** `solve_captcha`, `ocr_engine`
665
+ ✅ **Data Processing:** `price_parser`, `date_normalizer`, `contact_extractor`
666
+ ✅ **Visual Tools:** `full_page_screenshot`, `pdf_generation`
667
+ ✅ **And 90+ more tools!**
670
668
 
671
- # Verify installation
672
- where brave-real-browser-mcp-server # Windows
673
- which brave-real-browser-mcp-server # Mac/Linux
674
- ```
669
+ ---
670
+
671
+ ## 🎨 IDE Configurations
675
672
 
676
- **Why global install?** Qoder AI has a short timeout for MCP server initialization. Using `npx` can be slow on first run. Global installation ensures fast startup.
677
673
 
678
- **Step 4: Add Configuration**
674
+ **Step 2: Add Configuration**
679
675
 
680
- A JSON file will appear. Add this configuration:
676
+ Copy and paste this configuration:
681
677
 
682
- **Option A - Using Global Install (Recommended):**
683
678
  ```json
684
679
  {
685
680
  "mcpServers": {
686
681
  "brave-real-browser": {
687
- "command": "brave-real-browser-mcp-server",
688
- "args": []
682
+ "command": "npx",
683
+ "args": ["-y", "brave-real-browser-mcp-server@latest"]
689
684
  }
690
685
  }
691
686
  }
692
687
  ```
693
688
 
694
- **Option B - Using NPX (May timeout on first run):**
689
+ **Advanced Configuration (Optional):**
690
+
695
691
  ```json
696
692
  {
697
693
  "mcpServers": {
698
694
  "brave-real-browser": {
699
695
  "command": "npx",
700
- "args": ["-y", "brave-real-browser-mcp-server@latest"]
696
+ "args": ["-y", "brave-real-browser-mcp-server@latest"],
697
+ "env": {
698
+ "BRAVE_PATH": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",
699
+ "HEADLESS": "false"
700
+ }
701
701
  }
702
702
  }
703
703
  }
704
704
  ```
705
705
 
706
- **Option C - Using Node directly:**
707
- ```json
708
- {
706
+ **Configuration Locations:**
707
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
708
+ - Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
709
+ - Linux: `~/.config/Claude/claude_desktop_config.json`
710
+
711
+ ### Cursor AI
712
+
713
+ **Step 3: Add Configuration**
714
+
715
+ **Basic Configuration:**
716
+ ```json
717
+ {
709
718
  "mcpServers": {
710
719
  "brave-real-browser": {
711
- "command": "node",
712
- "args": [
713
- "C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\brave-real-browser-mcp-server\\dist\\index.js"
714
- ]
720
+ "command": "npx",
721
+ "args": ["-y", "brave-real-browser-mcp-server@latest"]
715
722
  }
716
723
  }
717
724
  }
718
725
  ```
719
726
 
720
- **Note:** Replace path in Option C with your actual global npm modules path:
721
- - Windows: `%APPDATA%\npm\node_modules\brave-real-browser-mcp-server\dist\index.js`
722
- - Mac/Linux: `/usr/local/lib/node_modules/brave-real-browser-mcp-server/dist/index.js`
723
-
724
- **Advanced Configuration (with environment variables):**
725
-
727
+ **Advanced Configuration (with Brave path):**
726
728
  ```json
727
729
  {
728
730
  "mcpServers": {
@@ -739,7 +741,6 @@ A JSON file will appear. Add this configuration:
739
741
  ```
740
742
 
741
743
  **For Mac:**
742
-
743
744
  ```json
744
745
  {
745
746
  "mcpServers": {
@@ -754,180 +755,147 @@ A JSON file will appear. Add this configuration:
754
755
  }
755
756
  ```
756
757
 
757
- **Step 5: Save Configuration**
758
-
759
- 1. Close the JSON file
760
- 2. Click **Save** when prompted
761
- 3. The new server will appear in your list
762
- 4. A **link icon** (🔗) means the connection is successful
763
-
764
- **Step 6: Verify Installation**
765
-
766
- 1. Expand the **brave-real-browser** entry
767
- 2. You should see list of 111 available tools
768
- 3. If server fails to start, click **Quick Fix** button
769
- 4. If issue persists, check troubleshooting section below
770
-
771
- **Step 7: Using Tools in Qoder AI**
772
-
773
- 1. Switch to **Agent mode** in AI Chat panel
774
- 2. Ask Qoder to use browser automation:
775
- ```
776
- Use brave-real-browser to navigate to https://example.com and extract the main content
777
- ```
778
- 3. Qoder will prompt for confirmation before using MCP tools
779
- 4. Press `Ctrl+Enter` (Windows) or `⌘+Enter` (Mac) to execute
780
-
781
- **Important Notes:**
782
-
783
- - ⚠️ **Maximum 10 MCP servers** can be used simultaneously
784
- - ✅ **Only works in Agent mode** (not in Ask mode)
785
- - ✅ **Server auto-starts** when Qoder launches
786
- - ✅ **Node.js V18+ required** (includes NPM V8+)
787
-
788
- **Prerequisites Check:**
789
-
790
- ```bash
791
- # Verify Node.js installation
792
- node -v # Should show v18.0.0 or higher
793
- npx -v # Should show version number
794
-
795
- # If not installed:
796
- # Windows: Download from https://nodejs.org/
797
- # Mac: brew install node
798
- # Linux: Use package manager (apt, yum, etc.)
799
- ```
800
-
801
- **Troubleshooting:**
802
-
803
- **Issue: "context deadline exceeded" or Timeout Error**
758
+ ### Windsurf
804
759
 
805
- ```
806
- failed to initialize MCP client: context deadline exceeded
807
- ```
760
+ **File:** `mcp.json`
808
761
 
809
- **Cause:** Qoder AI has a short initialization timeout. Using `npx` can be slow on first run because it needs to download and cache the package.
762
+ **Location:**
810
763
 
811
- **Solution 1 - Install Globally (Recommended):**
812
- ```bash
813
- # Install package globally for instant startup
814
- npm install -g brave-real-browser-mcp-server@latest
815
- ```
764
+ - Windows: `%APPDATA%\Windsurf\mcp.json`
765
+ - Mac: `~/.windsurf/mcp.json`
816
766
 
817
- Then update your configuration to:
818
767
  ```json
819
768
  {
820
769
  "mcpServers": {
821
770
  "brave-real-browser": {
822
- "command": "brave-real-browser-mcp-server",
823
- "args": []
771
+ "command": "npx",
772
+ "args": ["-y", "brave-real-browser-mcp-server@latest"]
824
773
  }
825
774
  }
826
775
  }
827
776
  ```
828
777
 
829
- **Solution 2 - Pre-cache npx package:**
830
- ```bash
831
- # Run once to cache the package
832
- npx -y brave-real-browser-mcp-server@latest
833
- # Press Ctrl+C after server starts
834
-
835
- # Now npx will be fast on subsequent runs
836
- ```
778
+ ### Cline (VSCode Extension)
837
779
 
838
- **Solution 3 - Use Direct Node Path:**
780
+ **File:** `cline_mcp_settings.json`
839
781
 
840
- First, find the global package location:
841
- ```bash
842
- # Windows
843
- npm root -g
844
- # Usually: C:\Users\<USERNAME>\AppData\Roaming\npm\node_modules
782
+ **Location:**
845
783
 
846
- # Mac/Linux
847
- npm root -g
848
- # Usually: /usr/local/lib/node_modules
849
- ```
784
+ - Windows: `%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
785
+ - Mac: `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
850
786
 
851
- Then use full path:
852
787
  ```json
853
788
  {
854
789
  "mcpServers": {
855
790
  "brave-real-browser": {
856
- "command": "node",
857
- "args": ["<npm-root>\\brave-real-browser-mcp-server\\dist\\index.js"]
791
+ "command": "npx",
792
+ "args": ["-y", "brave-real-browser-mcp-server@latest"]
858
793
  }
859
794
  }
860
795
  }
861
796
  ```
862
797
 
863
- **Issue: "exec: npx: executable file not found"**
798
+ ### Zed Editor
864
799
 
865
- ```bash
866
- # Solution: Install Node.js V18 or later
867
- # Windows
868
- nvm install 22.14.0
869
- nvm use 22.14.0
800
+ **Protocol:** Context Servers (MCP)
870
801
 
871
- # Mac
872
- brew install node
802
+ **File:** `settings.json`
873
803
 
874
- # Verify
875
- node -v
876
- npx -v
877
- ```
804
+ **Location:**
878
805
 
879
- **Issue: "failed to initialize MCP client: context deadline exceeded"**
806
+ - Windows: `%APPDATA%\Zed\settings.json`
807
+ - Mac: `~/.config/zed/settings.json`
808
+ - Linux: `~/.config/zed/settings.json`
880
809
 
881
- 1. Click **Copy complete command** in Qoder UI
882
- 2. Run command in terminal to see detailed error
883
- 3. Check if Node.js is blocked by security software
884
- 4. Add Node.js to security software whitelist
810
+ #### Step-by-Step Setup Guide:
885
811
 
886
- **Issue: Server fails to connect**
812
+ **Step 1:** Open Zed Editor and press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (Mac)
887
813
 
888
- 1. Click **Retry** icon in Qoder interface
889
- 2. Qoder will attempt to restart MCP server automatically
890
- 3. Check **My Servers** tab for connection status
891
- 4. Expand server details to see tools list
814
+ **Step 2:** Type "Open Settings" and select "Zed: Open Settings"
892
815
 
893
- **Issue: Tools not being called by LLM**
816
+ **Step 3:** Add the following configuration:
894
817
 
895
- 1. Make sure you're in **Agent mode** (not Ask mode)
896
- 2. Open a project directory in Qoder
897
- 3. Ensure MCP server shows **link icon** (connected)
898
- 4. Try explicit prompt: "Use brave-real-browser to..."
818
+ ```json
819
+ {
820
+ "context_servers": {
821
+ "brave-real-browser": {
822
+ "source": "custom",
823
+ "command": "npx.cmd",
824
+ "args": ["-y", "brave-real-browser-mcp-server"]
825
+ }
826
+ }
827
+ }
828
+ ```
899
829
 
900
- **Configuration Locations:**
830
+ **For Mac/Linux, use:**
831
+ ```json
832
+ {
833
+ "context_servers": {
834
+ "brave-real-browser": {
835
+ "source": "custom",
836
+ "command": "npx",
837
+ "args": ["-y", "brave-real-browser-mcp-server"]
838
+ }
839
+ }
840
+ }
841
+ ```
901
842
 
902
- - Windows: Qoder Settings MCP My Servers
903
- - Mac: Qoder Settings → MCP → My Servers
904
- - Linux: Qoder Settings → MCP → My Servers
843
+ **Note:** Replace path in Option C with your actual global npm modules path:
844
+ - Windows: `%APPDATA%\npm\node_modules\brave-real-browser-mcp-server\dist\index.js`
845
+ - Mac/Linux: `/usr/local/lib/node_modules/brave-real-browser-mcp-server/dist/index.js`
905
846
 
906
- **Official Documentation:**
907
- - Qoder MCP Guide: https://docs.qoder.com/user-guide/chat/model-context-protocol
908
- - MCP Common Issues: https://docs.qoder.com/support/mcp-common-issues
847
+ **Advanced Configuration (with environment variables):**
909
848
 
910
- ### Other HTTP-based IDEs (Gemini CLI, Qwen Code CLI, Custom Tools)
849
+ ```json
850
+ {
851
+ "mcpServers": {
852
+ "brave-real-browser": {
853
+ "command": "npx",
854
+ "args": ["-y", "brave-real-browser-mcp-server@latest"],
855
+ "env": {
856
+ "BRAVE_PATH": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",
857
+ "HEADLESS": "false"
858
+ }
859
+ }
860
+ }
861
+ }
862
+ ```
911
863
 
912
- **Step 1:** Start HTTP server as shown above
864
+ **For Mac:**
913
865
 
914
- **Step 2:** Configure your IDE/tool to use endpoint: `http://localhost:3000`
866
+ ```json
867
+ {
868
+ "mcpServers": {
869
+ "brave-real-browser": {
870
+ "command": "npx",
871
+ "args": ["-y", "brave-real-browser-mcp-server@latest"],
872
+ "env": {
873
+ "BRAVE_PATH": "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
874
+ }
875
+ }
876
+ }
877
+ }
878
+ ```
915
879
 
916
- **Step 3:** Make HTTP POST requests to execute tools:
880
+ **Cause:** Qoder AI has a short initialization timeout. Using `npx` can be slow on first run because it needs to download and cache the package.
917
881
 
882
+ **Solution 1 - Install Globally (Recommended):**
918
883
  ```bash
919
- # Example: Navigate to URL
920
- curl -X POST http://localhost:3000/tools/navigate \
921
- -H "Content-Type: application/json" \
922
- -d '{"url": "https://example.com"}'
923
-
924
- # Example: Get page content
925
- curl -X POST http://localhost:3000/tools/get_content \
926
- -H "Content-Type: application/json" \
927
- -d '{"type": "text"}'
884
+ # Install package globally for instant startup
885
+ npm install -g brave-real-browser-mcp-server@latest
928
886
  ```
929
887
 
930
- ---
888
+ Then update your configuration to:
889
+ ```json
890
+ {
891
+ "mcpServers": {
892
+ "brave-real-browser": {
893
+ "command": "brave-real-browser-mcp-server",
894
+ "args": []
895
+ }
896
+ }
897
+ }
898
+ ```
931
899
 
932
900
  ## 🛠️ Available Tools (111)
933
901
 
@@ -1133,131 +1101,6 @@ curl -X POST http://localhost:3000/tools/get_content \
1133
1101
  | `url_redirect_tracer` | Trace URL redirects |
1134
1102
  | `user_agent_extractor` | Extract user agent info |
1135
1103
 
1136
- ---
1137
-
1138
- ## 💡 Usage Examples
1139
-
1140
- ### Example 1: Simple Web Scraping (MCP Mode)
1141
-
1142
- ```javascript
1143
- // Using MCP tool in Claude/Cursor
1144
- await use_mcp_tool({
1145
- server_name: "brave-real-browser",
1146
- tool_name: "browser_init",
1147
- arguments: {},
1148
- });
1149
-
1150
- await use_mcp_tool({
1151
- server_name: "brave-real-browser",
1152
- tool_name: "navigate",
1153
- arguments: { url: "https://example.com" },
1154
- });
1155
-
1156
- await use_mcp_tool({
1157
- server_name: "brave-real-browser",
1158
- tool_name: "get_content",
1159
- arguments: { type: "text" },
1160
- });
1161
- ```
1162
-
1163
- ### Example 2: CAPTCHA Solving
1164
-
1165
- ```javascript
1166
- // Navigate to CAPTCHA page
1167
- await use_mcp_tool({
1168
- server_name: "brave-real-browser",
1169
- tool_name: "navigate",
1170
- arguments: { url: "https://site-with-captcha.com" },
1171
- });
1172
-
1173
- // Solve CAPTCHA
1174
- await use_mcp_tool({
1175
- server_name: "brave-real-browser",
1176
- tool_name: "solve_captcha",
1177
- arguments: { type: "recaptcha" },
1178
- });
1179
-
1180
- // Continue automation
1181
- await use_mcp_tool({
1182
- server_name: "brave-real-browser",
1183
- tool_name: "click",
1184
- arguments: { selector: "button.submit" },
1185
- });
1186
- ```
1187
-
1188
- ### Example 3: Video Extraction
1189
-
1190
- ```javascript
1191
- // Navigate to video page
1192
- await use_mcp_tool({
1193
- server_name: "brave-real-browser",
1194
- tool_name: "navigate",
1195
- arguments: { url: "https://video-site.com/video/123" },
1196
- });
1197
-
1198
- // Find video links
1199
- await use_mcp_tool({
1200
- server_name: "brave-real-browser",
1201
- tool_name: "video_link_finder",
1202
- arguments: {},
1203
- });
1204
-
1205
- // Advanced video extraction with ad bypass
1206
- await use_mcp_tool({
1207
- server_name: "brave-real-browser",
1208
- tool_name: "advanced_video_extraction",
1209
- arguments: {},
1210
- });
1211
- ```
1212
-
1213
- ### Example 4: Multi-Page Scraping
1214
-
1215
- ```javascript
1216
- // Initialize browser
1217
- await use_mcp_tool({
1218
- server_name: "brave-real-browser",
1219
- tool_name: "browser_init",
1220
- arguments: {},
1221
- });
1222
-
1223
- // Auto-paginate through all pages
1224
- await use_mcp_tool({
1225
- server_name: "brave-real-browser",
1226
- tool_name: "multi_page_scraper",
1227
- arguments: {
1228
- startUrl: "https://example.com/page/1",
1229
- maxPages: 10,
1230
- },
1231
- });
1232
- ```
1233
-
1234
- ---
1235
-
1236
- ## 📋 API Endpoints (HTTP Mode)
1237
-
1238
- When running in HTTP mode, these endpoints are available:
1239
-
1240
- ```
1241
- GET /health - Health check
1242
- GET /tools - List all tools
1243
- POST /tools/:toolName - Execute any tool
1244
- POST /browser/init - Initialize browser
1245
- POST /browser/navigate - Navigate to URL
1246
- POST /browser/get_content - Get page content
1247
- POST /browser/click - Click element
1248
- POST /browser/type - Type text
1249
- POST /browser/close - Close browser
1250
- ```
1251
-
1252
- **Example:**
1253
-
1254
- ```bash
1255
- curl -X POST http://localhost:3000/tools/navigate \
1256
- -H "Content-Type: application/json" \
1257
- -d '{"url": "https://example.com"}'
1258
- ```
1259
-
1260
- ---
1261
1104
 
1262
1105
  ## 🔧 Environment Variables
1263
1106
 
@@ -1275,403 +1118,6 @@ DISABLE_CONTENT_PRIORITY=true
1275
1118
  HTTP_PORT=3000
1276
1119
  ```
1277
1120
 
1278
- ---
1279
-
1280
- ## 🐛 Troubleshooting
1281
-
1282
- ### Common Issues & Solutions
1283
-
1284
- #### 1. Brave Browser Not Found
1285
-
1286
- **Symptoms:**
1287
- - Error: "Brave browser not found"
1288
- - Browser fails to launch
1289
-
1290
- **Solutions:**
1291
-
1292
- ```bash
1293
- # Windows (PowerShell)
1294
- $env:BRAVE_PATH="C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe"
1295
-
1296
- # Windows (CMD)
1297
- set BRAVE_PATH="C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe"
1298
-
1299
- # Mac
1300
- export BRAVE_PATH="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
1301
-
1302
- # Linux (Ubuntu/Debian)
1303
- export BRAVE_PATH="/usr/bin/brave-browser"
1304
-
1305
- # Linux (Snap)
1306
- export BRAVE_PATH="/snap/bin/brave"
1307
- ```
1308
-
1309
- **Permanent Fix (Windows):**
1310
- ```powershell
1311
- # Add to System Environment Variables
1312
- [System.Environment]::SetEnvironmentVariable('BRAVE_PATH', 'C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe', 'User')
1313
- ```
1314
-
1315
- ---
1316
-
1317
- #### 2. Server Won't Start
1318
-
1319
- **Symptoms:**
1320
- - "Failed to start server" error
1321
- - Process exits immediately
1322
- - No output in terminal
1323
-
1324
- **Solutions:**
1325
-
1326
- **Step 1:** Check Node.js version
1327
- ```bash
1328
- node --version
1329
- # Should show v18.0.0 or higher
1330
- ```
1331
-
1332
- **Step 2:** If Node.js is old, update it:
1333
- ```bash
1334
- # Windows (using Chocolatey)
1335
- choco upgrade nodejs
1336
-
1337
- # Mac (using Homebrew)
1338
- brew upgrade node
1339
-
1340
- # Or download from: https://nodejs.org/
1341
- ```
1342
-
1343
- **Step 3:** Clear npm cache and reinstall
1344
- ```bash
1345
- npm cache clean --force
1346
- npm uninstall -g brave-real-browser-mcp-server
1347
- npm install -g brave-real-browser-mcp-server@latest
1348
- ```
1349
-
1350
- **Step 4:** Check for conflicting processes
1351
- ```bash
1352
- # Windows
1353
- taskkill /F /IM brave.exe
1354
-
1355
- # Mac/Linux
1356
- pkill -f brave
1357
- ```
1358
-
1359
- ---
1360
-
1361
- #### 3. Port Already in Use (HTTP Mode)
1362
-
1363
- **Symptoms:**
1364
- - Error: "EADDRINUSE: address already in use ::3000"
1365
- - HTTP server fails to start
1366
-
1367
- **Solutions:**
1368
-
1369
- **Option A:** Use a different port
1370
- ```bash
1371
- npx brave-real-browser-mcp-server@latest --mode http --port 8080
1372
- ```
1373
-
1374
- **Option B:** Kill the process using port 3000
1375
-
1376
- ```bash
1377
- # Windows (PowerShell)
1378
- Get-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess | Stop-Process -Force
1379
-
1380
- # Windows (CMD)
1381
- for /f "tokens=5" %a in ('netstat -aon ^| find ":3000" ^| find "LISTENING"') do taskkill /F /PID %a
1382
-
1383
- # Mac/Linux
1384
- lsof -ti:3000 | xargs kill -9
1385
- ```
1386
-
1387
- ---
1388
-
1389
- #### 4. Qoder AI Configuration Fails
1390
-
1391
- **Symptoms:**
1392
- - "Connection refused" error
1393
- - "Server not reachable" message
1394
- - Tools not appearing in Qoder AI
1395
-
1396
- **Solutions:**
1397
-
1398
- **Step 1:** Verify HTTP server is running
1399
- ```bash
1400
- # Start server in a separate terminal
1401
- npx brave-real-browser-mcp-server@latest --mode http --port 3000
1402
-
1403
- # You should see:
1404
- # ✅ [HTTP] Server ready at http://localhost:3000
1405
- ```
1406
-
1407
- **Step 2:** Test server connection
1408
- ```bash
1409
- curl http://localhost:3000/health
1410
- # Expected: {"status":"ok","timestamp":"..."}
1411
- ```
1412
-
1413
- **Step 3:** Check firewall settings
1414
- ```bash
1415
- # Windows: Allow Node.js through firewall
1416
- netsh advfirewall firewall add rule name="Node.js" dir=in action=allow program="C:\Program Files\nodejs\node.exe" enable=yes
1417
- ```
1418
-
1419
- **Step 4:** Try alternative configuration
1420
- ```json
1421
- {
1422
- "mcpServers": {
1423
- "brave-real-browser": {
1424
- "command": "npx",
1425
- "args": ["-y", "brave-real-browser-mcp-server@latest", "--mode", "http", "--port", "3000"],
1426
- "env": {}
1427
- }
1428
- }
1429
- }
1430
- ```
1431
-
1432
- ---
1433
-
1434
- #### 5. Zed Editor Not Detecting Server
1435
-
1436
- **Symptoms:**
1437
- - Context servers not appearing
1438
- - "Failed to start context server" error
1439
-
1440
- **Solutions:**
1441
-
1442
- **Step 1:** Ensure Zed Preview version
1443
- ```bash
1444
- # Check Zed version (should be v0.120.0 or higher)
1445
- # Open Zed → Help → About Zed
1446
- ```
1447
-
1448
- **Step 2:** Verify correct configuration format
1449
- ```json
1450
- {
1451
- "context_servers": {
1452
- "brave-real-browser": {
1453
- "source": "custom",
1454
- "command": "npx.cmd", // Windows: use npx.cmd, Mac/Linux: use npx
1455
- "args": ["-y", "brave-real-browser-mcp-server"]
1456
- }
1457
- }
1458
- }
1459
- ```
1460
-
1461
- **Step 3:** Check Zed logs
1462
- ```bash
1463
- # Open Zed → View → Debug → Language Server Logs
1464
- # Look for error messages
1465
- ```
1466
-
1467
- **Step 4:** Restart Zed completely
1468
- ```bash
1469
- # Close Zed and kill any background processes
1470
- # Windows
1471
- taskkill /F /IM zed.exe
1472
-
1473
- # Mac
1474
- pkill -f zed
1475
- ```
1476
-
1477
- ---
1478
-
1479
- #### 6. Claude Desktop Configuration Issues
1480
-
1481
- **Symptoms:**
1482
- - "MCP server failed to start"
1483
- - Tools not appearing in Claude
1484
-
1485
- **Solutions:**
1486
-
1487
- **Step 1:** Check config file location
1488
- ```bash
1489
- # Windows
1490
- echo %APPDATA%\Claude\claude_desktop_config.json
1491
-
1492
- # Mac
1493
- echo ~/Library/Application\ Support/Claude/claude_desktop_config.json
1494
- ```
1495
-
1496
- **Step 2:** Validate JSON format
1497
- - Use https://jsonlint.com/ to validate your config
1498
- - Ensure no trailing commas
1499
- - Check quotes are properly escaped
1500
-
1501
- **Step 3:** Check Claude logs
1502
- ```bash
1503
- # Windows
1504
- type "%APPDATA%\Claude\logs\mcp*.log"
1505
-
1506
- # Mac
1507
- cat ~/Library/Logs/Claude/mcp*.log
1508
- ```
1509
-
1510
- **Step 4:** Restart Claude Desktop completely
1511
- ```bash
1512
- # Windows
1513
- taskkill /F /IM claude.exe
1514
-
1515
- # Mac
1516
- pkill -f Claude
1517
- ```
1518
-
1519
- ---
1520
-
1521
- #### 7. CAPTCHA Not Solving
1522
-
1523
- **Symptoms:**
1524
- - CAPTCHA solve timeout
1525
- - "Failed to solve CAPTCHA" error
1526
-
1527
- **Solutions:**
1528
-
1529
- **Step 1:** Ensure CAPTCHA is fully loaded
1530
- ```javascript
1531
- // Add wait before solving
1532
- await use_mcp_tool({
1533
- server_name: "brave-real-browser",
1534
- tool_name: "wait",
1535
- arguments: { type: "timeout", value: "5000" }
1536
- });
1537
- ```
1538
-
1539
- **Step 2:** Try longer timeout
1540
- ```javascript
1541
- await use_mcp_tool({
1542
- server_name: "brave-real-browser",
1543
- tool_name: "solve_captcha",
1544
- arguments: {
1545
- type: "recaptcha",
1546
- timeout: 60000 // 60 seconds
1547
- }
1548
- });
1549
- ```
1550
-
1551
- **Step 3:** Try different CAPTCHA types
1552
- - `recaptcha` - Google reCAPTCHA v2/v3
1553
- - `hcaptcha` - hCaptcha
1554
- - `turnstile` - Cloudflare Turnstile
1555
-
1556
- ---
1557
-
1558
- #### 8. NPX Command Not Found
1559
-
1560
- **Symptoms:**
1561
- - "npx: command not found"
1562
- - "npx is not recognized"
1563
-
1564
- **Solutions:**
1565
-
1566
- **Step 1:** Verify npm installation
1567
- ```bash
1568
- npm --version
1569
- ```
1570
-
1571
- **Step 2:** Reinstall Node.js
1572
- - Download from: https://nodejs.org/
1573
- - Choose LTS version
1574
- - During installation, ensure "Add to PATH" is checked
1575
-
1576
- **Step 3:** Add npm to PATH manually (Windows)
1577
- ```powershell
1578
- $env:PATH += ";C:\Program Files\nodejs"
1579
- ```
1580
-
1581
- ---
1582
-
1583
- #### 9. Permission Denied Errors (Linux/Mac)
1584
-
1585
- **Symptoms:**
1586
- - "EACCES: permission denied"
1587
- - Cannot install globally
1588
-
1589
- **Solutions:**
1590
-
1591
- ```bash
1592
- # Option A: Fix npm permissions
1593
- sudo chown -R $(whoami) ~/.npm
1594
- sudo chown -R $(whoami) /usr/local/lib/node_modules
1595
-
1596
- # Option B: Use npx instead of global install
1597
- npx brave-real-browser-mcp-server@latest
1598
-
1599
- # Option C: Use nvm (recommended)
1600
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
1601
- nvm install --lts
1602
- ```
1603
-
1604
- ---
1605
-
1606
- #### 10. Browser Crashes or Hangs
1607
-
1608
- **Symptoms:**
1609
- - Browser becomes unresponsive
1610
- - "Page crashed" errors
1611
- - Memory issues
1612
-
1613
- **Solutions:**
1614
-
1615
- **Step 1:** Enable headless mode
1616
- ```json
1617
- {
1618
- "mcpServers": {
1619
- "brave-real-browser": {
1620
- "command": "npx",
1621
- "args": ["-y", "brave-real-browser-mcp-server@latest"],
1622
- "env": {
1623
- "HEADLESS": "true"
1624
- }
1625
- }
1626
- }
1627
- }
1628
- ```
1629
-
1630
- **Step 2:** Increase timeout values
1631
- ```javascript
1632
- await use_mcp_tool({
1633
- server_name: "brave-real-browser",
1634
- tool_name: "navigate",
1635
- arguments: {
1636
- url: "https://example.com",
1637
- waitUntil: "networkidle2",
1638
- timeout: 60000
1639
- }
1640
- });
1641
- ```
1642
-
1643
- **Step 3:** Clear browser cache
1644
- ```bash
1645
- # Kill all Brave processes
1646
- # Windows
1647
- taskkill /F /IM brave.exe
1648
-
1649
- # Mac/Linux
1650
- pkill -9 brave
1651
- ```
1652
-
1653
- ---
1654
-
1655
- ### Getting Help
1656
-
1657
- If you're still experiencing issues:
1658
-
1659
- 1. **Check GitHub Issues:** https://github.com/codeiva4u/Brave-Real-Browser-Mcp-Server/issues
1660
- 2. **Enable Debug Logs:** Set `DEBUG=*` environment variable
1661
- 3. **Report Bug:** Include:
1662
- - Operating System & version
1663
- - Node.js version (`node --version`)
1664
- - Editor/IDE name & version
1665
- - Complete error message
1666
- - Configuration file (remove sensitive data)
1667
-
1668
- ```bash
1669
- # Run with debug logging
1670
- DEBUG=* npx brave-real-browser-mcp-server@latest --mode http
1671
- ```
1672
-
1673
- ---
1674
-
1675
1121
  ## 📊 Supported Protocols
1676
1122
 
1677
1123
  || Protocol | Used By | Auto-Config | Status |
@@ -1682,46 +1128,6 @@ DEBUG=* npx brave-real-browser-mcp-server@latest --mode http
1682
1128
  || **WebSocket** | Modern Web Apps, Real-time Tools | ✅ | 🟢 Working |
1683
1129
  || **SSE** | Real-time Streaming, Web Apps | ✅ | 🟢 Working |
1684
1130
 
1685
- ---
1686
-
1687
- ## 📊 Editor Compatibility Matrix
1688
-
1689
- | AI Editor | Protocol | Config File | Server Auto-Start | HTTP Server Required | Status |
1690
- |-----------|----------|-------------|-------------------|----------------------|--------|
1691
- | **Claude Desktop** | MCP | `claude_desktop_config.json` | ✅ Yes | ❌ No | 🟢 Working |
1692
- | **Cursor AI** | MCP | `cline_mcp_settings.json` | ✅ Yes | ❌ No | 🟢 Working |
1693
- | **Windsurf** | MCP | `mcp.json` | ✅ Yes | ❌ No | 🟢 Working |
1694
- | **Cline (VSCode)** | MCP | `cline_mcp_settings.json` | ✅ Yes | ❌ No | 🟢 Working |
1695
- | **Warp Terminal** | MCP | Warp config | ✅ Yes | ❌ No | 🟢 Working |
1696
- | **Zed Editor** | Context Servers (MCP) | `settings.json` | ✅ Yes | ❌ No | 🟢 Working |
1697
- | **Qoder AI** | HTTP | `mcp.json` or config | ❌ No | ✅ **Yes** | 🟢 Working |
1698
- | **Gemini CLI** | HTTP | CLI config | ❌ No | ✅ **Yes** | 🟢 Working |
1699
- | **Qwen Code CLI** | HTTP | CLI config | ❌ No | ✅ **Yes** | 🟢 Working |
1700
- | **Continue.dev** | HTTP | Extension config | ❌ No | ✅ **Yes** | 🟢 Working |
1701
- | **Custom Tools** | HTTP | API integration | ❌ No | ✅ **Yes** | 🟢 Working |
1702
- | **VSCode (Generic)** | LSP/HTTP | Extension config | Varies | Optional | 🟢 Working |
1703
-
1704
- **Legend:**
1705
- - ✅ **Server Auto-Start**: Editor automatically starts the MCP server
1706
- - ❌ **HTTP Server Required**: You must manually start HTTP server before using
1707
- - 🟢 **Working**: Fully tested and operational
1708
-
1709
- ---
1710
-
1711
- ## 📋 Requirements
1712
-
1713
- - **Node.js** >= 18.0.0
1714
- - **Brave Browser** (auto-detected or specify path)
1715
- - **Operating System:** Windows, macOS, Linux
1716
-
1717
- ---
1718
-
1719
- ## 🤝 Contributing
1720
-
1721
- Contributions are welcome! Please submit a Pull Request.
1722
-
1723
- ---
1724
-
1725
1131
  ## 📄 License
1726
1132
 
1727
1133
  MIT License - See LICENSE file for details.
@@ -1742,7 +1148,3 @@ MIT License - See LICENSE file for details.
1742
1148
 
1743
1149
  **Made with ❤️ for the AI Development Community**
1744
1150
 
1745
- [⭐ Star on GitHub](https://github.com/codeiva4u/Brave-Real-Browser-Mcp-Server) | [🐛 Report Bug](https://github.com/codeiva4u/Brave-Real-Browser-Mcp-Server/issues) | [💡 Request Feature](https://github.com/codeiva4u/Brave-Real-Browser-Mcp-Server/issues)
1746
-
1747
- </div>
1748
- | **MCP (STDIO)** | Claude Desktop,