brave-real-browser-mcp-server 2.12.5 → 2.12.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +623 -68
- package/dist/launcher.js +35 -5
- package/dist/transports/sse-transport.js +326 -0
- package/dist/transports/sse-transport.test.js +240 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
**सभी AI IDEs के लिए Universal MCP Server | 111+ Tools | Browser Automation | Web Scraping | CAPTCHA Solving**
|
|
14
14
|
|
|
15
|
+
[📖 **All 5 Protocols Complete Guide**](./ALL-PROTOCOLS.md) 👈 **NEW! Step-by-step setup for all protocols**
|
|
16
|
+
|
|
15
17
|
[Installation](#-installation) | [Quick Start](#-quick-start) | [Tools](#-available-tools-111) | [HTTP/WebSocket](#-httpwebsocket-setup) | [Configuration](#-ide-configurations) | [Troubleshooting](#-troubleshooting)
|
|
16
18
|
|
|
17
19
|
</div>
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
|
|
25
27
|
- ✅ **15+ AI IDEs में काम करता है** (Claude, Cursor, Windsurf, Cline, Zed, VSCode, Qoder AI, etc.)
|
|
26
28
|
- ✅ **111+ Automation Tools** - Browser control, scraping, CAPTCHA solving, video extraction
|
|
27
|
-
- ✅ **
|
|
29
|
+
- ✅ **5 Protocol Modes** - MCP (STDIO), LSP, HTTP/WebSocket, SSE
|
|
28
30
|
- ✅ **Auto-Detection** - Automatically detects your IDE
|
|
29
31
|
- ✅ **Real Brave Browser** - Anti-detection features, bypass Cloudflare
|
|
30
32
|
- ✅ **Universal API** - Works with any programming language (JS, Python, PHP, Go, etc.)
|
|
@@ -37,26 +39,36 @@
|
|
|
37
39
|
|
|
38
40
|
**Choose your setup based on your AI Editor:**
|
|
39
41
|
|
|
40
|
-
| Editor | Setup Time | Method |
|
|
41
|
-
|
|
42
|
-
| **Claude Desktop** | 2 min | Add config → Restart |
|
|
43
|
-
| **Cursor AI** | 2 min | Add config → Restart |
|
|
44
|
-
| **Windsurf** | 2 min | Add config → Restart |
|
|
45
|
-
| **Zed Editor** | 3 min | Add to `context_servers` → Restart |
|
|
46
|
-
| **Qoder AI** | 4 min | Start HTTP server → Add config → Restart |
|
|
47
|
-
| **
|
|
42
|
+
| Editor | Setup Time | Protocol | Method |
|
|
43
|
+
|--------|-----------|----------|--------|
|
|
44
|
+
| **Claude Desktop** | 2 min | MCP | Add config → Restart |
|
|
45
|
+
| **Cursor AI** | 2 min | MCP | Add config → Restart |
|
|
46
|
+
| **Windsurf** | 2 min | MCP | Add config → Restart |
|
|
47
|
+
| **Zed Editor** | 3 min | LSP | Add to `context_servers` → Restart |
|
|
48
|
+
| **Qoder AI** | 4 min | HTTP | Start HTTP server → Add config → Restart |
|
|
49
|
+
| **Custom Apps** | 1 min | HTTP/WebSocket/SSE | Start server → Use API |
|
|
48
50
|
|
|
49
51
|
**Quick Commands:**
|
|
50
52
|
|
|
51
53
|
```bash
|
|
52
|
-
#
|
|
53
|
-
npx
|
|
54
|
+
# Auto-detect environment
|
|
55
|
+
npx brave-real-browser-mcp-server@latest
|
|
56
|
+
|
|
57
|
+
# MCP mode (Claude, Cursor, Windsurf)
|
|
58
|
+
npx brave-real-browser-mcp-server@latest --mode mcp
|
|
59
|
+
|
|
60
|
+
# LSP mode (Zed, VSCode, Neovim)
|
|
61
|
+
npx brave-real-browser-mcp-server@latest --mode lsp
|
|
54
62
|
|
|
55
|
-
#
|
|
63
|
+
# HTTP mode (Universal API + WebSocket)
|
|
56
64
|
npx brave-real-browser-mcp-server@latest --mode http --port 3000
|
|
57
65
|
|
|
66
|
+
# SSE mode (Real-time monitoring)
|
|
67
|
+
npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001
|
|
68
|
+
|
|
58
69
|
# Check if working
|
|
59
70
|
curl http://localhost:3000/health # For HTTP mode
|
|
71
|
+
curl http://localhost:3001/health # For SSE mode
|
|
60
72
|
```
|
|
61
73
|
|
|
62
74
|
---
|
|
@@ -155,7 +167,7 @@ curl http://localhost:3000/tools
|
|
|
155
167
|
|
|
156
168
|
---
|
|
157
169
|
|
|
158
|
-
### WebSocket Protocol -
|
|
170
|
+
### WebSocket Protocol - Complete Setup Guide
|
|
159
171
|
|
|
160
172
|
WebSocket provides **real-time, bidirectional communication** for modern applications.
|
|
161
173
|
|
|
@@ -168,6 +180,382 @@ npx brave-real-browser-mcp-server@latest --mode http --port 3000
|
|
|
168
180
|
# WebSocket will be available at: ws://localhost:3000
|
|
169
181
|
```
|
|
170
182
|
|
|
183
|
+
**Server will start and show:**
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
🟢 [HTTP] Starting HTTP/WebSocket server...
|
|
187
|
+
✅ [HTTP] Server ready at http://localhost:3000
|
|
188
|
+
✅ [WebSocket] Server running on ws://localhost:3000
|
|
189
|
+
💡 [HTTP] Universal mode - works with ALL AI IDEs
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### Step 2: Verify WebSocket Connection
|
|
193
|
+
|
|
194
|
+
Test WebSocket connection using browser console or Node.js:
|
|
195
|
+
|
|
196
|
+
**Using Browser Console:**
|
|
197
|
+
|
|
198
|
+
```javascript
|
|
199
|
+
// Open browser console (F12) and paste:
|
|
200
|
+
const ws = new WebSocket('ws://localhost:3000');
|
|
201
|
+
|
|
202
|
+
ws.onopen = () => {
|
|
203
|
+
console.log('✅ WebSocket connected!');
|
|
204
|
+
|
|
205
|
+
// Test tool execution
|
|
206
|
+
ws.send(JSON.stringify({
|
|
207
|
+
id: 1,
|
|
208
|
+
tool: 'browser_init',
|
|
209
|
+
args: {}
|
|
210
|
+
}));
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
ws.onmessage = (event) => {
|
|
214
|
+
console.log('📥 Response:', JSON.parse(event.data));
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
ws.onerror = (error) => {
|
|
218
|
+
console.error('❌ WebSocket error:', error);
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
ws.onclose = () => {
|
|
222
|
+
console.log('🔴 WebSocket disconnected');
|
|
223
|
+
};
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
**Using Node.js:**
|
|
227
|
+
|
|
228
|
+
```javascript
|
|
229
|
+
// Install ws package: npm install ws
|
|
230
|
+
const WebSocket = require('ws');
|
|
231
|
+
|
|
232
|
+
const ws = new WebSocket('ws://localhost:3000');
|
|
233
|
+
|
|
234
|
+
ws.on('open', () => {
|
|
235
|
+
console.log('✅ WebSocket connected!');
|
|
236
|
+
|
|
237
|
+
// Execute a tool
|
|
238
|
+
ws.send(JSON.stringify({
|
|
239
|
+
id: 1,
|
|
240
|
+
tool: 'browser_init',
|
|
241
|
+
args: {}
|
|
242
|
+
}));
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
ws.on('message', (data) => {
|
|
246
|
+
console.log('📥 Response:', JSON.parse(data));
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
ws.on('error', (error) => {
|
|
250
|
+
console.error('❌ Error:', error);
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
ws.on('close', () => {
|
|
254
|
+
console.log('🔴 Connection closed');
|
|
255
|
+
});
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
#### Step 3: WebSocket Message Format
|
|
259
|
+
|
|
260
|
+
**Request Format:**
|
|
261
|
+
|
|
262
|
+
```json
|
|
263
|
+
{
|
|
264
|
+
"id": 1,
|
|
265
|
+
"tool": "tool_name",
|
|
266
|
+
"args": {
|
|
267
|
+
"param1": "value1",
|
|
268
|
+
"param2": "value2"
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**Response Format:**
|
|
274
|
+
|
|
275
|
+
```json
|
|
276
|
+
{
|
|
277
|
+
"id": 1,
|
|
278
|
+
"success": true,
|
|
279
|
+
"result": {
|
|
280
|
+
"content": [
|
|
281
|
+
{
|
|
282
|
+
"type": "text",
|
|
283
|
+
"text": "Result data"
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Error Response:**
|
|
291
|
+
|
|
292
|
+
```json
|
|
293
|
+
{
|
|
294
|
+
"id": 1,
|
|
295
|
+
"success": false,
|
|
296
|
+
"error": "Error message"
|
|
297
|
+
}
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
#### Step 4: Example - Complete Browser Automation via WebSocket
|
|
301
|
+
|
|
302
|
+
```javascript
|
|
303
|
+
const WebSocket = require('ws');
|
|
304
|
+
const ws = new WebSocket('ws://localhost:3000');
|
|
305
|
+
|
|
306
|
+
let messageId = 0;
|
|
307
|
+
|
|
308
|
+
function sendCommand(tool, args) {
|
|
309
|
+
return new Promise((resolve, reject) => {
|
|
310
|
+
const id = ++messageId;
|
|
311
|
+
|
|
312
|
+
const handler = (data) => {
|
|
313
|
+
const response = JSON.parse(data);
|
|
314
|
+
if (response.id === id) {
|
|
315
|
+
ws.removeListener('message', handler);
|
|
316
|
+
if (response.success) {
|
|
317
|
+
resolve(response.result);
|
|
318
|
+
} else {
|
|
319
|
+
reject(new Error(response.error));
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
ws.on('message', handler);
|
|
325
|
+
|
|
326
|
+
ws.send(JSON.stringify({ id, tool, args }));
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
ws.on('open', async () => {
|
|
331
|
+
try {
|
|
332
|
+
// Step 1: Initialize browser
|
|
333
|
+
console.log('Initializing browser...');
|
|
334
|
+
await sendCommand('browser_init', {});
|
|
335
|
+
|
|
336
|
+
// Step 2: Navigate to URL
|
|
337
|
+
console.log('Navigating to page...');
|
|
338
|
+
await sendCommand('navigate', { url: 'https://example.com' });
|
|
339
|
+
|
|
340
|
+
// Step 3: Get page content
|
|
341
|
+
console.log('Getting content...');
|
|
342
|
+
const content = await sendCommand('get_content', { type: 'text' });
|
|
343
|
+
console.log('Content:', content);
|
|
344
|
+
|
|
345
|
+
// Step 4: Close browser
|
|
346
|
+
console.log('Closing browser...');
|
|
347
|
+
await sendCommand('browser_close', {});
|
|
348
|
+
|
|
349
|
+
console.log('✅ Automation complete!');
|
|
350
|
+
ws.close();
|
|
351
|
+
} catch (error) {
|
|
352
|
+
console.error('❌ Error:', error);
|
|
353
|
+
ws.close();
|
|
354
|
+
}
|
|
355
|
+
});
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
#### Step 5: WebSocket Client Libraries
|
|
359
|
+
|
|
360
|
+
**JavaScript/Node.js:**
|
|
361
|
+
```bash
|
|
362
|
+
npm install ws
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
**Python:**
|
|
366
|
+
```bash
|
|
367
|
+
pip install websockets
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
```python
|
|
371
|
+
import asyncio
|
|
372
|
+
import websockets
|
|
373
|
+
import json
|
|
374
|
+
|
|
375
|
+
async def automation():
|
|
376
|
+
uri = "ws://localhost:3000"
|
|
377
|
+
async with websockets.connect(uri) as websocket:
|
|
378
|
+
# Initialize browser
|
|
379
|
+
await websocket.send(json.dumps({
|
|
380
|
+
"id": 1,
|
|
381
|
+
"tool": "browser_init",
|
|
382
|
+
"args": {}
|
|
383
|
+
}))
|
|
384
|
+
response = await websocket.recv()
|
|
385
|
+
print(f"Response: {response}")
|
|
386
|
+
|
|
387
|
+
# Navigate
|
|
388
|
+
await websocket.send(json.dumps({
|
|
389
|
+
"id": 2,
|
|
390
|
+
"tool": "navigate",
|
|
391
|
+
"args": {"url": "https://example.com"}
|
|
392
|
+
}))
|
|
393
|
+
response = await websocket.recv()
|
|
394
|
+
print(f"Response: {response}")
|
|
395
|
+
|
|
396
|
+
asyncio.run(automation())
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
**Go:**
|
|
400
|
+
```bash
|
|
401
|
+
go get github.com/gorilla/websocket
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
```go
|
|
405
|
+
package main
|
|
406
|
+
|
|
407
|
+
import (
|
|
408
|
+
"encoding/json"
|
|
409
|
+
"fmt"
|
|
410
|
+
"github.com/gorilla/websocket"
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
type Message struct {
|
|
414
|
+
ID int `json:"id"`
|
|
415
|
+
Tool string `json:"tool"`
|
|
416
|
+
Args map[string]interface{} `json:"args"`
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
func main() {
|
|
420
|
+
ws, _, err := websocket.DefaultDialer.Dial("ws://localhost:3000", nil)
|
|
421
|
+
if err != nil {
|
|
422
|
+
panic(err)
|
|
423
|
+
}
|
|
424
|
+
defer ws.Close()
|
|
425
|
+
|
|
426
|
+
// Initialize browser
|
|
427
|
+
msg := Message{
|
|
428
|
+
ID: 1,
|
|
429
|
+
Tool: "browser_init",
|
|
430
|
+
Args: make(map[string]interface{}),
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
ws.WriteJSON(msg)
|
|
434
|
+
|
|
435
|
+
var response map[string]interface{}
|
|
436
|
+
ws.ReadJSON(&response)
|
|
437
|
+
fmt.Printf("Response: %+v\n", response)
|
|
438
|
+
}
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**PHP:**
|
|
442
|
+
```bash
|
|
443
|
+
composer require textalk/websocket
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
```php
|
|
447
|
+
<?php
|
|
448
|
+
require 'vendor/autoload.php';
|
|
449
|
+
|
|
450
|
+
use WebSocket\Client;
|
|
451
|
+
|
|
452
|
+
$client = new Client("ws://localhost:3000");
|
|
453
|
+
|
|
454
|
+
// Initialize browser
|
|
455
|
+
$client->send(json_encode([
|
|
456
|
+
'id' => 1,
|
|
457
|
+
'tool' => 'browser_init',
|
|
458
|
+
'args' => new stdClass()
|
|
459
|
+
]));
|
|
460
|
+
|
|
461
|
+
$response = json_decode($client->receive());
|
|
462
|
+
echo "Response: " . print_r($response, true);
|
|
463
|
+
|
|
464
|
+
$client->close();
|
|
465
|
+
?>
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
#### Step 6: WebSocket Advanced Features
|
|
469
|
+
|
|
470
|
+
**Connection Options:**
|
|
471
|
+
|
|
472
|
+
```javascript
|
|
473
|
+
const ws = new WebSocket('ws://localhost:3000', {
|
|
474
|
+
headers: {
|
|
475
|
+
'Authorization': 'Bearer your-token',
|
|
476
|
+
'X-Custom-Header': 'value'
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
**Reconnection Logic:**
|
|
482
|
+
|
|
483
|
+
```javascript
|
|
484
|
+
function connectWebSocket() {
|
|
485
|
+
const ws = new WebSocket('ws://localhost:3000');
|
|
486
|
+
|
|
487
|
+
ws.on('close', () => {
|
|
488
|
+
console.log('Connection closed, reconnecting in 5s...');
|
|
489
|
+
setTimeout(connectWebSocket, 5000);
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
ws.on('error', (error) => {
|
|
493
|
+
console.error('WebSocket error:', error);
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
return ws;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const ws = connectWebSocket();
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
**Heartbeat/Ping-Pong:**
|
|
503
|
+
|
|
504
|
+
```javascript
|
|
505
|
+
const ws = new WebSocket('ws://localhost:3000');
|
|
506
|
+
|
|
507
|
+
setInterval(() => {
|
|
508
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
509
|
+
ws.ping();
|
|
510
|
+
}
|
|
511
|
+
}, 30000); // Ping every 30 seconds
|
|
512
|
+
|
|
513
|
+
ws.on('pong', () => {
|
|
514
|
+
console.log('Pong received - connection alive');
|
|
515
|
+
});
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
#### Troubleshooting WebSocket
|
|
519
|
+
|
|
520
|
+
**Issue: Connection Refused**
|
|
521
|
+
|
|
522
|
+
```bash
|
|
523
|
+
# Check if HTTP server is running
|
|
524
|
+
curl http://localhost:3000/health
|
|
525
|
+
|
|
526
|
+
# If not running, start it:
|
|
527
|
+
npx brave-real-browser-mcp-server@latest --mode http --port 3000
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
**Issue: WebSocket Disabled**
|
|
531
|
+
|
|
532
|
+
```bash
|
|
533
|
+
# Start server with WebSocket explicitly enabled
|
|
534
|
+
npx brave-real-browser-mcp-server@latest --mode http --port 3000
|
|
535
|
+
|
|
536
|
+
# Note: WebSocket is enabled by default
|
|
537
|
+
# To disable: use --no-websocket flag
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
**Issue: Connection Timeout**
|
|
541
|
+
|
|
542
|
+
```javascript
|
|
543
|
+
// Increase connection timeout
|
|
544
|
+
const ws = new WebSocket('ws://localhost:3000', {
|
|
545
|
+
handshakeTimeout: 10000 // 10 seconds
|
|
546
|
+
});
|
|
547
|
+
```
|
|
548
|
+
|
|
549
|
+
**Issue: Firewall Blocking**
|
|
550
|
+
|
|
551
|
+
```bash
|
|
552
|
+
# Windows - Allow Node.js through firewall
|
|
553
|
+
netsh advfirewall firewall add rule name="Node.js WebSocket" dir=in action=allow program="C:\Program Files\nodejs\node.exe" enable=yes
|
|
554
|
+
|
|
555
|
+
# Linux - Allow port 3000
|
|
556
|
+
sudo ufw allow 3000
|
|
557
|
+
```
|
|
558
|
+
|
|
171
559
|
## 🎨 IDE Configurations
|
|
172
560
|
|
|
173
561
|
### Claude Desktop
|
|
@@ -527,108 +915,274 @@ rm -rf ~/Library/Application\ Support/Cursor/Cache
|
|
|
527
915
|
|
|
528
916
|
### Qoder AI Editor
|
|
529
917
|
|
|
530
|
-
**Protocol:**
|
|
531
|
-
|
|
532
|
-
**⚠️ Important:** Qoder AI requires HTTP server to be running separately before configuration!
|
|
918
|
+
**Protocol:** MCP (STDIO) | **Setup Time:** 3 minutes | **Auto-Start:** ✅ Yes
|
|
533
919
|
|
|
534
|
-
|
|
920
|
+
**✅ Good News:** Qoder AI supports standard STDIO-based MCP servers (just like Claude, Cursor, Windsurf)!
|
|
535
921
|
|
|
536
|
-
|
|
922
|
+
#### 📋 Step-by-Step Setup Guide:
|
|
537
923
|
|
|
538
|
-
|
|
924
|
+
**Step 1: Open Qoder Settings**
|
|
539
925
|
|
|
540
926
|
```bash
|
|
541
|
-
#
|
|
542
|
-
|
|
927
|
+
# Method 1: Using keyboard shortcut
|
|
928
|
+
# Windows: Ctrl + Shift + ,
|
|
929
|
+
# Mac: ⌘ + Shift + ,
|
|
543
930
|
|
|
544
|
-
#
|
|
545
|
-
|
|
931
|
+
# Method 2: Click user icon in upper-right corner
|
|
932
|
+
# Then select "Qoder Settings"
|
|
546
933
|
```
|
|
547
934
|
|
|
548
|
-
**
|
|
549
|
-
```
|
|
550
|
-
🟢 [HTTP] Starting HTTP/WebSocket server...
|
|
551
|
-
✅ [HTTP] Server ready at http://localhost:3000
|
|
552
|
-
💡 [HTTP] Universal mode - works with ALL AI IDEs
|
|
553
|
-
```
|
|
935
|
+
**Step 2: Navigate to MCP Section**
|
|
554
936
|
|
|
555
|
-
|
|
937
|
+
1. In left-side navigation pane, click **MCP**
|
|
938
|
+
2. Click on **My Servers** tab
|
|
939
|
+
3. Click **+ Add** button in upper-right corner
|
|
556
940
|
|
|
557
|
-
|
|
941
|
+
**Step 3: Install Package Globally (Important for Qoder AI)**
|
|
558
942
|
|
|
559
943
|
```bash
|
|
560
|
-
#
|
|
561
|
-
|
|
944
|
+
# Install globally for faster startup
|
|
945
|
+
npm install -g brave-real-browser-mcp-server@latest
|
|
562
946
|
|
|
563
|
-
#
|
|
564
|
-
#
|
|
947
|
+
# Verify installation
|
|
948
|
+
where brave-real-browser-mcp-server # Windows
|
|
949
|
+
which brave-real-browser-mcp-server # Mac/Linux
|
|
950
|
+
```
|
|
565
951
|
|
|
566
|
-
|
|
567
|
-
|
|
952
|
+
**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.
|
|
953
|
+
|
|
954
|
+
**Step 4: Add Configuration**
|
|
955
|
+
|
|
956
|
+
A JSON file will appear. Add this configuration:
|
|
957
|
+
|
|
958
|
+
**Option A - Using Global Install (Recommended):**
|
|
959
|
+
```json
|
|
960
|
+
{
|
|
961
|
+
"mcpServers": {
|
|
962
|
+
"brave-real-browser": {
|
|
963
|
+
"command": "brave-real-browser-mcp-server",
|
|
964
|
+
"args": []
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
568
968
|
```
|
|
569
969
|
|
|
570
|
-
**
|
|
970
|
+
**Option B - Using NPX (May timeout on first run):**
|
|
971
|
+
```json
|
|
972
|
+
{
|
|
973
|
+
"mcpServers": {
|
|
974
|
+
"brave-real-browser": {
|
|
975
|
+
"command": "npx",
|
|
976
|
+
"args": ["-y", "brave-real-browser-mcp-server@latest"]
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
```
|
|
571
981
|
|
|
572
|
-
|
|
982
|
+
**Option C - Using Node directly:**
|
|
983
|
+
```json
|
|
984
|
+
{
|
|
985
|
+
"mcpServers": {
|
|
986
|
+
"brave-real-browser": {
|
|
987
|
+
"command": "node",
|
|
988
|
+
"args": [
|
|
989
|
+
"C:\\Users\\Admin\\AppData\\Roaming\\npm\\node_modules\\brave-real-browser-mcp-server\\dist\\index.js"
|
|
990
|
+
]
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
```
|
|
995
|
+
|
|
996
|
+
**Note:** Replace path in Option C with your actual global npm modules path:
|
|
997
|
+
- Windows: `%APPDATA%\npm\node_modules\brave-real-browser-mcp-server\dist\index.js`
|
|
998
|
+
- Mac/Linux: `/usr/local/lib/node_modules/brave-real-browser-mcp-server/dist/index.js`
|
|
999
|
+
|
|
1000
|
+
**Advanced Configuration (with environment variables):**
|
|
573
1001
|
|
|
574
|
-
**Option A - MCP Configuration (Recommended):**
|
|
575
1002
|
```json
|
|
576
1003
|
{
|
|
577
1004
|
"mcpServers": {
|
|
578
1005
|
"brave-real-browser": {
|
|
579
|
-
"
|
|
580
|
-
"
|
|
581
|
-
"
|
|
582
|
-
|
|
1006
|
+
"command": "npx",
|
|
1007
|
+
"args": ["-y", "brave-real-browser-mcp-server@latest"],
|
|
1008
|
+
"env": {
|
|
1009
|
+
"BRAVE_PATH": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe",
|
|
1010
|
+
"HEADLESS": "false"
|
|
1011
|
+
}
|
|
583
1012
|
}
|
|
584
1013
|
}
|
|
585
1014
|
}
|
|
586
1015
|
```
|
|
587
1016
|
|
|
588
|
-
**
|
|
1017
|
+
**For Mac:**
|
|
1018
|
+
|
|
589
1019
|
```json
|
|
590
1020
|
{
|
|
591
|
-
"
|
|
1021
|
+
"mcpServers": {
|
|
592
1022
|
"brave-real-browser": {
|
|
593
|
-
"
|
|
594
|
-
"
|
|
595
|
-
"
|
|
596
|
-
|
|
1023
|
+
"command": "npx",
|
|
1024
|
+
"args": ["-y", "brave-real-browser-mcp-server@latest"],
|
|
1025
|
+
"env": {
|
|
1026
|
+
"BRAVE_PATH": "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
|
|
1027
|
+
}
|
|
597
1028
|
}
|
|
598
1029
|
}
|
|
599
1030
|
}
|
|
600
1031
|
```
|
|
601
1032
|
|
|
602
|
-
**Step
|
|
1033
|
+
**Step 5: Save Configuration**
|
|
603
1034
|
|
|
604
|
-
Close
|
|
1035
|
+
1. Close the JSON file
|
|
1036
|
+
2. Click **Save** when prompted
|
|
1037
|
+
3. The new server will appear in your list
|
|
1038
|
+
4. A **link icon** (🔗) means the connection is successful
|
|
605
1039
|
|
|
606
|
-
**Step
|
|
1040
|
+
**Step 6: Verify Installation**
|
|
607
1041
|
|
|
608
|
-
|
|
1042
|
+
1. Expand the **brave-real-browser** entry
|
|
1043
|
+
2. You should see list of 111 available tools
|
|
1044
|
+
3. If server fails to start, click **Quick Fix** button
|
|
1045
|
+
4. If issue persists, check troubleshooting section below
|
|
1046
|
+
|
|
1047
|
+
**Step 7: Using Tools in Qoder AI**
|
|
1048
|
+
|
|
1049
|
+
1. Switch to **Agent mode** in AI Chat panel
|
|
1050
|
+
2. Ask Qoder to use browser automation:
|
|
1051
|
+
```
|
|
1052
|
+
Use brave-real-browser to navigate to https://example.com and extract the main content
|
|
1053
|
+
```
|
|
1054
|
+
3. Qoder will prompt for confirmation before using MCP tools
|
|
1055
|
+
4. Press `Ctrl+Enter` (Windows) or `⌘+Enter` (Mac) to execute
|
|
609
1056
|
|
|
610
1057
|
**Important Notes:**
|
|
611
|
-
- 🔴 **Server must be running BEFORE starting Qoder AI**
|
|
612
|
-
- ✅ Keep the HTTP server terminal window open while using Qoder AI
|
|
613
|
-
- ✅ If server stops, restart it before using browser automation
|
|
614
|
-
- 💡 You can run server in background with `pm2` or as a service
|
|
615
1058
|
|
|
616
|
-
**
|
|
1059
|
+
- ⚠️ **Maximum 10 MCP servers** can be used simultaneously
|
|
1060
|
+
- ✅ **Only works in Agent mode** (not in Ask mode)
|
|
1061
|
+
- ✅ **Server auto-starts** when Qoder launches
|
|
1062
|
+
- ✅ **Node.js V18+ required** (includes NPM V8+)
|
|
1063
|
+
|
|
1064
|
+
**Prerequisites Check:**
|
|
1065
|
+
|
|
1066
|
+
```bash
|
|
1067
|
+
# Verify Node.js installation
|
|
1068
|
+
node -v # Should show v18.0.0 or higher
|
|
1069
|
+
npx -v # Should show version number
|
|
1070
|
+
|
|
1071
|
+
# If not installed:
|
|
1072
|
+
# Windows: Download from https://nodejs.org/
|
|
1073
|
+
# Mac: brew install node
|
|
1074
|
+
# Linux: Use package manager (apt, yum, etc.)
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1077
|
+
**Troubleshooting:**
|
|
1078
|
+
|
|
1079
|
+
**Issue: "context deadline exceeded" or Timeout Error**
|
|
1080
|
+
|
|
1081
|
+
```
|
|
1082
|
+
failed to initialize MCP client: context deadline exceeded
|
|
1083
|
+
```
|
|
1084
|
+
|
|
1085
|
+
**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.
|
|
1086
|
+
|
|
1087
|
+
**Solution 1 - Install Globally (Recommended):**
|
|
1088
|
+
```bash
|
|
1089
|
+
# Install package globally for instant startup
|
|
1090
|
+
npm install -g brave-real-browser-mcp-server@latest
|
|
1091
|
+
```
|
|
1092
|
+
|
|
1093
|
+
Then update your configuration to:
|
|
1094
|
+
```json
|
|
1095
|
+
{
|
|
1096
|
+
"mcpServers": {
|
|
1097
|
+
"brave-real-browser": {
|
|
1098
|
+
"command": "brave-real-browser-mcp-server",
|
|
1099
|
+
"args": []
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
```
|
|
1104
|
+
|
|
1105
|
+
**Solution 2 - Pre-cache npx package:**
|
|
1106
|
+
```bash
|
|
1107
|
+
# Run once to cache the package
|
|
1108
|
+
npx -y brave-real-browser-mcp-server@latest
|
|
1109
|
+
# Press Ctrl+C after server starts
|
|
617
1110
|
|
|
1111
|
+
# Now npx will be fast on subsequent runs
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
**Solution 3 - Use Direct Node Path:**
|
|
1115
|
+
|
|
1116
|
+
First, find the global package location:
|
|
618
1117
|
```bash
|
|
619
|
-
#
|
|
620
|
-
npm
|
|
1118
|
+
# Windows
|
|
1119
|
+
npm root -g
|
|
1120
|
+
# Usually: C:\Users\<USERNAME>\AppData\Roaming\npm\node_modules
|
|
621
1121
|
|
|
622
|
-
#
|
|
623
|
-
|
|
1122
|
+
# Mac/Linux
|
|
1123
|
+
npm root -g
|
|
1124
|
+
# Usually: /usr/local/lib/node_modules
|
|
1125
|
+
```
|
|
624
1126
|
|
|
625
|
-
|
|
626
|
-
|
|
1127
|
+
Then use full path:
|
|
1128
|
+
```json
|
|
1129
|
+
{
|
|
1130
|
+
"mcpServers": {
|
|
1131
|
+
"brave-real-browser": {
|
|
1132
|
+
"command": "node",
|
|
1133
|
+
"args": ["<npm-root>\\brave-real-browser-mcp-server\\dist\\index.js"]
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
```
|
|
627
1138
|
|
|
628
|
-
|
|
629
|
-
|
|
1139
|
+
**Issue: "exec: npx: executable file not found"**
|
|
1140
|
+
|
|
1141
|
+
```bash
|
|
1142
|
+
# Solution: Install Node.js V18 or later
|
|
1143
|
+
# Windows
|
|
1144
|
+
nvm install 22.14.0
|
|
1145
|
+
nvm use 22.14.0
|
|
1146
|
+
|
|
1147
|
+
# Mac
|
|
1148
|
+
brew install node
|
|
1149
|
+
|
|
1150
|
+
# Verify
|
|
1151
|
+
node -v
|
|
1152
|
+
npx -v
|
|
630
1153
|
```
|
|
631
1154
|
|
|
1155
|
+
**Issue: "failed to initialize MCP client: context deadline exceeded"**
|
|
1156
|
+
|
|
1157
|
+
1. Click **Copy complete command** in Qoder UI
|
|
1158
|
+
2. Run command in terminal to see detailed error
|
|
1159
|
+
3. Check if Node.js is blocked by security software
|
|
1160
|
+
4. Add Node.js to security software whitelist
|
|
1161
|
+
|
|
1162
|
+
**Issue: Server fails to connect**
|
|
1163
|
+
|
|
1164
|
+
1. Click **Retry** icon in Qoder interface
|
|
1165
|
+
2. Qoder will attempt to restart MCP server automatically
|
|
1166
|
+
3. Check **My Servers** tab for connection status
|
|
1167
|
+
4. Expand server details to see tools list
|
|
1168
|
+
|
|
1169
|
+
**Issue: Tools not being called by LLM**
|
|
1170
|
+
|
|
1171
|
+
1. Make sure you're in **Agent mode** (not Ask mode)
|
|
1172
|
+
2. Open a project directory in Qoder
|
|
1173
|
+
3. Ensure MCP server shows **link icon** (connected)
|
|
1174
|
+
4. Try explicit prompt: "Use brave-real-browser to..."
|
|
1175
|
+
|
|
1176
|
+
**Configuration Locations:**
|
|
1177
|
+
|
|
1178
|
+
- Windows: Qoder Settings → MCP → My Servers
|
|
1179
|
+
- Mac: Qoder Settings → MCP → My Servers
|
|
1180
|
+
- Linux: Qoder Settings → MCP → My Servers
|
|
1181
|
+
|
|
1182
|
+
**Official Documentation:**
|
|
1183
|
+
- Qoder MCP Guide: https://docs.qoder.com/user-guide/chat/model-context-protocol
|
|
1184
|
+
- MCP Common Issues: https://docs.qoder.com/support/mcp-common-issues
|
|
1185
|
+
|
|
632
1186
|
### Other HTTP-based IDEs (Gemini CLI, Qwen Code CLI, Custom Tools)
|
|
633
1187
|
|
|
634
1188
|
**Step 1:** Start HTTP server as shown above
|
|
@@ -1402,6 +1956,7 @@ DEBUG=* npx brave-real-browser-mcp-server@latest --mode http
|
|
|
1402
1956
|
|| **LSP** | Zed Editor, VSCode, Neovim | ✅ | 🟢 Working |
|
|
1403
1957
|
|| **HTTP/REST** | Any IDE/Tool | ✅ | 🟢 Working |
|
|
1404
1958
|
|| **WebSocket** | Modern Web Apps, Real-time Tools | ✅ | 🟢 Working |
|
|
1959
|
+
|| **SSE** | Real-time Streaming, Web Apps | ✅ | 🟢 Working |
|
|
1405
1960
|
|
|
1406
1961
|
---
|
|
1407
1962
|
|
|
@@ -1459,7 +2014,7 @@ MIT License - See LICENSE file for details.
|
|
|
1459
2014
|
|
|
1460
2015
|
<div align="center">
|
|
1461
2016
|
|
|
1462
|
-
**🌟 111 Tools | 15+ AI IDEs |
|
|
2017
|
+
**🌟 111 Tools | 15+ AI IDEs | 5 Protocols | Universal Support 🌟**
|
|
1463
2018
|
|
|
1464
2019
|
**Made with ❤️ for the AI Development Community**
|
|
1465
2020
|
|