brave-real-browser-mcp-server 2.12.6 → 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 +411 -1285
- package/dist/index.js +9 -5
- package/dist/transports/http-transport.js +8 -32
- package/dist/transports/sse-transport.js +8 -32
- package/dist/transports/sse-transport.test.js +9 -5
- package/package.json +15 -7
- package/scripts/patch-puppeteer-screen-recorder.cjs +60 -0
- package/scripts/update-to-latest.cjs +120 -0
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](#-
|
|
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
|
-
|
|
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
|
|
107
|
+
### For Qoder AI
|
|
108
108
|
|
|
109
|
-
|
|
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 -
|
|
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
|
|
169
|
+
#### Step 3: Available HTTP Endpoints
|
|
170
|
+
|
|
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 |
|
|
151
177
|
|
|
152
|
-
|
|
178
|
+
#### Step 4: MCP Configuration for HTTP
|
|
153
179
|
|
|
180
|
+
If your IDE supports HTTP-based MCP servers, use this configuration:
|
|
181
|
+
|
|
182
|
+
**Config format:**
|
|
154
183
|
```json
|
|
155
184
|
{
|
|
156
|
-
"
|
|
157
|
-
"brave-real-browser": {
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
185
|
+
"mcpServers": {
|
|
186
|
+
"brave-real-browser-http": {
|
|
187
|
+
"url": "http://localhost:3000",
|
|
188
|
+
"transport": "http",
|
|
189
|
+
"name": "Brave Browser (HTTP)",
|
|
190
|
+
"enabled": true
|
|
161
191
|
}
|
|
162
192
|
}
|
|
163
193
|
}
|
|
164
194
|
```
|
|
165
195
|
|
|
166
|
-
**
|
|
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
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
```
|
|
211
|
+
|
|
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
|
|
235
|
+
### 2️⃣ WebSocket Protocol - Complete Configuration
|
|
171
236
|
|
|
172
237
|
WebSocket provides **real-time, bidirectional communication** for modern applications.
|
|
173
238
|
|
|
@@ -189,81 +254,13 @@ 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 2:
|
|
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
|
|
257
|
+
#### Step 2: WebSocket Message Format
|
|
259
258
|
|
|
260
259
|
**Request Format:**
|
|
261
|
-
|
|
262
260
|
```json
|
|
263
261
|
{
|
|
264
|
-
"id": 1,
|
|
265
262
|
"tool": "tool_name",
|
|
266
|
-
"
|
|
263
|
+
"params": {
|
|
267
264
|
"param1": "value1",
|
|
268
265
|
"param2": "value2"
|
|
269
266
|
}
|
|
@@ -271,330 +268,409 @@ ws.on('close', () => {
|
|
|
271
268
|
```
|
|
272
269
|
|
|
273
270
|
**Response Format:**
|
|
274
|
-
|
|
275
271
|
```json
|
|
276
272
|
{
|
|
277
|
-
"id": 1,
|
|
278
273
|
"success": true,
|
|
279
|
-
"
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
]
|
|
286
|
-
}
|
|
274
|
+
"tool": "browser_init",
|
|
275
|
+
"data": {
|
|
276
|
+
"result": "Browser initialized successfully"
|
|
277
|
+
},
|
|
278
|
+
"timestamp": "2025-01-25T04:20:00.000Z"
|
|
287
279
|
}
|
|
288
280
|
```
|
|
289
281
|
|
|
290
|
-
|
|
282
|
+
#### Step 3: MCP Configuration for WebSocket
|
|
291
283
|
|
|
284
|
+
If your IDE supports WebSocket-based MCP servers:
|
|
285
|
+
|
|
286
|
+
**Config format:**
|
|
292
287
|
```json
|
|
293
288
|
{
|
|
294
|
-
"
|
|
295
|
-
|
|
296
|
-
|
|
289
|
+
"mcpServers": {
|
|
290
|
+
"brave-real-browser-ws": {
|
|
291
|
+
"url": "ws://localhost:3000",
|
|
292
|
+
"transport": "websocket",
|
|
293
|
+
"name": "Brave Browser (WebSocket)",
|
|
294
|
+
"enabled": true
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
297
|
}
|
|
298
298
|
```
|
|
299
299
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
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();
|
|
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
|
+
}
|
|
354
314
|
}
|
|
355
|
-
}
|
|
315
|
+
}
|
|
356
316
|
```
|
|
357
317
|
|
|
358
|
-
#### Step
|
|
318
|
+
#### Step 4: WebSocket Features
|
|
359
319
|
|
|
360
|
-
**
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
320
|
+
**WebSocket URL:** `ws://localhost:3000`
|
|
321
|
+
|
|
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
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
### 3️⃣ SSE Protocol - Complete Configuration
|
|
332
|
+
|
|
333
|
+
Server-Sent Events (SSE) provides **real-time, one-way streaming** from server to client.
|
|
334
|
+
|
|
335
|
+
#### Step 1: Start SSE Server
|
|
364
336
|
|
|
365
|
-
**Python:**
|
|
366
337
|
```bash
|
|
367
|
-
|
|
338
|
+
# Default (port 3001)
|
|
339
|
+
npx brave-real-browser-mcp-server@latest --mode sse
|
|
340
|
+
|
|
341
|
+
# Custom port
|
|
342
|
+
npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001
|
|
343
|
+
|
|
344
|
+
# Custom host
|
|
345
|
+
npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001 --host 0.0.0.0
|
|
346
|
+
|
|
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
|
|
368
350
|
```
|
|
369
351
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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())
|
|
352
|
+
**Server will start and show:**
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
🟢 [SSE] Starting SSE server...
|
|
356
|
+
✅ [SSE] Server ready at http://localhost:3001
|
|
357
|
+
💡 [SSE] Real-time monitoring enabled
|
|
397
358
|
```
|
|
398
359
|
|
|
399
|
-
|
|
360
|
+
#### Step 2: Test SSE Server
|
|
361
|
+
|
|
400
362
|
```bash
|
|
401
|
-
|
|
363
|
+
# Health check
|
|
364
|
+
curl http://localhost:3001/health
|
|
365
|
+
|
|
366
|
+
# List available event types
|
|
367
|
+
curl http://localhost:3001/events/types
|
|
402
368
|
```
|
|
403
369
|
|
|
404
|
-
|
|
405
|
-
package main
|
|
370
|
+
#### Step 3: Available SSE Event Types
|
|
406
371
|
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
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"}` |
|
|
412
384
|
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
Args map[string]interface{} `json:"args"`
|
|
417
|
-
}
|
|
385
|
+
#### Step 4: MCP Configuration for SSE
|
|
386
|
+
|
|
387
|
+
If your IDE supports SSE-based MCP servers:
|
|
418
388
|
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
389
|
+
**Config format:**
|
|
390
|
+
```json
|
|
391
|
+
{
|
|
392
|
+
"mcpServers": {
|
|
393
|
+
"brave-real-browser-sse": {
|
|
394
|
+
"url": "http://localhost:3001/sse",
|
|
395
|
+
"transport": "sse",
|
|
396
|
+
"name": "Brave Browser (SSE)",
|
|
397
|
+
"enabled": true
|
|
423
398
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
**With event filters:**
|
|
404
|
+
```json
|
|
405
|
+
{
|
|
406
|
+
"mcpServers": {
|
|
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
|
|
431
412
|
}
|
|
432
|
-
|
|
433
|
-
ws.WriteJSON(msg)
|
|
434
|
-
|
|
435
|
-
var response map[string]interface{}
|
|
436
|
-
ws.ReadJSON(&response)
|
|
437
|
-
fmt.Printf("Response: %+v\n", response)
|
|
413
|
+
}
|
|
438
414
|
}
|
|
439
415
|
```
|
|
440
416
|
|
|
441
|
-
|
|
417
|
+
#### Step 5: SSE Advanced Features
|
|
418
|
+
|
|
419
|
+
**Custom Event Filters:**
|
|
442
420
|
```bash
|
|
443
|
-
|
|
421
|
+
# Connect with filter query parameter
|
|
422
|
+
curl http://localhost:3001/events?filter=tool_success,navigation_complete
|
|
444
423
|
```
|
|
445
424
|
|
|
446
|
-
|
|
447
|
-
<?php
|
|
448
|
-
require 'vendor/autoload.php';
|
|
425
|
+
---
|
|
449
426
|
|
|
450
|
-
|
|
427
|
+
## 🤖 Qoder AI - Complete Integration Guide
|
|
451
428
|
|
|
452
|
-
|
|
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
|
|
453
432
|
|
|
454
|
-
|
|
455
|
-
$client->send(json_encode([
|
|
456
|
-
'id' => 1,
|
|
457
|
-
'tool' => 'browser_init',
|
|
458
|
-
'args' => new stdClass()
|
|
459
|
-
]));
|
|
433
|
+
[Official Documentation](https://docs.qoder.com/user-guide/chat/model-context-protocol)
|
|
460
434
|
|
|
461
|
-
|
|
462
|
-
echo "Response: " . print_r($response, true);
|
|
435
|
+
---
|
|
463
436
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
437
|
+
### 🟢 Method 1: STDIO Transport (Recommended for Local)
|
|
438
|
+
|
|
439
|
+
**STDIO** uses stdin/stdout streams for communication. Perfect for local MCP servers.
|
|
467
440
|
|
|
468
|
-
#### Step
|
|
441
|
+
#### Step 1: Find Qoder AI MCP Config File
|
|
469
442
|
|
|
470
|
-
**
|
|
443
|
+
**Config file locations:**
|
|
471
444
|
|
|
472
|
-
```
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
445
|
+
```bash
|
|
446
|
+
# Windows
|
|
447
|
+
%APPDATA%\Qoder\mcp_settings.json
|
|
448
|
+
|
|
449
|
+
# Mac
|
|
450
|
+
~/Library/Application Support/Qoder/mcp_settings.json
|
|
451
|
+
|
|
452
|
+
# Linux
|
|
453
|
+
~/.config/Qoder/mcp_settings.json
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
#### Step 2: Add STDIO Configuration
|
|
457
|
+
|
|
458
|
+
**Windows Configuration:**
|
|
459
|
+
```json
|
|
460
|
+
{
|
|
461
|
+
"mcpServers": {
|
|
462
|
+
"brave-real-browser": {
|
|
463
|
+
"command": "npx",
|
|
464
|
+
"args": ["-y", "brave-real-browser-mcp-server@latest"],
|
|
465
|
+
"env": {
|
|
466
|
+
"BRAVE_PATH": "C:\\Program Files\\BraveSoftware\\Brave-Browser\\Application\\brave.exe"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
477
469
|
}
|
|
478
|
-
}
|
|
470
|
+
}
|
|
479
471
|
```
|
|
480
472
|
|
|
481
|
-
**
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
console.error('WebSocket error:', error);
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
return ws;
|
|
473
|
+
**Mac Configuration:**
|
|
474
|
+
```json
|
|
475
|
+
{
|
|
476
|
+
"mcpServers": {
|
|
477
|
+
"brave-real-browser": {
|
|
478
|
+
"command": "npx",
|
|
479
|
+
"args": ["-y", "brave-real-browser-mcp-server@latest"],
|
|
480
|
+
"env": {
|
|
481
|
+
"BRAVE_PATH": "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
497
485
|
}
|
|
486
|
+
```
|
|
498
487
|
|
|
499
|
-
|
|
488
|
+
**Linux Configuration:**
|
|
489
|
+
```json
|
|
490
|
+
{
|
|
491
|
+
"mcpServers": {
|
|
492
|
+
"brave-real-browser": {
|
|
493
|
+
"command": "npx",
|
|
494
|
+
"args": ["-y", "brave-real-browser-mcp-server@latest"],
|
|
495
|
+
"env": {
|
|
496
|
+
"BRAVE_PATH": "/usr/bin/brave-browser"
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
500
501
|
```
|
|
501
502
|
|
|
502
|
-
|
|
503
|
+
#### Step 3: Restart Qoder AI
|
|
503
504
|
|
|
504
|
-
|
|
505
|
-
const ws = new WebSocket('ws://localhost:3000');
|
|
505
|
+
Close and reopen Qoder AI completely.
|
|
506
506
|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
}
|
|
511
|
-
}, 30000); // Ping every 30 seconds
|
|
507
|
+
#### Step 4: Verify Integration
|
|
508
|
+
|
|
509
|
+
In Qoder AI, test:
|
|
512
510
|
|
|
513
|
-
ws.on('pong', () => {
|
|
514
|
-
console.log('Pong received - connection alive');
|
|
515
|
-
});
|
|
516
511
|
```
|
|
512
|
+
"List all available MCP tools"
|
|
513
|
+
→ Expected: 111 tools from Brave Real Browser
|
|
517
514
|
|
|
518
|
-
|
|
515
|
+
"Use browser_init to start the browser"
|
|
516
|
+
→ Expected: Browser opens
|
|
519
517
|
|
|
520
|
-
|
|
518
|
+
"Navigate to https://example.com and get content"
|
|
519
|
+
→ Expected: Page content extracted
|
|
520
|
+
```
|
|
521
521
|
|
|
522
|
-
|
|
523
|
-
# Check if HTTP server is running
|
|
524
|
-
curl http://localhost:3000/health
|
|
522
|
+
---
|
|
525
523
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
524
|
+
### 🔵 Method 2: SSE Transport (For Remote MCP Servers)
|
|
525
|
+
|
|
526
|
+
**SSE** uses HTTP POST for requests and event streams for responses. Perfect for remote hosted servers.
|
|
529
527
|
|
|
530
|
-
|
|
528
|
+
#### Step 1: Start SSE Server
|
|
531
529
|
|
|
532
530
|
```bash
|
|
533
|
-
#
|
|
534
|
-
|
|
531
|
+
# Windows
|
|
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
|
|
534
|
+
|
|
535
|
+
# Mac
|
|
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
|
|
538
|
+
|
|
539
|
+
# Linux
|
|
540
|
+
export BRAVE_PATH="/usr/bin/brave-browser"
|
|
541
|
+
npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3001
|
|
542
|
+
```
|
|
535
543
|
|
|
536
|
-
|
|
537
|
-
|
|
544
|
+
**Server will start:**
|
|
545
|
+
```
|
|
546
|
+
🟢 [SSE] Starting SSE server...
|
|
547
|
+
✅ [SSE] Server ready at http://localhost:3001
|
|
548
|
+
💡 [SSE] Real-time monitoring enabled
|
|
538
549
|
```
|
|
539
550
|
|
|
540
|
-
|
|
551
|
+
#### Step 2: Configure Qoder AI for SSE
|
|
541
552
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
553
|
+
**In Qoder AI Settings → MCP Servers:**
|
|
554
|
+
|
|
555
|
+
```json
|
|
556
|
+
{
|
|
557
|
+
"brave-real-browser": {
|
|
558
|
+
"url": "http://localhost:3001/sse",
|
|
559
|
+
"transport": "sse",
|
|
560
|
+
"name": "Brave Real Browser (SSE)",
|
|
561
|
+
"enabled": true
|
|
562
|
+
}
|
|
563
|
+
}
|
|
547
564
|
```
|
|
548
565
|
|
|
549
|
-
|
|
566
|
+
#### Step 3: Restart Qoder AI
|
|
550
567
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
568
|
+
Close and reopen Qoder AI.
|
|
569
|
+
|
|
570
|
+
---
|
|
571
|
+
|
|
572
|
+
### 🛠️ Using Brave Browser in Qoder AI
|
|
573
|
+
|
|
574
|
+
Once configured, you can use **all 111 tools** in Qoder AI:
|
|
575
|
+
|
|
576
|
+
**Example 1: Web Scraping**
|
|
577
|
+
```
|
|
578
|
+
"Initialize browser, navigate to https://news.ycombinator.com and scrape all article titles"
|
|
579
|
+
```
|
|
554
580
|
|
|
555
|
-
|
|
556
|
-
|
|
581
|
+
**Example 2: Form Automation**
|
|
582
|
+
```
|
|
583
|
+
"Open https://example.com/login, fill the form with username 'test' and password 'pass123', then click submit"
|
|
557
584
|
```
|
|
558
585
|
|
|
559
|
-
|
|
586
|
+
**Example 3: Data Extraction**
|
|
587
|
+
```
|
|
588
|
+
"Go to https://example.com/products and extract all product names, prices, and images"
|
|
589
|
+
```
|
|
560
590
|
|
|
561
|
-
|
|
591
|
+
**Example 4: Video Extraction**
|
|
592
|
+
```
|
|
593
|
+
"Navigate to [video URL] and extract all video download links"
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
**Example 5: Screenshot**
|
|
597
|
+
```
|
|
598
|
+
"Take a full-page screenshot of https://example.com and save it"
|
|
599
|
+
```
|
|
562
600
|
|
|
563
|
-
|
|
601
|
+
---
|
|
564
602
|
|
|
565
|
-
|
|
603
|
+
### ⚡ Quick Troubleshooting for Qoder AI
|
|
566
604
|
|
|
567
|
-
**
|
|
605
|
+
**Problem 1: "MCP Server timeout" or "Connection failed"**
|
|
568
606
|
|
|
607
|
+
**Solution:**
|
|
569
608
|
```bash
|
|
570
|
-
#
|
|
571
|
-
|
|
572
|
-
|
|
609
|
+
# Install globally for faster startup
|
|
610
|
+
npm install -g brave-real-browser-mcp-server@latest
|
|
611
|
+
```
|
|
573
612
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
613
|
+
Then update config to:
|
|
614
|
+
```json
|
|
615
|
+
{
|
|
616
|
+
"mcpServers": {
|
|
617
|
+
"brave-real-browser": {
|
|
618
|
+
"command": "brave-real-browser-mcp-server",
|
|
619
|
+
"args": []
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
```
|
|
577
624
|
|
|
578
|
-
|
|
579
|
-
cd ~/Library/Application\ Support/Claude
|
|
580
|
-
open -e claude_desktop_config.json
|
|
625
|
+
**Problem 2: "Tools not showing in Qoder AI"**
|
|
581
626
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
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
|
|
632
|
+
|
|
633
|
+
**Problem 3: "Browser not opening"**
|
|
634
|
+
|
|
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
|
+
}
|
|
585
641
|
```
|
|
586
642
|
|
|
587
|
-
**
|
|
643
|
+
**Problem 4: "SSE server not connecting"**
|
|
588
644
|
|
|
645
|
+
**Solution:**
|
|
589
646
|
```bash
|
|
590
|
-
#
|
|
591
|
-
|
|
647
|
+
# Check if server is running
|
|
648
|
+
curl http://localhost:3001/health
|
|
592
649
|
|
|
593
|
-
#
|
|
594
|
-
|
|
595
|
-
touch ~/.config/Claude/claude_desktop_config.json
|
|
650
|
+
# Try different port
|
|
651
|
+
npx brave-real-browser-mcp-server@latest --mode sse --sse-port 3002
|
|
596
652
|
```
|
|
597
653
|
|
|
654
|
+
---
|
|
655
|
+
|
|
656
|
+
### 📊 Available Tools in Qoder AI
|
|
657
|
+
|
|
658
|
+
All **111 tools** are available:
|
|
659
|
+
|
|
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!**
|
|
668
|
+
|
|
669
|
+
---
|
|
670
|
+
|
|
671
|
+
## 🎨 IDE Configurations
|
|
672
|
+
|
|
673
|
+
|
|
598
674
|
**Step 2: Add Configuration**
|
|
599
675
|
|
|
600
676
|
Copy and paste this configuration:
|
|
@@ -627,46 +703,6 @@ Copy and paste this configuration:
|
|
|
627
703
|
}
|
|
628
704
|
```
|
|
629
705
|
|
|
630
|
-
**Step 3: Save and Close File**
|
|
631
|
-
|
|
632
|
-
Press `Ctrl+S` (Windows/Linux) or `Cmd+S` (Mac) to save.
|
|
633
|
-
|
|
634
|
-
**Step 4: Restart Claude Desktop**
|
|
635
|
-
|
|
636
|
-
```bash
|
|
637
|
-
# Windows
|
|
638
|
-
taskkill /F /IM claude.exe
|
|
639
|
-
# Then reopen Claude Desktop
|
|
640
|
-
|
|
641
|
-
# Mac
|
|
642
|
-
pkill -f Claude
|
|
643
|
-
# Then reopen Claude Desktop
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
**Step 5: Verify Installation**
|
|
647
|
-
|
|
648
|
-
1. Open Claude Desktop
|
|
649
|
-
2. Look for 🔧 icon or "Tools" section
|
|
650
|
-
3. You should see "brave-real-browser" with 111 tools
|
|
651
|
-
4. Try this command in Claude:
|
|
652
|
-
```
|
|
653
|
-
Use browser_init tool to start the browser
|
|
654
|
-
```
|
|
655
|
-
|
|
656
|
-
**Troubleshooting:**
|
|
657
|
-
|
|
658
|
-
```bash
|
|
659
|
-
# Check Claude logs
|
|
660
|
-
# Windows
|
|
661
|
-
type "%APPDATA%\Claude\logs\mcp*.log"
|
|
662
|
-
|
|
663
|
-
# Mac
|
|
664
|
-
cat ~/Library/Logs/Claude/mcp*.log
|
|
665
|
-
|
|
666
|
-
# If server fails, test manually:
|
|
667
|
-
npx -y brave-real-browser-mcp-server@latest
|
|
668
|
-
```
|
|
669
|
-
|
|
670
706
|
**Configuration Locations:**
|
|
671
707
|
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
672
708
|
- Mac: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
@@ -674,48 +710,6 @@ npx -y brave-real-browser-mcp-server@latest
|
|
|
674
710
|
|
|
675
711
|
### Cursor AI
|
|
676
712
|
|
|
677
|
-
**Protocol:** MCP (STDIO) | **Setup Time:** 2 minutes | **Auto-Start:** ✅ Yes
|
|
678
|
-
|
|
679
|
-
#### 📋 Step-by-Step Setup Guide:
|
|
680
|
-
|
|
681
|
-
**Step 1: Install Cline Extension (if not installed)**
|
|
682
|
-
|
|
683
|
-
1. Open Cursor AI
|
|
684
|
-
2. Press `Ctrl+Shift+X` (Extensions)
|
|
685
|
-
3. Search for "Cline" or "Claude Dev"
|
|
686
|
-
4. Click Install
|
|
687
|
-
5. Restart Cursor
|
|
688
|
-
|
|
689
|
-
**Step 2: Locate Configuration File**
|
|
690
|
-
|
|
691
|
-
```bash
|
|
692
|
-
# Windows (PowerShell)
|
|
693
|
-
$configPath = "$env:APPDATA\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings"
|
|
694
|
-
cd $configPath
|
|
695
|
-
notepad cline_mcp_settings.json
|
|
696
|
-
|
|
697
|
-
# Windows (CMD)
|
|
698
|
-
cd %APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings
|
|
699
|
-
notepad cline_mcp_settings.json
|
|
700
|
-
|
|
701
|
-
# Mac
|
|
702
|
-
cd ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings
|
|
703
|
-
open -e cline_mcp_settings.json
|
|
704
|
-
```
|
|
705
|
-
|
|
706
|
-
**If file doesn't exist, create it:**
|
|
707
|
-
|
|
708
|
-
```bash
|
|
709
|
-
# Windows (PowerShell)
|
|
710
|
-
$settingsPath = "$env:APPDATA\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings"
|
|
711
|
-
New-Item -Path $settingsPath -ItemType Directory -Force
|
|
712
|
-
New-Item -Path "$settingsPath\cline_mcp_settings.json" -ItemType File -Force
|
|
713
|
-
|
|
714
|
-
# Mac
|
|
715
|
-
mkdir -p ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings
|
|
716
|
-
touch ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
|
|
717
|
-
```
|
|
718
|
-
|
|
719
713
|
**Step 3: Add Configuration**
|
|
720
714
|
|
|
721
715
|
**Basic Configuration:**
|
|
@@ -761,63 +755,6 @@ touch ~/Library/Application\ Support/Cursor/User/globalStorage/saoudrizwan.claud
|
|
|
761
755
|
}
|
|
762
756
|
```
|
|
763
757
|
|
|
764
|
-
**Step 4: Save and Restart Cursor**
|
|
765
|
-
|
|
766
|
-
```bash
|
|
767
|
-
# Windows
|
|
768
|
-
taskkill /F /IM Cursor.exe
|
|
769
|
-
# Then reopen Cursor
|
|
770
|
-
|
|
771
|
-
# Mac
|
|
772
|
-
pkill -f Cursor
|
|
773
|
-
# Then reopen Cursor
|
|
774
|
-
```
|
|
775
|
-
|
|
776
|
-
**Step 5: Verify Installation**
|
|
777
|
-
|
|
778
|
-
1. Open Cursor AI
|
|
779
|
-
2. Open Cline panel (usually in sidebar)
|
|
780
|
-
3. Look for MCP tools section
|
|
781
|
-
4. You should see "brave-real-browser" listed
|
|
782
|
-
5. Test with:
|
|
783
|
-
```
|
|
784
|
-
@brave-real-browser browser_init
|
|
785
|
-
```
|
|
786
|
-
|
|
787
|
-
**Step 6: Using Tools in Cursor**
|
|
788
|
-
|
|
789
|
-
```
|
|
790
|
-
# In Cline chat:
|
|
791
|
-
Use the browser_init tool from brave-real-browser to start automation
|
|
792
|
-
|
|
793
|
-
# Or directly:
|
|
794
|
-
@brave-real-browser navigate {"url": "https://example.com"}
|
|
795
|
-
```
|
|
796
|
-
|
|
797
|
-
**Troubleshooting:**
|
|
798
|
-
|
|
799
|
-
```bash
|
|
800
|
-
# Check if Cline extension is active
|
|
801
|
-
# Cursor → Extensions → Search "Cline" → Should show "Active"
|
|
802
|
-
|
|
803
|
-
# View Cline logs
|
|
804
|
-
# Cursor → View → Output → Select "Cline" from dropdown
|
|
805
|
-
|
|
806
|
-
# Test server manually
|
|
807
|
-
npx -y brave-real-browser-mcp-server@latest
|
|
808
|
-
|
|
809
|
-
# Clear Cursor cache
|
|
810
|
-
# Windows
|
|
811
|
-
Remove-Item -Recurse -Force "$env:APPDATA\Cursor\Cache"
|
|
812
|
-
|
|
813
|
-
# Mac
|
|
814
|
-
rm -rf ~/Library/Application\ Support/Cursor/Cache
|
|
815
|
-
```
|
|
816
|
-
|
|
817
|
-
**Configuration Locations:**
|
|
818
|
-
- Windows: `%APPDATA%\Cursor\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json`
|
|
819
|
-
- Mac: `~/Library/Application Support/Cursor/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`
|
|
820
|
-
|
|
821
758
|
### Windsurf
|
|
822
759
|
|
|
823
760
|
**File:** `mcp.json`
|
|
@@ -903,96 +840,6 @@ rm -rf ~/Library/Application\ Support/Cursor/Cache
|
|
|
903
840
|
}
|
|
904
841
|
```
|
|
905
842
|
|
|
906
|
-
**Step 4:** Save the file and restart Zed Editor
|
|
907
|
-
|
|
908
|
-
**Step 5:** Verify installation by checking Zed's output panel
|
|
909
|
-
|
|
910
|
-
**Important Notes:**
|
|
911
|
-
- ⚠️ **Zed uses `context_servers` NOT `mcpServers` or `lsp`**
|
|
912
|
-
- ✅ Make sure you're using Zed Preview version (v0.120.0+) for MCP support
|
|
913
|
-
- ✅ On Windows, use `npx.cmd` instead of `npx`
|
|
914
|
-
- ✅ Server will auto-start when Zed launches
|
|
915
|
-
|
|
916
|
-
### Qoder AI Editor
|
|
917
|
-
|
|
918
|
-
**Protocol:** MCP (STDIO) | **Setup Time:** 3 minutes | **Auto-Start:** ✅ Yes
|
|
919
|
-
|
|
920
|
-
**✅ Good News:** Qoder AI supports standard STDIO-based MCP servers (just like Claude, Cursor, Windsurf)!
|
|
921
|
-
|
|
922
|
-
#### 📋 Step-by-Step Setup Guide:
|
|
923
|
-
|
|
924
|
-
**Step 1: Open Qoder Settings**
|
|
925
|
-
|
|
926
|
-
```bash
|
|
927
|
-
# Method 1: Using keyboard shortcut
|
|
928
|
-
# Windows: Ctrl + Shift + ,
|
|
929
|
-
# Mac: ⌘ + Shift + ,
|
|
930
|
-
|
|
931
|
-
# Method 2: Click user icon in upper-right corner
|
|
932
|
-
# Then select "Qoder Settings"
|
|
933
|
-
```
|
|
934
|
-
|
|
935
|
-
**Step 2: Navigate to MCP Section**
|
|
936
|
-
|
|
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
|
|
940
|
-
|
|
941
|
-
**Step 3: Install Package Globally (Important for Qoder AI)**
|
|
942
|
-
|
|
943
|
-
```bash
|
|
944
|
-
# Install globally for faster startup
|
|
945
|
-
npm install -g brave-real-browser-mcp-server@latest
|
|
946
|
-
|
|
947
|
-
# Verify installation
|
|
948
|
-
where brave-real-browser-mcp-server # Windows
|
|
949
|
-
which brave-real-browser-mcp-server # Mac/Linux
|
|
950
|
-
```
|
|
951
|
-
|
|
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
|
-
}
|
|
968
|
-
```
|
|
969
|
-
|
|
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
|
-
```
|
|
981
|
-
|
|
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
843
|
**Note:** Replace path in Option C with your actual global npm modules path:
|
|
997
844
|
- Windows: `%APPDATA%\npm\node_modules\brave-real-browser-mcp-server\dist\index.js`
|
|
998
845
|
- Mac/Linux: `/usr/local/lib/node_modules/brave-real-browser-mcp-server/dist/index.js`
|
|
@@ -1030,180 +877,25 @@ A JSON file will appear. Add this configuration:
|
|
|
1030
877
|
}
|
|
1031
878
|
```
|
|
1032
879
|
|
|
1033
|
-
**Step 5: Save Configuration**
|
|
1034
|
-
|
|
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
|
|
1039
|
-
|
|
1040
|
-
**Step 6: Verify Installation**
|
|
1041
|
-
|
|
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
|
|
1056
|
-
|
|
1057
|
-
**Important Notes:**
|
|
1058
|
-
|
|
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
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.
|
|
1086
881
|
|
|
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
|
|
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:
|
|
1117
|
-
```bash
|
|
1118
|
-
# Windows
|
|
1119
|
-
npm root -g
|
|
1120
|
-
# Usually: C:\Users\<USERNAME>\AppData\Roaming\npm\node_modules
|
|
1121
|
-
|
|
1122
|
-
# Mac/Linux
|
|
1123
|
-
npm root -g
|
|
1124
|
-
# Usually: /usr/local/lib/node_modules
|
|
1125
|
-
```
|
|
1126
|
-
|
|
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
|
-
```
|
|
1138
|
-
|
|
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
|
|
1153
|
-
```
|
|
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
|
-
|
|
1186
|
-
### Other HTTP-based IDEs (Gemini CLI, Qwen Code CLI, Custom Tools)
|
|
1187
|
-
|
|
1188
|
-
**Step 1:** Start HTTP server as shown above
|
|
1189
|
-
|
|
1190
|
-
**Step 2:** Configure your IDE/tool to use endpoint: `http://localhost:3000`
|
|
1191
|
-
|
|
1192
|
-
**Step 3:** Make HTTP POST requests to execute tools:
|
|
1193
|
-
|
|
882
|
+
**Solution 1 - Install Globally (Recommended):**
|
|
1194
883
|
```bash
|
|
1195
|
-
#
|
|
1196
|
-
|
|
1197
|
-
-H "Content-Type: application/json" \
|
|
1198
|
-
-d '{"url": "https://example.com"}'
|
|
1199
|
-
|
|
1200
|
-
# Example: Get page content
|
|
1201
|
-
curl -X POST http://localhost:3000/tools/get_content \
|
|
1202
|
-
-H "Content-Type: application/json" \
|
|
1203
|
-
-d '{"type": "text"}'
|
|
884
|
+
# Install package globally for instant startup
|
|
885
|
+
npm install -g brave-real-browser-mcp-server@latest
|
|
1204
886
|
```
|
|
1205
887
|
|
|
1206
|
-
|
|
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
|
+
```
|
|
1207
899
|
|
|
1208
900
|
## 🛠️ Available Tools (111)
|
|
1209
901
|
|
|
@@ -1409,131 +1101,6 @@ curl -X POST http://localhost:3000/tools/get_content \
|
|
|
1409
1101
|
| `url_redirect_tracer` | Trace URL redirects |
|
|
1410
1102
|
| `user_agent_extractor` | Extract user agent info |
|
|
1411
1103
|
|
|
1412
|
-
---
|
|
1413
|
-
|
|
1414
|
-
## 💡 Usage Examples
|
|
1415
|
-
|
|
1416
|
-
### Example 1: Simple Web Scraping (MCP Mode)
|
|
1417
|
-
|
|
1418
|
-
```javascript
|
|
1419
|
-
// Using MCP tool in Claude/Cursor
|
|
1420
|
-
await use_mcp_tool({
|
|
1421
|
-
server_name: "brave-real-browser",
|
|
1422
|
-
tool_name: "browser_init",
|
|
1423
|
-
arguments: {},
|
|
1424
|
-
});
|
|
1425
|
-
|
|
1426
|
-
await use_mcp_tool({
|
|
1427
|
-
server_name: "brave-real-browser",
|
|
1428
|
-
tool_name: "navigate",
|
|
1429
|
-
arguments: { url: "https://example.com" },
|
|
1430
|
-
});
|
|
1431
|
-
|
|
1432
|
-
await use_mcp_tool({
|
|
1433
|
-
server_name: "brave-real-browser",
|
|
1434
|
-
tool_name: "get_content",
|
|
1435
|
-
arguments: { type: "text" },
|
|
1436
|
-
});
|
|
1437
|
-
```
|
|
1438
|
-
|
|
1439
|
-
### Example 2: CAPTCHA Solving
|
|
1440
|
-
|
|
1441
|
-
```javascript
|
|
1442
|
-
// Navigate to CAPTCHA page
|
|
1443
|
-
await use_mcp_tool({
|
|
1444
|
-
server_name: "brave-real-browser",
|
|
1445
|
-
tool_name: "navigate",
|
|
1446
|
-
arguments: { url: "https://site-with-captcha.com" },
|
|
1447
|
-
});
|
|
1448
|
-
|
|
1449
|
-
// Solve CAPTCHA
|
|
1450
|
-
await use_mcp_tool({
|
|
1451
|
-
server_name: "brave-real-browser",
|
|
1452
|
-
tool_name: "solve_captcha",
|
|
1453
|
-
arguments: { type: "recaptcha" },
|
|
1454
|
-
});
|
|
1455
|
-
|
|
1456
|
-
// Continue automation
|
|
1457
|
-
await use_mcp_tool({
|
|
1458
|
-
server_name: "brave-real-browser",
|
|
1459
|
-
tool_name: "click",
|
|
1460
|
-
arguments: { selector: "button.submit" },
|
|
1461
|
-
});
|
|
1462
|
-
```
|
|
1463
|
-
|
|
1464
|
-
### Example 3: Video Extraction
|
|
1465
|
-
|
|
1466
|
-
```javascript
|
|
1467
|
-
// Navigate to video page
|
|
1468
|
-
await use_mcp_tool({
|
|
1469
|
-
server_name: "brave-real-browser",
|
|
1470
|
-
tool_name: "navigate",
|
|
1471
|
-
arguments: { url: "https://video-site.com/video/123" },
|
|
1472
|
-
});
|
|
1473
|
-
|
|
1474
|
-
// Find video links
|
|
1475
|
-
await use_mcp_tool({
|
|
1476
|
-
server_name: "brave-real-browser",
|
|
1477
|
-
tool_name: "video_link_finder",
|
|
1478
|
-
arguments: {},
|
|
1479
|
-
});
|
|
1480
|
-
|
|
1481
|
-
// Advanced video extraction with ad bypass
|
|
1482
|
-
await use_mcp_tool({
|
|
1483
|
-
server_name: "brave-real-browser",
|
|
1484
|
-
tool_name: "advanced_video_extraction",
|
|
1485
|
-
arguments: {},
|
|
1486
|
-
});
|
|
1487
|
-
```
|
|
1488
|
-
|
|
1489
|
-
### Example 4: Multi-Page Scraping
|
|
1490
|
-
|
|
1491
|
-
```javascript
|
|
1492
|
-
// Initialize browser
|
|
1493
|
-
await use_mcp_tool({
|
|
1494
|
-
server_name: "brave-real-browser",
|
|
1495
|
-
tool_name: "browser_init",
|
|
1496
|
-
arguments: {},
|
|
1497
|
-
});
|
|
1498
|
-
|
|
1499
|
-
// Auto-paginate through all pages
|
|
1500
|
-
await use_mcp_tool({
|
|
1501
|
-
server_name: "brave-real-browser",
|
|
1502
|
-
tool_name: "multi_page_scraper",
|
|
1503
|
-
arguments: {
|
|
1504
|
-
startUrl: "https://example.com/page/1",
|
|
1505
|
-
maxPages: 10,
|
|
1506
|
-
},
|
|
1507
|
-
});
|
|
1508
|
-
```
|
|
1509
|
-
|
|
1510
|
-
---
|
|
1511
|
-
|
|
1512
|
-
## 📋 API Endpoints (HTTP Mode)
|
|
1513
|
-
|
|
1514
|
-
When running in HTTP mode, these endpoints are available:
|
|
1515
|
-
|
|
1516
|
-
```
|
|
1517
|
-
GET /health - Health check
|
|
1518
|
-
GET /tools - List all tools
|
|
1519
|
-
POST /tools/:toolName - Execute any tool
|
|
1520
|
-
POST /browser/init - Initialize browser
|
|
1521
|
-
POST /browser/navigate - Navigate to URL
|
|
1522
|
-
POST /browser/get_content - Get page content
|
|
1523
|
-
POST /browser/click - Click element
|
|
1524
|
-
POST /browser/type - Type text
|
|
1525
|
-
POST /browser/close - Close browser
|
|
1526
|
-
```
|
|
1527
|
-
|
|
1528
|
-
**Example:**
|
|
1529
|
-
|
|
1530
|
-
```bash
|
|
1531
|
-
curl -X POST http://localhost:3000/tools/navigate \
|
|
1532
|
-
-H "Content-Type: application/json" \
|
|
1533
|
-
-d '{"url": "https://example.com"}'
|
|
1534
|
-
```
|
|
1535
|
-
|
|
1536
|
-
---
|
|
1537
1104
|
|
|
1538
1105
|
## 🔧 Environment Variables
|
|
1539
1106
|
|
|
@@ -1551,403 +1118,6 @@ DISABLE_CONTENT_PRIORITY=true
|
|
|
1551
1118
|
HTTP_PORT=3000
|
|
1552
1119
|
```
|
|
1553
1120
|
|
|
1554
|
-
---
|
|
1555
|
-
|
|
1556
|
-
## 🐛 Troubleshooting
|
|
1557
|
-
|
|
1558
|
-
### Common Issues & Solutions
|
|
1559
|
-
|
|
1560
|
-
#### 1. Brave Browser Not Found
|
|
1561
|
-
|
|
1562
|
-
**Symptoms:**
|
|
1563
|
-
- Error: "Brave browser not found"
|
|
1564
|
-
- Browser fails to launch
|
|
1565
|
-
|
|
1566
|
-
**Solutions:**
|
|
1567
|
-
|
|
1568
|
-
```bash
|
|
1569
|
-
# Windows (PowerShell)
|
|
1570
|
-
$env:BRAVE_PATH="C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe"
|
|
1571
|
-
|
|
1572
|
-
# Windows (CMD)
|
|
1573
|
-
set BRAVE_PATH="C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe"
|
|
1574
|
-
|
|
1575
|
-
# Mac
|
|
1576
|
-
export BRAVE_PATH="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser"
|
|
1577
|
-
|
|
1578
|
-
# Linux (Ubuntu/Debian)
|
|
1579
|
-
export BRAVE_PATH="/usr/bin/brave-browser"
|
|
1580
|
-
|
|
1581
|
-
# Linux (Snap)
|
|
1582
|
-
export BRAVE_PATH="/snap/bin/brave"
|
|
1583
|
-
```
|
|
1584
|
-
|
|
1585
|
-
**Permanent Fix (Windows):**
|
|
1586
|
-
```powershell
|
|
1587
|
-
# Add to System Environment Variables
|
|
1588
|
-
[System.Environment]::SetEnvironmentVariable('BRAVE_PATH', 'C:\Program Files\BraveSoftware\Brave-Browser\Application\brave.exe', 'User')
|
|
1589
|
-
```
|
|
1590
|
-
|
|
1591
|
-
---
|
|
1592
|
-
|
|
1593
|
-
#### 2. Server Won't Start
|
|
1594
|
-
|
|
1595
|
-
**Symptoms:**
|
|
1596
|
-
- "Failed to start server" error
|
|
1597
|
-
- Process exits immediately
|
|
1598
|
-
- No output in terminal
|
|
1599
|
-
|
|
1600
|
-
**Solutions:**
|
|
1601
|
-
|
|
1602
|
-
**Step 1:** Check Node.js version
|
|
1603
|
-
```bash
|
|
1604
|
-
node --version
|
|
1605
|
-
# Should show v18.0.0 or higher
|
|
1606
|
-
```
|
|
1607
|
-
|
|
1608
|
-
**Step 2:** If Node.js is old, update it:
|
|
1609
|
-
```bash
|
|
1610
|
-
# Windows (using Chocolatey)
|
|
1611
|
-
choco upgrade nodejs
|
|
1612
|
-
|
|
1613
|
-
# Mac (using Homebrew)
|
|
1614
|
-
brew upgrade node
|
|
1615
|
-
|
|
1616
|
-
# Or download from: https://nodejs.org/
|
|
1617
|
-
```
|
|
1618
|
-
|
|
1619
|
-
**Step 3:** Clear npm cache and reinstall
|
|
1620
|
-
```bash
|
|
1621
|
-
npm cache clean --force
|
|
1622
|
-
npm uninstall -g brave-real-browser-mcp-server
|
|
1623
|
-
npm install -g brave-real-browser-mcp-server@latest
|
|
1624
|
-
```
|
|
1625
|
-
|
|
1626
|
-
**Step 4:** Check for conflicting processes
|
|
1627
|
-
```bash
|
|
1628
|
-
# Windows
|
|
1629
|
-
taskkill /F /IM brave.exe
|
|
1630
|
-
|
|
1631
|
-
# Mac/Linux
|
|
1632
|
-
pkill -f brave
|
|
1633
|
-
```
|
|
1634
|
-
|
|
1635
|
-
---
|
|
1636
|
-
|
|
1637
|
-
#### 3. Port Already in Use (HTTP Mode)
|
|
1638
|
-
|
|
1639
|
-
**Symptoms:**
|
|
1640
|
-
- Error: "EADDRINUSE: address already in use ::3000"
|
|
1641
|
-
- HTTP server fails to start
|
|
1642
|
-
|
|
1643
|
-
**Solutions:**
|
|
1644
|
-
|
|
1645
|
-
**Option A:** Use a different port
|
|
1646
|
-
```bash
|
|
1647
|
-
npx brave-real-browser-mcp-server@latest --mode http --port 8080
|
|
1648
|
-
```
|
|
1649
|
-
|
|
1650
|
-
**Option B:** Kill the process using port 3000
|
|
1651
|
-
|
|
1652
|
-
```bash
|
|
1653
|
-
# Windows (PowerShell)
|
|
1654
|
-
Get-Process -Id (Get-NetTCPConnection -LocalPort 3000).OwningProcess | Stop-Process -Force
|
|
1655
|
-
|
|
1656
|
-
# Windows (CMD)
|
|
1657
|
-
for /f "tokens=5" %a in ('netstat -aon ^| find ":3000" ^| find "LISTENING"') do taskkill /F /PID %a
|
|
1658
|
-
|
|
1659
|
-
# Mac/Linux
|
|
1660
|
-
lsof -ti:3000 | xargs kill -9
|
|
1661
|
-
```
|
|
1662
|
-
|
|
1663
|
-
---
|
|
1664
|
-
|
|
1665
|
-
#### 4. Qoder AI Configuration Fails
|
|
1666
|
-
|
|
1667
|
-
**Symptoms:**
|
|
1668
|
-
- "Connection refused" error
|
|
1669
|
-
- "Server not reachable" message
|
|
1670
|
-
- Tools not appearing in Qoder AI
|
|
1671
|
-
|
|
1672
|
-
**Solutions:**
|
|
1673
|
-
|
|
1674
|
-
**Step 1:** Verify HTTP server is running
|
|
1675
|
-
```bash
|
|
1676
|
-
# Start server in a separate terminal
|
|
1677
|
-
npx brave-real-browser-mcp-server@latest --mode http --port 3000
|
|
1678
|
-
|
|
1679
|
-
# You should see:
|
|
1680
|
-
# ✅ [HTTP] Server ready at http://localhost:3000
|
|
1681
|
-
```
|
|
1682
|
-
|
|
1683
|
-
**Step 2:** Test server connection
|
|
1684
|
-
```bash
|
|
1685
|
-
curl http://localhost:3000/health
|
|
1686
|
-
# Expected: {"status":"ok","timestamp":"..."}
|
|
1687
|
-
```
|
|
1688
|
-
|
|
1689
|
-
**Step 3:** Check firewall settings
|
|
1690
|
-
```bash
|
|
1691
|
-
# Windows: Allow Node.js through firewall
|
|
1692
|
-
netsh advfirewall firewall add rule name="Node.js" dir=in action=allow program="C:\Program Files\nodejs\node.exe" enable=yes
|
|
1693
|
-
```
|
|
1694
|
-
|
|
1695
|
-
**Step 4:** Try alternative configuration
|
|
1696
|
-
```json
|
|
1697
|
-
{
|
|
1698
|
-
"mcpServers": {
|
|
1699
|
-
"brave-real-browser": {
|
|
1700
|
-
"command": "npx",
|
|
1701
|
-
"args": ["-y", "brave-real-browser-mcp-server@latest", "--mode", "http", "--port", "3000"],
|
|
1702
|
-
"env": {}
|
|
1703
|
-
}
|
|
1704
|
-
}
|
|
1705
|
-
}
|
|
1706
|
-
```
|
|
1707
|
-
|
|
1708
|
-
---
|
|
1709
|
-
|
|
1710
|
-
#### 5. Zed Editor Not Detecting Server
|
|
1711
|
-
|
|
1712
|
-
**Symptoms:**
|
|
1713
|
-
- Context servers not appearing
|
|
1714
|
-
- "Failed to start context server" error
|
|
1715
|
-
|
|
1716
|
-
**Solutions:**
|
|
1717
|
-
|
|
1718
|
-
**Step 1:** Ensure Zed Preview version
|
|
1719
|
-
```bash
|
|
1720
|
-
# Check Zed version (should be v0.120.0 or higher)
|
|
1721
|
-
# Open Zed → Help → About Zed
|
|
1722
|
-
```
|
|
1723
|
-
|
|
1724
|
-
**Step 2:** Verify correct configuration format
|
|
1725
|
-
```json
|
|
1726
|
-
{
|
|
1727
|
-
"context_servers": {
|
|
1728
|
-
"brave-real-browser": {
|
|
1729
|
-
"source": "custom",
|
|
1730
|
-
"command": "npx.cmd", // Windows: use npx.cmd, Mac/Linux: use npx
|
|
1731
|
-
"args": ["-y", "brave-real-browser-mcp-server"]
|
|
1732
|
-
}
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1735
|
-
```
|
|
1736
|
-
|
|
1737
|
-
**Step 3:** Check Zed logs
|
|
1738
|
-
```bash
|
|
1739
|
-
# Open Zed → View → Debug → Language Server Logs
|
|
1740
|
-
# Look for error messages
|
|
1741
|
-
```
|
|
1742
|
-
|
|
1743
|
-
**Step 4:** Restart Zed completely
|
|
1744
|
-
```bash
|
|
1745
|
-
# Close Zed and kill any background processes
|
|
1746
|
-
# Windows
|
|
1747
|
-
taskkill /F /IM zed.exe
|
|
1748
|
-
|
|
1749
|
-
# Mac
|
|
1750
|
-
pkill -f zed
|
|
1751
|
-
```
|
|
1752
|
-
|
|
1753
|
-
---
|
|
1754
|
-
|
|
1755
|
-
#### 6. Claude Desktop Configuration Issues
|
|
1756
|
-
|
|
1757
|
-
**Symptoms:**
|
|
1758
|
-
- "MCP server failed to start"
|
|
1759
|
-
- Tools not appearing in Claude
|
|
1760
|
-
|
|
1761
|
-
**Solutions:**
|
|
1762
|
-
|
|
1763
|
-
**Step 1:** Check config file location
|
|
1764
|
-
```bash
|
|
1765
|
-
# Windows
|
|
1766
|
-
echo %APPDATA%\Claude\claude_desktop_config.json
|
|
1767
|
-
|
|
1768
|
-
# Mac
|
|
1769
|
-
echo ~/Library/Application\ Support/Claude/claude_desktop_config.json
|
|
1770
|
-
```
|
|
1771
|
-
|
|
1772
|
-
**Step 2:** Validate JSON format
|
|
1773
|
-
- Use https://jsonlint.com/ to validate your config
|
|
1774
|
-
- Ensure no trailing commas
|
|
1775
|
-
- Check quotes are properly escaped
|
|
1776
|
-
|
|
1777
|
-
**Step 3:** Check Claude logs
|
|
1778
|
-
```bash
|
|
1779
|
-
# Windows
|
|
1780
|
-
type "%APPDATA%\Claude\logs\mcp*.log"
|
|
1781
|
-
|
|
1782
|
-
# Mac
|
|
1783
|
-
cat ~/Library/Logs/Claude/mcp*.log
|
|
1784
|
-
```
|
|
1785
|
-
|
|
1786
|
-
**Step 4:** Restart Claude Desktop completely
|
|
1787
|
-
```bash
|
|
1788
|
-
# Windows
|
|
1789
|
-
taskkill /F /IM claude.exe
|
|
1790
|
-
|
|
1791
|
-
# Mac
|
|
1792
|
-
pkill -f Claude
|
|
1793
|
-
```
|
|
1794
|
-
|
|
1795
|
-
---
|
|
1796
|
-
|
|
1797
|
-
#### 7. CAPTCHA Not Solving
|
|
1798
|
-
|
|
1799
|
-
**Symptoms:**
|
|
1800
|
-
- CAPTCHA solve timeout
|
|
1801
|
-
- "Failed to solve CAPTCHA" error
|
|
1802
|
-
|
|
1803
|
-
**Solutions:**
|
|
1804
|
-
|
|
1805
|
-
**Step 1:** Ensure CAPTCHA is fully loaded
|
|
1806
|
-
```javascript
|
|
1807
|
-
// Add wait before solving
|
|
1808
|
-
await use_mcp_tool({
|
|
1809
|
-
server_name: "brave-real-browser",
|
|
1810
|
-
tool_name: "wait",
|
|
1811
|
-
arguments: { type: "timeout", value: "5000" }
|
|
1812
|
-
});
|
|
1813
|
-
```
|
|
1814
|
-
|
|
1815
|
-
**Step 2:** Try longer timeout
|
|
1816
|
-
```javascript
|
|
1817
|
-
await use_mcp_tool({
|
|
1818
|
-
server_name: "brave-real-browser",
|
|
1819
|
-
tool_name: "solve_captcha",
|
|
1820
|
-
arguments: {
|
|
1821
|
-
type: "recaptcha",
|
|
1822
|
-
timeout: 60000 // 60 seconds
|
|
1823
|
-
}
|
|
1824
|
-
});
|
|
1825
|
-
```
|
|
1826
|
-
|
|
1827
|
-
**Step 3:** Try different CAPTCHA types
|
|
1828
|
-
- `recaptcha` - Google reCAPTCHA v2/v3
|
|
1829
|
-
- `hcaptcha` - hCaptcha
|
|
1830
|
-
- `turnstile` - Cloudflare Turnstile
|
|
1831
|
-
|
|
1832
|
-
---
|
|
1833
|
-
|
|
1834
|
-
#### 8. NPX Command Not Found
|
|
1835
|
-
|
|
1836
|
-
**Symptoms:**
|
|
1837
|
-
- "npx: command not found"
|
|
1838
|
-
- "npx is not recognized"
|
|
1839
|
-
|
|
1840
|
-
**Solutions:**
|
|
1841
|
-
|
|
1842
|
-
**Step 1:** Verify npm installation
|
|
1843
|
-
```bash
|
|
1844
|
-
npm --version
|
|
1845
|
-
```
|
|
1846
|
-
|
|
1847
|
-
**Step 2:** Reinstall Node.js
|
|
1848
|
-
- Download from: https://nodejs.org/
|
|
1849
|
-
- Choose LTS version
|
|
1850
|
-
- During installation, ensure "Add to PATH" is checked
|
|
1851
|
-
|
|
1852
|
-
**Step 3:** Add npm to PATH manually (Windows)
|
|
1853
|
-
```powershell
|
|
1854
|
-
$env:PATH += ";C:\Program Files\nodejs"
|
|
1855
|
-
```
|
|
1856
|
-
|
|
1857
|
-
---
|
|
1858
|
-
|
|
1859
|
-
#### 9. Permission Denied Errors (Linux/Mac)
|
|
1860
|
-
|
|
1861
|
-
**Symptoms:**
|
|
1862
|
-
- "EACCES: permission denied"
|
|
1863
|
-
- Cannot install globally
|
|
1864
|
-
|
|
1865
|
-
**Solutions:**
|
|
1866
|
-
|
|
1867
|
-
```bash
|
|
1868
|
-
# Option A: Fix npm permissions
|
|
1869
|
-
sudo chown -R $(whoami) ~/.npm
|
|
1870
|
-
sudo chown -R $(whoami) /usr/local/lib/node_modules
|
|
1871
|
-
|
|
1872
|
-
# Option B: Use npx instead of global install
|
|
1873
|
-
npx brave-real-browser-mcp-server@latest
|
|
1874
|
-
|
|
1875
|
-
# Option C: Use nvm (recommended)
|
|
1876
|
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
|
|
1877
|
-
nvm install --lts
|
|
1878
|
-
```
|
|
1879
|
-
|
|
1880
|
-
---
|
|
1881
|
-
|
|
1882
|
-
#### 10. Browser Crashes or Hangs
|
|
1883
|
-
|
|
1884
|
-
**Symptoms:**
|
|
1885
|
-
- Browser becomes unresponsive
|
|
1886
|
-
- "Page crashed" errors
|
|
1887
|
-
- Memory issues
|
|
1888
|
-
|
|
1889
|
-
**Solutions:**
|
|
1890
|
-
|
|
1891
|
-
**Step 1:** Enable headless mode
|
|
1892
|
-
```json
|
|
1893
|
-
{
|
|
1894
|
-
"mcpServers": {
|
|
1895
|
-
"brave-real-browser": {
|
|
1896
|
-
"command": "npx",
|
|
1897
|
-
"args": ["-y", "brave-real-browser-mcp-server@latest"],
|
|
1898
|
-
"env": {
|
|
1899
|
-
"HEADLESS": "true"
|
|
1900
|
-
}
|
|
1901
|
-
}
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
```
|
|
1905
|
-
|
|
1906
|
-
**Step 2:** Increase timeout values
|
|
1907
|
-
```javascript
|
|
1908
|
-
await use_mcp_tool({
|
|
1909
|
-
server_name: "brave-real-browser",
|
|
1910
|
-
tool_name: "navigate",
|
|
1911
|
-
arguments: {
|
|
1912
|
-
url: "https://example.com",
|
|
1913
|
-
waitUntil: "networkidle2",
|
|
1914
|
-
timeout: 60000
|
|
1915
|
-
}
|
|
1916
|
-
});
|
|
1917
|
-
```
|
|
1918
|
-
|
|
1919
|
-
**Step 3:** Clear browser cache
|
|
1920
|
-
```bash
|
|
1921
|
-
# Kill all Brave processes
|
|
1922
|
-
# Windows
|
|
1923
|
-
taskkill /F /IM brave.exe
|
|
1924
|
-
|
|
1925
|
-
# Mac/Linux
|
|
1926
|
-
pkill -9 brave
|
|
1927
|
-
```
|
|
1928
|
-
|
|
1929
|
-
---
|
|
1930
|
-
|
|
1931
|
-
### Getting Help
|
|
1932
|
-
|
|
1933
|
-
If you're still experiencing issues:
|
|
1934
|
-
|
|
1935
|
-
1. **Check GitHub Issues:** https://github.com/codeiva4u/Brave-Real-Browser-Mcp-Server/issues
|
|
1936
|
-
2. **Enable Debug Logs:** Set `DEBUG=*` environment variable
|
|
1937
|
-
3. **Report Bug:** Include:
|
|
1938
|
-
- Operating System & version
|
|
1939
|
-
- Node.js version (`node --version`)
|
|
1940
|
-
- Editor/IDE name & version
|
|
1941
|
-
- Complete error message
|
|
1942
|
-
- Configuration file (remove sensitive data)
|
|
1943
|
-
|
|
1944
|
-
```bash
|
|
1945
|
-
# Run with debug logging
|
|
1946
|
-
DEBUG=* npx brave-real-browser-mcp-server@latest --mode http
|
|
1947
|
-
```
|
|
1948
|
-
|
|
1949
|
-
---
|
|
1950
|
-
|
|
1951
1121
|
## 📊 Supported Protocols
|
|
1952
1122
|
|
|
1953
1123
|
|| Protocol | Used By | Auto-Config | Status |
|
|
@@ -1958,46 +1128,6 @@ DEBUG=* npx brave-real-browser-mcp-server@latest --mode http
|
|
|
1958
1128
|
|| **WebSocket** | Modern Web Apps, Real-time Tools | ✅ | 🟢 Working |
|
|
1959
1129
|
|| **SSE** | Real-time Streaming, Web Apps | ✅ | 🟢 Working |
|
|
1960
1130
|
|
|
1961
|
-
---
|
|
1962
|
-
|
|
1963
|
-
## 📊 Editor Compatibility Matrix
|
|
1964
|
-
|
|
1965
|
-
| AI Editor | Protocol | Config File | Server Auto-Start | HTTP Server Required | Status |
|
|
1966
|
-
|-----------|----------|-------------|-------------------|----------------------|--------|
|
|
1967
|
-
| **Claude Desktop** | MCP | `claude_desktop_config.json` | ✅ Yes | ❌ No | 🟢 Working |
|
|
1968
|
-
| **Cursor AI** | MCP | `cline_mcp_settings.json` | ✅ Yes | ❌ No | 🟢 Working |
|
|
1969
|
-
| **Windsurf** | MCP | `mcp.json` | ✅ Yes | ❌ No | 🟢 Working |
|
|
1970
|
-
| **Cline (VSCode)** | MCP | `cline_mcp_settings.json` | ✅ Yes | ❌ No | 🟢 Working |
|
|
1971
|
-
| **Warp Terminal** | MCP | Warp config | ✅ Yes | ❌ No | 🟢 Working |
|
|
1972
|
-
| **Zed Editor** | Context Servers (MCP) | `settings.json` | ✅ Yes | ❌ No | 🟢 Working |
|
|
1973
|
-
| **Qoder AI** | HTTP | `mcp.json` or config | ❌ No | ✅ **Yes** | 🟢 Working |
|
|
1974
|
-
| **Gemini CLI** | HTTP | CLI config | ❌ No | ✅ **Yes** | 🟢 Working |
|
|
1975
|
-
| **Qwen Code CLI** | HTTP | CLI config | ❌ No | ✅ **Yes** | 🟢 Working |
|
|
1976
|
-
| **Continue.dev** | HTTP | Extension config | ❌ No | ✅ **Yes** | 🟢 Working |
|
|
1977
|
-
| **Custom Tools** | HTTP | API integration | ❌ No | ✅ **Yes** | 🟢 Working |
|
|
1978
|
-
| **VSCode (Generic)** | LSP/HTTP | Extension config | Varies | Optional | 🟢 Working |
|
|
1979
|
-
|
|
1980
|
-
**Legend:**
|
|
1981
|
-
- ✅ **Server Auto-Start**: Editor automatically starts the MCP server
|
|
1982
|
-
- ❌ **HTTP Server Required**: You must manually start HTTP server before using
|
|
1983
|
-
- 🟢 **Working**: Fully tested and operational
|
|
1984
|
-
|
|
1985
|
-
---
|
|
1986
|
-
|
|
1987
|
-
## 📋 Requirements
|
|
1988
|
-
|
|
1989
|
-
- **Node.js** >= 18.0.0
|
|
1990
|
-
- **Brave Browser** (auto-detected or specify path)
|
|
1991
|
-
- **Operating System:** Windows, macOS, Linux
|
|
1992
|
-
|
|
1993
|
-
---
|
|
1994
|
-
|
|
1995
|
-
## 🤝 Contributing
|
|
1996
|
-
|
|
1997
|
-
Contributions are welcome! Please submit a Pull Request.
|
|
1998
|
-
|
|
1999
|
-
---
|
|
2000
|
-
|
|
2001
1131
|
## 📄 License
|
|
2002
1132
|
|
|
2003
1133
|
MIT License - See LICENSE file for details.
|
|
@@ -2018,7 +1148,3 @@ MIT License - See LICENSE file for details.
|
|
|
2018
1148
|
|
|
2019
1149
|
**Made with ❤️ for the AI Development Community**
|
|
2020
1150
|
|
|
2021
|
-
[⭐ 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)
|
|
2022
|
-
|
|
2023
|
-
</div>
|
|
2024
|
-
| **MCP (STDIO)** | Claude Desktop,
|