brave-real-browser-mcp-server 2.14.9 → 2.14.11
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 +5 -2
- package/dist/handlers/advanced-scraping-handlers.js +58 -0
- package/dist/handlers/advanced-video-media-handlers.js +134 -1246
- package/dist/handlers/ai-powered-handlers.js +113 -17
- package/dist/handlers/data-quality-handlers.js +74 -0
- package/dist/handlers/data-transform-handlers.js +66 -0
- package/dist/handlers/dom-handlers.js +206 -0
- package/dist/handlers/network-handlers.js +111 -0
- package/dist/handlers/search-filter-handlers.js +15 -71
- package/dist/mcp-server.js +133 -0
- package/dist/tool-definitions.js +129 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
**Brave Real Browser MCP Server** एक powerful automation tool है जो:
|
|
24
24
|
|
|
25
|
-
- ✅ **
|
|
25
|
+
- ✅ **20+ AI IDEs में काम करता है** (Antigravity, Warp AI, Zed, Cursor, Claude, Windsurf, Cline, Qoder AI, etc.)
|
|
26
26
|
- ✅ **108+ Automation Tools** - Browser control, scraping, CAPTCHA solving, video extraction
|
|
27
27
|
- ✅ **MCP Protocol (STDIO)** - Fast and secure local communication
|
|
28
28
|
- ✅ **Auto-Detection** - Automatically detects your IDE
|
|
@@ -42,6 +42,9 @@
|
|
|
42
42
|
| **Claude Desktop** | 2 min | MCP | Add config → Restart |
|
|
43
43
|
| **Cursor AI** | 2 min | MCP | Add config → Restart |
|
|
44
44
|
| **Windsurf** | 2 min | MCP | Add config → Restart |
|
|
45
|
+
| **Antigravity IDE** | 1 min | MCP | Auto-Detect |
|
|
46
|
+
| **Warp AI** | 2 min | MCP | Add config |
|
|
47
|
+
| **Zed AI** | 2 min | MCP | Add config |
|
|
45
48
|
| **Qoder AI** | 3 min | MCP (STDIO) | Add config → Restart |
|
|
46
49
|
|
|
47
50
|
**Quick Commands:**
|
|
@@ -557,7 +560,7 @@ Copy and paste this configuration:
|
|
|
557
560
|
| Tool | Description |
|
|
558
561
|
| ----------------------- | ------------------------- |
|
|
559
562
|
| `progress_tracker` | Track automation progress |
|
|
560
|
-
|
|
563
|
+
|
|
561
564
|
| `success_rate_reporter` | Report success rates |
|
|
562
565
|
| `data_quality_metrics` | Data quality metrics |
|
|
563
566
|
| `performance_monitor` | Monitor performance |
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { getPageInstance } from '../browser-manager.js';
|
|
2
|
+
export async function handleMultiPageScraper(args) {
|
|
3
|
+
const page = getPageInstance();
|
|
4
|
+
if (!page)
|
|
5
|
+
throw new Error('Browser not initialized. Use browser_init first.');
|
|
6
|
+
const results = [];
|
|
7
|
+
const errors = [];
|
|
8
|
+
for (const url of args.urls) {
|
|
9
|
+
try {
|
|
10
|
+
await page.goto(url, { waitUntil: 'domcontentloaded' });
|
|
11
|
+
if (args.waitBetweenPages) {
|
|
12
|
+
await new Promise(resolve => setTimeout(resolve, args.waitBetweenPages));
|
|
13
|
+
}
|
|
14
|
+
const data = await page.evaluate((selector) => {
|
|
15
|
+
const elements = document.querySelectorAll(selector);
|
|
16
|
+
return Array.from(elements).map(el => el.textContent?.trim()).filter(Boolean);
|
|
17
|
+
}, args.dataSelector);
|
|
18
|
+
results.push({ url, data, success: true });
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
errors.push({ url, error: String(error) });
|
|
22
|
+
results.push({ url, success: false, error: String(error) });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
content: [{
|
|
27
|
+
type: 'text',
|
|
28
|
+
text: JSON.stringify({ summary: `Scraped ${results.length} pages`, results, errors }, null, 2)
|
|
29
|
+
}]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export async function handleBreadcrumbNavigator(args) {
|
|
33
|
+
const page = getPageInstance();
|
|
34
|
+
if (!page)
|
|
35
|
+
throw new Error('Browser not initialized. Use browser_init first.');
|
|
36
|
+
const breadcrumbs = await page.evaluate((selector) => {
|
|
37
|
+
const elements = document.querySelectorAll(selector);
|
|
38
|
+
return Array.from(elements).map(el => ({
|
|
39
|
+
text: el.textContent?.trim() || '',
|
|
40
|
+
href: el.href || null
|
|
41
|
+
}));
|
|
42
|
+
}, args.breadcrumbSelector);
|
|
43
|
+
let navigationResult = null;
|
|
44
|
+
if (args.followLinks && breadcrumbs.length > 0) {
|
|
45
|
+
// Navigate to parent (second to last)
|
|
46
|
+
const parent = breadcrumbs.length > 1 ? breadcrumbs[breadcrumbs.length - 2] : null;
|
|
47
|
+
if (parent && parent.href) {
|
|
48
|
+
await page.goto(parent.href);
|
|
49
|
+
navigationResult = `Navigated to parent: ${parent.text} (${parent.href})`;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
content: [{
|
|
54
|
+
type: 'text',
|
|
55
|
+
text: JSON.stringify({ breadcrumbs, navigationResult }, null, 2)
|
|
56
|
+
}]
|
|
57
|
+
};
|
|
58
|
+
}
|