brave-real-browser-mcp-server 2.15.4 → 2.15.5
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 +21 -40
- package/dist/handlers/data-extraction-handlers.js +0 -76
- package/dist/handlers/data-processing-handlers.js +1 -43
- package/dist/handlers/data-quality-handlers.js +0 -141
- package/dist/handlers/dynamic-session-handlers.js +0 -75
- package/dist/handlers/monitoring-reporting-handlers.js +0 -83
- package/dist/handlers/visual-tools-handlers.js +0 -52
- package/dist/index.js +6 -24
- package/dist/tool-definitions.js +0 -92
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
<div align="center">
|
|
6
6
|
|
|
7
|
-

|
|
8
8
|

|
|
9
|
-

|
|
10
10
|

|
|
11
11
|

|
|
12
12
|
|
|
13
|
-
**सभी AI IDEs के लिए Universal MCP Server |
|
|
13
|
+
**सभी AI IDEs के लिए Universal MCP Server | 66+ Tools | Browser Automation | Web Scraping | CAPTCHA Solving**
|
|
14
14
|
|
|
15
|
-
[Installation](#-installation) | [Quick Start](#-quick-start) | [Qoder AI Setup](#-qoder-ai---complete-integration-guide) | [Tools](#-available-tools-
|
|
15
|
+
[Installation](#-installation) | [Quick Start](#-quick-start) | [Qoder AI Setup](#-qoder-ai---complete-integration-guide) | [Tools](#-available-tools-66) | [IDE Configurations](#-ide-configurations)
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@
|
|
|
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
|
+
- ✅ **66+ 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
|
|
29
29
|
- ✅ **Real Brave Browser** - Anti-detection features, bypass Cloudflare
|
|
@@ -146,10 +146,11 @@ npm install -g brave-real-browser-mcp-server@latest
|
|
|
146
146
|
|
|
147
147
|
```json
|
|
148
148
|
{
|
|
149
|
-
"
|
|
149
|
+
"context_servers": {
|
|
150
150
|
"brave-real-browser": {
|
|
151
|
-
"command": "npx",
|
|
152
|
-
"args": ["-y", "brave-real-browser-mcp-server@latest"]
|
|
151
|
+
"command": "npx.cmd",
|
|
152
|
+
"args": ["-y", "brave-real-browser-mcp-server@latest"],
|
|
153
|
+
"env": {}
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
156
|
}
|
|
@@ -189,7 +190,7 @@ npm install -g brave-real-browser-mcp-server@latest
|
|
|
189
190
|
|
|
190
191
|
---
|
|
191
192
|
|
|
192
|
-
## 🛠️ Available Tools (
|
|
193
|
+
## 🛠️ Available Tools (66)
|
|
193
194
|
|
|
194
195
|
### 🌐 Browser Management (2 tools)
|
|
195
196
|
|
|
@@ -214,14 +215,13 @@ npm install -g brave-real-browser-mcp-server@latest
|
|
|
214
215
|
| `random_scroll` | Human-like scrolling |
|
|
215
216
|
| `solve_captcha` | Solve CAPTCHA (reCAPTCHA, hCaptcha, Turnstile, etc.) |
|
|
216
217
|
|
|
217
|
-
### 📄 Content Extraction (
|
|
218
|
+
### 📄 Content Extraction (9 tools)
|
|
218
219
|
|
|
219
220
|
| Tool | Description |
|
|
220
221
|
| -------------------------- | ----------------------------------------- |
|
|
221
222
|
| `get_content` | Extract page content (HTML/Text/Markdown) |
|
|
222
223
|
| `find_selector` | Find CSS selectors for elements |
|
|
223
224
|
| `scrape_table` | Extract table data with headers |
|
|
224
|
-
| `extract_list` | Extract list items |
|
|
225
225
|
| `extract_json` | Extract JSON data from page |
|
|
226
226
|
| `scrape_meta_tags` | Extract meta tags and SEO info |
|
|
227
227
|
| `extract_schema` | Extract schema.org structured data |
|
|
@@ -284,7 +284,7 @@ npm install -g brave-real-browser-mcp-server@latest
|
|
|
284
284
|
| `audio_captcha_solver` | Solve audio CAPTCHAs |
|
|
285
285
|
| `puzzle_captcha_handler` | Handle puzzle CAPTCHAs |
|
|
286
286
|
|
|
287
|
-
### 🔧 Data Processing (
|
|
287
|
+
### 🔧 Data Processing (5 tools)
|
|
288
288
|
|
|
289
289
|
| Tool | Description |
|
|
290
290
|
| ------------------------- | ---------------------------------- |
|
|
@@ -293,28 +293,17 @@ npm install -g brave-real-browser-mcp-server@latest
|
|
|
293
293
|
| `contact_extractor` | Extract contact information |
|
|
294
294
|
| `schema_validator` | Validate data against schema |
|
|
295
295
|
| `required_fields_checker` | Check for required fields |
|
|
296
|
-
| `duplicate_remover` | Remove duplicate entries |
|
|
297
|
-
| `data_deduplication` | Advanced deduplication |
|
|
298
|
-
| `missing_data_handler` | Handle missing data |
|
|
299
|
-
| `data_type_validator` | Validate data types |
|
|
300
296
|
|
|
301
|
-
### 📊 Data Quality (
|
|
297
|
+
### 📊 Data Quality (0 tools)
|
|
302
298
|
|
|
303
|
-
|
|
304
|
-
| ---------------------- | ------------------------ |
|
|
305
|
-
| `outlier_detection` | Detect data outliers |
|
|
306
|
-
| `consistency_checker` | Check data consistency |
|
|
307
|
-
| `data_quality_metrics` | Generate quality metrics |
|
|
299
|
+
*Advanced data quality tools removed for optimization.*
|
|
308
300
|
|
|
309
|
-
### 🤖 AI-Powered Tools (
|
|
301
|
+
### 🤖 AI-Powered Tools (2 tools)
|
|
310
302
|
|
|
311
303
|
| Tool | Description |
|
|
312
304
|
| -------------------------- | --------------------------- |
|
|
313
305
|
| `smart_selector_generator` | Auto-generate CSS selectors |
|
|
314
306
|
| `content_classification` | Classify content type |
|
|
315
|
-
| `sentiment_analysis` | Analyze text sentiment |
|
|
316
|
-
| `summary_generator` | Generate content summaries |
|
|
317
|
-
| `translation_support` | Translate content |
|
|
318
307
|
|
|
319
308
|
### 🔎 Search & Filter (5 tools)
|
|
320
309
|
|
|
@@ -336,11 +325,10 @@ npm install -g brave-real-browser-mcp-server@latest
|
|
|
336
325
|
| `sitemap_parser` | Parse and navigate sitemaps |
|
|
337
326
|
| `breadcrumb_navigator` | Navigate using breadcrumbs |
|
|
338
327
|
|
|
339
|
-
### 🔒 Session Management (
|
|
328
|
+
### 🔒 Session Management (6 tools)
|
|
340
329
|
|
|
341
330
|
| Tool | Description |
|
|
342
331
|
| ----------------------- | -------------------------- |
|
|
343
|
-
| `cookie_manager` | Manage cookies |
|
|
344
332
|
| `session_persistence` | Persist sessions |
|
|
345
333
|
| `form_auto_fill` | Auto-fill forms |
|
|
346
334
|
| `ajax_content_waiter` | Wait for AJAX content |
|
|
@@ -348,25 +336,21 @@ npm install -g brave-real-browser-mcp-server@latest
|
|
|
348
336
|
| `login_session_manager` | Manage login sessions |
|
|
349
337
|
| `shadow_dom_extractor` | Extract Shadow DOM content |
|
|
350
338
|
|
|
351
|
-
### 📸 Visual Tools (
|
|
339
|
+
### 📸 Visual Tools (4 tools)
|
|
352
340
|
|
|
353
341
|
| Tool | Description |
|
|
354
342
|
| ---------------------- | --------------------------- |
|
|
355
|
-
| `full_page_screenshot` | Full page screenshot |
|
|
356
343
|
| `element_screenshot` | Screenshot specific element |
|
|
357
344
|
| `pdf_generation` | Generate PDF from page |
|
|
358
345
|
| `video_recording` | Record page as video |
|
|
359
|
-
| `visual_comparison` | Compare screenshots |
|
|
360
346
|
|
|
361
|
-
### 📈 Monitoring & Reporting (
|
|
347
|
+
### 📈 Monitoring & Reporting (3 tools)
|
|
362
348
|
|
|
363
349
|
| Tool | Description |
|
|
364
350
|
| ----------------------- | ------------------------- |
|
|
365
351
|
| `progress_tracker` | Track automation progress |
|
|
366
352
|
| `success_rate_reporter` | Report success rates |
|
|
367
|
-
| `data_quality_metrics` | Data quality metrics |
|
|
368
353
|
| `performance_monitor` | Monitor performance |
|
|
369
|
-
| `monitoring_summary` | Get monitoring summary |
|
|
370
354
|
|
|
371
355
|
### 🛡️ Advanced Extraction & Obfuscation (4 tools)
|
|
372
356
|
|
|
@@ -376,11 +360,8 @@ npm install -g brave-real-browser-mcp-server@latest
|
|
|
376
360
|
| `multi_layer_redirect_trace` | Trace multi-layer redirects |
|
|
377
361
|
| `ad_protection_detector` | Detect ad protection |
|
|
378
362
|
|
|
379
|
-
|
|
380
363
|
## 🔧 Environment Variables
|
|
381
364
|
|
|
382
|
-
|
|
383
|
-
|
|
384
365
|
You can configure the server using the local `.env` file directly.
|
|
385
366
|
|
|
386
367
|
Edit `.env` to set your preferences:
|
|
@@ -401,9 +382,9 @@ PROXY_URL=http://localhost:8080
|
|
|
401
382
|
|
|
402
383
|
## 📊 Supported Protocols
|
|
403
384
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
385
|
+
| Protocol | Used By | Auto-Config | Status |
|
|
386
|
+
| --------------- | --------------------------------------------- | ----------- | ---------- |
|
|
387
|
+
| **MCP (STDIO)** | Claude Desktop, Cursor, Windsurf, Cline, Warp | ✅ | 🟢 Working |
|
|
407
388
|
|
|
408
389
|
## 📄 License
|
|
409
390
|
|
|
@@ -5,82 +5,6 @@
|
|
|
5
5
|
import { getCurrentPage } from '../browser-manager.js';
|
|
6
6
|
import { validateWorkflow } from '../workflow-validation.js';
|
|
7
7
|
import { withErrorHandling } from '../system-utils.js';
|
|
8
|
-
/**
|
|
9
|
-
* Bullet lists और numbered lists से data extract करता है
|
|
10
|
-
*/
|
|
11
|
-
export async function handleExtractList(args) {
|
|
12
|
-
return await withErrorHandling(async () => {
|
|
13
|
-
validateWorkflow('extract_list', {
|
|
14
|
-
requireBrowser: true,
|
|
15
|
-
requirePage: true,
|
|
16
|
-
});
|
|
17
|
-
const page = getCurrentPage();
|
|
18
|
-
const selector = args.selector || 'ul, ol';
|
|
19
|
-
const includeNested = args.includeNested !== false;
|
|
20
|
-
const maxItems = args.maxItems || 500;
|
|
21
|
-
const listData = await page.evaluate(({ selector, includeNested, maxItems }) => {
|
|
22
|
-
const lists = document.querySelectorAll(selector);
|
|
23
|
-
const results = [];
|
|
24
|
-
lists.forEach((list) => {
|
|
25
|
-
const items = [];
|
|
26
|
-
const listType = list.tagName.toLowerCase();
|
|
27
|
-
let hasNested = false;
|
|
28
|
-
const extractItems = (element, depth = 0) => {
|
|
29
|
-
if (items.length >= maxItems)
|
|
30
|
-
return;
|
|
31
|
-
const children = Array.from(element.children);
|
|
32
|
-
children.forEach((child) => {
|
|
33
|
-
if (child.tagName.toLowerCase() === 'li') {
|
|
34
|
-
const text = Array.from(child.childNodes)
|
|
35
|
-
.filter((node) => node.nodeType === Node.TEXT_NODE)
|
|
36
|
-
.map((node) => node.textContent?.trim())
|
|
37
|
-
.filter((text) => text)
|
|
38
|
-
.join(' ');
|
|
39
|
-
if (text) {
|
|
40
|
-
const indent = ' '.repeat(depth);
|
|
41
|
-
items.push(`${indent}${text}`);
|
|
42
|
-
}
|
|
43
|
-
// Check for nested lists
|
|
44
|
-
const nestedList = child.querySelector('ul, ol');
|
|
45
|
-
if (nestedList && includeNested) {
|
|
46
|
-
hasNested = true;
|
|
47
|
-
extractItems(nestedList, depth + 1);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
};
|
|
52
|
-
extractItems(list);
|
|
53
|
-
if (items.length > 0) {
|
|
54
|
-
results.push({
|
|
55
|
-
items,
|
|
56
|
-
type: listType,
|
|
57
|
-
nested: hasNested,
|
|
58
|
-
count: items.length,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
return results;
|
|
63
|
-
}, { selector, includeNested, maxItems });
|
|
64
|
-
if (listData.length === 0) {
|
|
65
|
-
return {
|
|
66
|
-
content: [
|
|
67
|
-
{
|
|
68
|
-
type: 'text',
|
|
69
|
-
text: `❌ No lists found with selector "${selector}"`,
|
|
70
|
-
},
|
|
71
|
-
],
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
content: [
|
|
76
|
-
{
|
|
77
|
-
type: 'text',
|
|
78
|
-
text: `✅ Extracted ${listData.length} list(s)\n\n${JSON.stringify(listData, null, 2)}`,
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
};
|
|
82
|
-
}, 'Failed to extract list');
|
|
83
|
-
}
|
|
84
8
|
/**
|
|
85
9
|
* Page में embedded JSON/API data खोजता और extract करता है
|
|
86
10
|
*/
|
|
@@ -46,46 +46,4 @@ export async function handleHTMLToText(args) {
|
|
|
46
46
|
};
|
|
47
47
|
}, 'Failed to convert HTML to text');
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
* Repeated data filter करता है
|
|
51
|
-
*/
|
|
52
|
-
export async function handleDuplicateRemover(args) {
|
|
53
|
-
return await withErrorHandling(async () => {
|
|
54
|
-
const data = args.data;
|
|
55
|
-
const uniqueKey = args.uniqueKey;
|
|
56
|
-
let unique;
|
|
57
|
-
if (uniqueKey) {
|
|
58
|
-
// Remove duplicates based on specific key
|
|
59
|
-
const seen = new Set();
|
|
60
|
-
unique = data.filter((item) => {
|
|
61
|
-
const value = item[uniqueKey];
|
|
62
|
-
if (seen.has(value)) {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
seen.add(value);
|
|
66
|
-
return true;
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
// Remove duplicates based on entire object
|
|
71
|
-
const seen = new Set();
|
|
72
|
-
unique = data.filter((item) => {
|
|
73
|
-
const serialized = JSON.stringify(item);
|
|
74
|
-
if (seen.has(serialized)) {
|
|
75
|
-
return false;
|
|
76
|
-
}
|
|
77
|
-
seen.add(serialized);
|
|
78
|
-
return true;
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
const removed = data.length - unique.length;
|
|
82
|
-
return {
|
|
83
|
-
content: [
|
|
84
|
-
{
|
|
85
|
-
type: 'text',
|
|
86
|
-
text: `✅ Duplicates removed\n\nOriginal: ${data.length} items\nUnique: ${unique.length} items\nRemoved: ${removed} duplicates\n\n${JSON.stringify(unique, null, 2)}`,
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
};
|
|
90
|
-
}, 'Failed to remove duplicates');
|
|
91
|
-
}
|
|
49
|
+
// Duplicate Remover Arguments
|
|
@@ -1,76 +1,9 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import Ajv from 'ajv/dist/2020.js';
|
|
3
|
-
import * as crypto from 'crypto';
|
|
4
3
|
const ajv = new Ajv();
|
|
5
4
|
/**
|
|
6
5
|
* Data Deduplication - Remove duplicate entries from scraped data
|
|
7
6
|
*/
|
|
8
|
-
export async function handleDataDeduplication(args) {
|
|
9
|
-
const { data, uniqueKeys, fuzzyMatch = false, threshold = 0.9 } = args;
|
|
10
|
-
try {
|
|
11
|
-
if (!Array.isArray(data)) {
|
|
12
|
-
throw new Error('Data must be an array');
|
|
13
|
-
}
|
|
14
|
-
const unique = [];
|
|
15
|
-
const duplicates = [];
|
|
16
|
-
const seen = new Set();
|
|
17
|
-
data.forEach((item, index) => {
|
|
18
|
-
let key;
|
|
19
|
-
if (uniqueKeys && Array.isArray(uniqueKeys)) {
|
|
20
|
-
// Create composite key from specified fields
|
|
21
|
-
const keyParts = uniqueKeys.map(k => {
|
|
22
|
-
const value = typeof item === 'object' ? item[k] : item;
|
|
23
|
-
return String(value || '');
|
|
24
|
-
});
|
|
25
|
-
key = keyParts.join('|');
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
// Use entire object as key
|
|
29
|
-
key = JSON.stringify(item);
|
|
30
|
-
}
|
|
31
|
-
if (fuzzyMatch) {
|
|
32
|
-
// Normalize key for fuzzy matching
|
|
33
|
-
key = key.toLowerCase().replace(/\s+/g, ' ').trim();
|
|
34
|
-
}
|
|
35
|
-
const hash = crypto.createHash('md5').update(key).digest('hex');
|
|
36
|
-
if (seen.has(hash)) {
|
|
37
|
-
duplicates.push({ item, index, hash });
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
seen.add(hash);
|
|
41
|
-
unique.push(item);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
const dedupRate = ((duplicates.length / data.length) * 100).toFixed(2);
|
|
45
|
-
let summary = `Data Deduplication Results:\n\nStatistics:\n- Original Items: ${data.length}\n- Unique Items: ${unique.length}\n- Duplicates Found: ${duplicates.length}\n- Deduplication Rate: ${dedupRate}%`;
|
|
46
|
-
if (uniqueKeys) {
|
|
47
|
-
summary += `\n- Unique Keys Used: ${uniqueKeys.join(', ')}`;
|
|
48
|
-
}
|
|
49
|
-
summary += `\n- Fuzzy Matching: ${fuzzyMatch ? 'Enabled' : 'Disabled'}`;
|
|
50
|
-
if (duplicates.length > 0) {
|
|
51
|
-
summary += `\n\nSample Duplicates (Top 5):\n${duplicates.slice(0, 5).map((d, i) => `${i + 1}. Index ${d.index}: ${JSON.stringify(d.item).substring(0, 100)}...`).join('\n')}`;
|
|
52
|
-
}
|
|
53
|
-
return {
|
|
54
|
-
content: [
|
|
55
|
-
{
|
|
56
|
-
type: "text",
|
|
57
|
-
text: summary
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
catch (error) {
|
|
63
|
-
return {
|
|
64
|
-
content: [
|
|
65
|
-
{
|
|
66
|
-
type: "text",
|
|
67
|
-
text: `Data Deduplication Error: ${error.message}`
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
isError: true
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
7
|
/**
|
|
75
8
|
* Missing Data Handler - Detect and handle missing data
|
|
76
9
|
*/
|
|
@@ -147,77 +80,3 @@ export async function handleDataTypeValidator(args) {
|
|
|
147
80
|
/**
|
|
148
81
|
* Consistency Checker - Check data consistency across fields
|
|
149
82
|
*/
|
|
150
|
-
export async function handleConsistencyChecker(args) {
|
|
151
|
-
const { data, rules } = args;
|
|
152
|
-
try {
|
|
153
|
-
if (!Array.isArray(data)) {
|
|
154
|
-
throw new Error('Data must be an array');
|
|
155
|
-
}
|
|
156
|
-
if (!rules || !Array.isArray(rules)) {
|
|
157
|
-
if (!rules)
|
|
158
|
-
return { content: [{ type: "text", text: "No rules provided. Pass." }] };
|
|
159
|
-
throw new Error('Rules must be an array');
|
|
160
|
-
}
|
|
161
|
-
const report = {
|
|
162
|
-
totalItems: data.length,
|
|
163
|
-
passedItems: 0,
|
|
164
|
-
failedItems: 0,
|
|
165
|
-
failures: []
|
|
166
|
-
};
|
|
167
|
-
data.forEach((item, index) => {
|
|
168
|
-
let itemPassed = true;
|
|
169
|
-
const itemFailures = [];
|
|
170
|
-
rules.forEach((rule) => {
|
|
171
|
-
try {
|
|
172
|
-
if (rule.type === 'dependency') {
|
|
173
|
-
if (item[rule.field] && !item[rule.dependentField]) {
|
|
174
|
-
itemPassed = false;
|
|
175
|
-
itemFailures.push(`Field '${rule.field}' requires '${rule.dependentField}'`);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
else if (rule.type === 'value_match') {
|
|
179
|
-
if (item[rule.field] === rule.value && item[rule.targetField] !== rule.targetValue) {
|
|
180
|
-
itemPassed = false;
|
|
181
|
-
itemFailures.push(`When '${rule.field}' is '${rule.value}', '${rule.targetField}' must be '${rule.targetValue}'`);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
catch (e) {
|
|
186
|
-
itemPassed = false;
|
|
187
|
-
// @ts-ignore
|
|
188
|
-
itemFailures.push(`Rule execution error: ${e.message}`);
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
if (itemPassed) {
|
|
192
|
-
report.passedItems++;
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
report.failedItems++;
|
|
196
|
-
report.failures.push({
|
|
197
|
-
index,
|
|
198
|
-
item,
|
|
199
|
-
errors: itemFailures
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
});
|
|
203
|
-
return {
|
|
204
|
-
content: [
|
|
205
|
-
{
|
|
206
|
-
type: "text",
|
|
207
|
-
text: `Consistency Check Results:\nTotal: ${report.totalItems}\nPassed: ${report.passedItems}\nFailed: ${report.failedItems}\n\nFailures:\n${JSON.stringify(report.failures, null, 2)}`
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
catch (error) {
|
|
213
|
-
return {
|
|
214
|
-
content: [
|
|
215
|
-
{
|
|
216
|
-
type: "text",
|
|
217
|
-
text: `Consistency Checker Error: ${error.message}`
|
|
218
|
-
}
|
|
219
|
-
],
|
|
220
|
-
isError: true
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
}
|
|
@@ -49,81 +49,6 @@ export async function handleShadowDOMExtractor(args) {
|
|
|
49
49
|
/**
|
|
50
50
|
* Cookie Manager - Manage cookies
|
|
51
51
|
*/
|
|
52
|
-
export async function handleCookieManager(args) {
|
|
53
|
-
return await withErrorHandling(async () => {
|
|
54
|
-
validateWorkflow('cookie_manager', {
|
|
55
|
-
requireBrowser: true,
|
|
56
|
-
requirePage: true,
|
|
57
|
-
});
|
|
58
|
-
const page = getCurrentPage();
|
|
59
|
-
const action = args.action || 'get'; // get, set, delete, clear
|
|
60
|
-
if (action === 'get') {
|
|
61
|
-
const cookies = await page.cookies();
|
|
62
|
-
return {
|
|
63
|
-
content: [{
|
|
64
|
-
type: 'text',
|
|
65
|
-
text: `✅ Retrieved ${cookies.length} cookies\n\n${JSON.stringify(cookies, null, 2)}`,
|
|
66
|
-
}],
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
if (action === 'set') {
|
|
70
|
-
const cookie = args.cookie;
|
|
71
|
-
if (!cookie || !cookie.name || !cookie.value) {
|
|
72
|
-
throw new Error('Cookie name and value are required');
|
|
73
|
-
}
|
|
74
|
-
await page.setCookie({
|
|
75
|
-
name: cookie.name,
|
|
76
|
-
value: cookie.value,
|
|
77
|
-
domain: cookie.domain || new URL(page.url()).hostname,
|
|
78
|
-
path: cookie.path || '/',
|
|
79
|
-
expires: cookie.expires,
|
|
80
|
-
httpOnly: cookie.httpOnly || false,
|
|
81
|
-
secure: cookie.secure || false,
|
|
82
|
-
sameSite: cookie.sameSite || 'Lax',
|
|
83
|
-
});
|
|
84
|
-
return {
|
|
85
|
-
content: [{
|
|
86
|
-
type: 'text',
|
|
87
|
-
text: `✅ Cookie set: ${cookie.name} = ${cookie.value}`,
|
|
88
|
-
}],
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
if (action === 'delete') {
|
|
92
|
-
const cookieName = args.cookieName;
|
|
93
|
-
if (!cookieName) {
|
|
94
|
-
throw new Error('Cookie name is required');
|
|
95
|
-
}
|
|
96
|
-
const cookies = await page.cookies();
|
|
97
|
-
const cookieToDelete = cookies.find(c => c.name === cookieName);
|
|
98
|
-
if (cookieToDelete) {
|
|
99
|
-
await page.deleteCookie(cookieToDelete);
|
|
100
|
-
return {
|
|
101
|
-
content: [{
|
|
102
|
-
type: 'text',
|
|
103
|
-
text: `✅ Cookie deleted: ${cookieName}`,
|
|
104
|
-
}],
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
return {
|
|
108
|
-
content: [{
|
|
109
|
-
type: 'text',
|
|
110
|
-
text: `⚠️ Cookie not found: ${cookieName}`,
|
|
111
|
-
}],
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
if (action === 'clear') {
|
|
115
|
-
const cookies = await page.cookies();
|
|
116
|
-
await Promise.all(cookies.map(cookie => page.deleteCookie(cookie)));
|
|
117
|
-
return {
|
|
118
|
-
content: [{
|
|
119
|
-
type: 'text',
|
|
120
|
-
text: `✅ Cleared all ${cookies.length} cookies`,
|
|
121
|
-
}],
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
throw new Error(`Unknown action: ${action}`);
|
|
125
|
-
}, 'Failed to manage cookies');
|
|
126
|
-
}
|
|
127
52
|
/**
|
|
128
53
|
* Session Persistence - Save and restore browser session
|
|
129
54
|
*/
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
// Monitoring & Reporting Module
|
|
2
2
|
// Progress tracking, error logging, success rate reporting, metrics
|
|
3
3
|
// @ts-nocheck
|
|
4
|
-
import { getCurrentPage } from '../browser-manager.js';
|
|
5
|
-
import { validateWorkflow } from '../workflow-validation.js';
|
|
6
4
|
import { withErrorHandling } from '../system-utils.js';
|
|
7
5
|
// Global monitoring state
|
|
8
6
|
const monitoringState = {
|
|
@@ -116,87 +114,6 @@ export async function handleProgressTracker(args) {
|
|
|
116
114
|
/**
|
|
117
115
|
* Data Quality Metrics - Report data quality metrics
|
|
118
116
|
*/
|
|
119
|
-
export async function handleDataQualityMetrics(args) {
|
|
120
|
-
return await withErrorHandling(async () => {
|
|
121
|
-
validateWorkflow('data_quality_metrics', {
|
|
122
|
-
requireBrowser: true,
|
|
123
|
-
requirePage: true,
|
|
124
|
-
});
|
|
125
|
-
const page = getCurrentPage();
|
|
126
|
-
const data = args.data || [];
|
|
127
|
-
// Calculate metrics
|
|
128
|
-
const metrics = {
|
|
129
|
-
totalRecords: data.length,
|
|
130
|
-
completeRecords: 0,
|
|
131
|
-
incompleteRecords: 0,
|
|
132
|
-
emptyFields: 0,
|
|
133
|
-
duplicates: 0,
|
|
134
|
-
dataTypes: {},
|
|
135
|
-
fieldCompleteness: {},
|
|
136
|
-
};
|
|
137
|
-
if (data.length === 0) {
|
|
138
|
-
return {
|
|
139
|
-
content: [{
|
|
140
|
-
type: 'text',
|
|
141
|
-
text: `ℹ️ No data provided for quality metrics`,
|
|
142
|
-
}],
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
// Analyze data quality
|
|
146
|
-
const seenRecords = new Set();
|
|
147
|
-
const allFields = new Set();
|
|
148
|
-
data.forEach((record) => {
|
|
149
|
-
const recordStr = JSON.stringify(record);
|
|
150
|
-
// Check for duplicates
|
|
151
|
-
if (seenRecords.has(recordStr)) {
|
|
152
|
-
metrics.duplicates++;
|
|
153
|
-
}
|
|
154
|
-
else {
|
|
155
|
-
seenRecords.add(recordStr);
|
|
156
|
-
}
|
|
157
|
-
// Collect all fields
|
|
158
|
-
Object.keys(record).forEach(key => allFields.add(key));
|
|
159
|
-
// Check completeness
|
|
160
|
-
let hasAllFields = true;
|
|
161
|
-
Object.values(record).forEach(value => {
|
|
162
|
-
if (value === null || value === undefined || value === '') {
|
|
163
|
-
metrics.emptyFields++;
|
|
164
|
-
hasAllFields = false;
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
if (hasAllFields) {
|
|
168
|
-
metrics.completeRecords++;
|
|
169
|
-
}
|
|
170
|
-
else {
|
|
171
|
-
metrics.incompleteRecords++;
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
// Field completeness
|
|
175
|
-
allFields.forEach(field => {
|
|
176
|
-
const nonEmptyCount = data.filter((record) => {
|
|
177
|
-
const value = record[field];
|
|
178
|
-
return value !== null && value !== undefined && value !== '';
|
|
179
|
-
}).length;
|
|
180
|
-
metrics.fieldCompleteness[field] = ((nonEmptyCount / data.length) * 100).toFixed(2) + '%';
|
|
181
|
-
});
|
|
182
|
-
// Data type analysis
|
|
183
|
-
allFields.forEach(field => {
|
|
184
|
-
const types = new Set();
|
|
185
|
-
data.forEach((record) => {
|
|
186
|
-
const value = record[field];
|
|
187
|
-
types.add(typeof value);
|
|
188
|
-
});
|
|
189
|
-
metrics.dataTypes[field] = Array.from(types).join(', ');
|
|
190
|
-
});
|
|
191
|
-
const qualityScore = ((metrics.completeRecords / metrics.totalRecords) * 100).toFixed(2);
|
|
192
|
-
return {
|
|
193
|
-
content: [{
|
|
194
|
-
type: 'text',
|
|
195
|
-
text: `✅ Data Quality Metrics\n\nTotal Records: ${metrics.totalRecords}\nComplete Records: ${metrics.completeRecords}\nIncomplete Records: ${metrics.incompleteRecords}\nDuplicates: ${metrics.duplicates}\nEmpty Fields: ${metrics.emptyFields}\n\nQuality Score: ${qualityScore}%\n\nField Completeness:\n${JSON.stringify(metrics.fieldCompleteness, null, 2)}\n\nData Types:\n${JSON.stringify(metrics.dataTypes, null, 2)}`,
|
|
196
|
-
}],
|
|
197
|
-
};
|
|
198
|
-
}, 'Failed data quality metrics');
|
|
199
|
-
}
|
|
200
117
|
/**
|
|
201
118
|
* Performance Monitor - Monitor browser and page performance
|
|
202
119
|
*/
|
|
@@ -6,58 +6,6 @@ import { sleep } from '../system-utils.js';
|
|
|
6
6
|
/**
|
|
7
7
|
* Full Page Screenshot - Capture entire page
|
|
8
8
|
*/
|
|
9
|
-
export async function handleFullPageScreenshot(args) {
|
|
10
|
-
const { url, outputPath, format = 'png', quality = 90, fullPage = true } = args;
|
|
11
|
-
try {
|
|
12
|
-
const page = getPageInstance();
|
|
13
|
-
if (!page) {
|
|
14
|
-
throw new Error('Browser not initialized. Call browser_init first.');
|
|
15
|
-
}
|
|
16
|
-
if (url && page.url() !== url) {
|
|
17
|
-
await page.goto(url, { waitUntil: 'networkidle2', timeout: 30000 });
|
|
18
|
-
}
|
|
19
|
-
// Ensure output directory exists
|
|
20
|
-
if (outputPath) {
|
|
21
|
-
const dir = path.dirname(outputPath);
|
|
22
|
-
await fs.mkdir(dir, { recursive: true });
|
|
23
|
-
}
|
|
24
|
-
const screenshotOptions = {
|
|
25
|
-
path: outputPath,
|
|
26
|
-
type: format,
|
|
27
|
-
fullPage
|
|
28
|
-
};
|
|
29
|
-
if (format === 'jpeg') {
|
|
30
|
-
screenshotOptions.quality = quality;
|
|
31
|
-
}
|
|
32
|
-
await page.screenshot(screenshotOptions);
|
|
33
|
-
// Get file stats if saved
|
|
34
|
-
let fileSize = 0;
|
|
35
|
-
if (outputPath) {
|
|
36
|
-
const stats = await fs.stat(outputPath);
|
|
37
|
-
fileSize = stats.size;
|
|
38
|
-
}
|
|
39
|
-
const resultText = `✅ Screenshot captured successfully\n\nPath: ${outputPath}\nFormat: ${format}\nFull Page: ${fullPage}\nFile Size: ${(fileSize / 1024).toFixed(2)} KB\nTimestamp: ${new Date().toISOString()}`;
|
|
40
|
-
return {
|
|
41
|
-
content: [
|
|
42
|
-
{
|
|
43
|
-
type: 'text',
|
|
44
|
-
text: resultText,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
return {
|
|
51
|
-
content: [
|
|
52
|
-
{
|
|
53
|
-
type: 'text',
|
|
54
|
-
text: `❌ Screenshot failed: ${error.message}`,
|
|
55
|
-
},
|
|
56
|
-
],
|
|
57
|
-
isError: true,
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
9
|
/**
|
|
62
10
|
* Element Screenshot - Capture specific element
|
|
63
11
|
*/
|
package/dist/index.js
CHANGED
|
@@ -26,29 +26,29 @@ import { handleClick, handleType, handleSolveCaptcha, handleRandomScroll, } from
|
|
|
26
26
|
import { handleGetContent, handleFindSelector, } from "./handlers/content-handlers.js";
|
|
27
27
|
import { handleSaveContentAsMarkdown } from "./handlers/file-handlers.js";
|
|
28
28
|
// Import new data extraction handlers
|
|
29
|
-
import {
|
|
29
|
+
import { handleExtractJSON, handleScrapeMetaTags, handleExtractSchema, } from "./handlers/data-extraction-handlers.js";
|
|
30
30
|
// Import multi-element handlers
|
|
31
31
|
import { handleBatchElementScraper, handleNestedDataExtraction, handleAttributeHarvester, handleLinkHarvester, handleMediaExtractor, } from "./handlers/multi-element-handlers.js";
|
|
32
32
|
// Import pagination handlers
|
|
33
33
|
import { handleMultiPageScraper, handleBreadcrumbNavigator, } from "./handlers/pagination-handlers.js";
|
|
34
34
|
// Import data processing handlers
|
|
35
|
-
import { handleHTMLToText,
|
|
35
|
+
import { handleHTMLToText, } from "./handlers/data-processing-handlers.js";
|
|
36
36
|
// Import AI-powered handlers
|
|
37
37
|
import { handleSmartSelectorGenerator, handleContentClassification, } from "./handlers/ai-powered-handlers.js";
|
|
38
38
|
// Import search & filter handlers
|
|
39
39
|
import { handleKeywordSearch, handleRegexPatternMatcher, handleXPathSupport, handleAdvancedCSSSelectors, handleVisualElementFinder, } from "./handlers/search-filter-handlers.js";
|
|
40
40
|
// Import data quality handlers
|
|
41
|
-
import {
|
|
41
|
+
import { handleDataTypeValidator, } from "./handlers/data-quality-handlers.js";
|
|
42
42
|
// Import captcha handlers
|
|
43
43
|
import { handleOCREngine, handleAudioCaptchaSolver, handlePuzzleCaptchaHandler, } from "./handlers/captcha-handlers.js";
|
|
44
44
|
// Import visual tools handlers
|
|
45
|
-
import {
|
|
45
|
+
import { handleElementScreenshot, handleVideoRecording, } from "./handlers/visual-tools-handlers.js";
|
|
46
46
|
// Import smart data extractors
|
|
47
47
|
import { handleHtmlElementsExtractor, handleTagsFinder, handleLinksFinder, handleXpathLinks, handleAjaxExtractor, handleFetchXHR, handleNetworkRecorder, handleRegexPatternFinder, handleIframeExtractor, handleEmbedPageExtractor, handleImageExtractorAdvanced, handleVideoSourceExtractor, handleUrlRedirectTracer, handleUserAgentExtractor, } from "./handlers/smart-data-extractors.js";
|
|
48
48
|
// Import dynamic session handlers
|
|
49
|
-
import { handleShadowDOMExtractor,
|
|
49
|
+
import { handleShadowDOMExtractor, handleFormAutoFill, handleAjaxContentWaiter, } from "./handlers/dynamic-session-handlers.js";
|
|
50
50
|
// Import monitoring & reporting handlers
|
|
51
|
-
import { handleProgressTracker,
|
|
51
|
+
import { handleProgressTracker, } from "./handlers/monitoring-reporting-handlers.js";
|
|
52
52
|
// Import advanced video & media handlers
|
|
53
53
|
import { handleVideoLinkFinder, handleVideoDownloadButton, handleVideoPlayPushSource, handleVideoPlayButtonClick, } from "./handlers/advanced-video-media-handlers.js";
|
|
54
54
|
// Import advanced extraction handlers (Ad-bypass & Obfuscation)
|
|
@@ -139,9 +139,6 @@ export async function executeToolByName(name, args) {
|
|
|
139
139
|
result = await handleSaveContentAsMarkdown(args);
|
|
140
140
|
break;
|
|
141
141
|
// Smart Data Extractors
|
|
142
|
-
case TOOL_NAMES.EXTRACT_LIST:
|
|
143
|
-
result = await handleExtractList(args || {});
|
|
144
|
-
break;
|
|
145
142
|
case TOOL_NAMES.EXTRACT_JSON:
|
|
146
143
|
result = await handleExtractJSON(args || {});
|
|
147
144
|
break;
|
|
@@ -180,9 +177,6 @@ export async function executeToolByName(name, args) {
|
|
|
180
177
|
case TOOL_NAMES.HTML_TO_TEXT:
|
|
181
178
|
result = await handleHTMLToText(args);
|
|
182
179
|
break;
|
|
183
|
-
case TOOL_NAMES.DUPLICATE_REMOVER:
|
|
184
|
-
result = await handleDuplicateRemover(args);
|
|
185
|
-
break;
|
|
186
180
|
// AI-Powered Features
|
|
187
181
|
case TOOL_NAMES.SMART_SELECTOR_GENERATOR:
|
|
188
182
|
result = await handleSmartSelectorGenerator(args);
|
|
@@ -207,9 +201,6 @@ export async function executeToolByName(name, args) {
|
|
|
207
201
|
result = await handleVisualElementFinder(args);
|
|
208
202
|
break;
|
|
209
203
|
// Data Quality & Validation
|
|
210
|
-
case TOOL_NAMES.DATA_DEDUPLICATION:
|
|
211
|
-
result = await handleDataDeduplication(args);
|
|
212
|
-
break;
|
|
213
204
|
case TOOL_NAMES.DATA_TYPE_VALIDATOR:
|
|
214
205
|
result = await handleDataTypeValidator(args);
|
|
215
206
|
break;
|
|
@@ -224,9 +215,6 @@ export async function executeToolByName(name, args) {
|
|
|
224
215
|
result = await handlePuzzleCaptchaHandler(args);
|
|
225
216
|
break;
|
|
226
217
|
// Screenshot & Visual Tools
|
|
227
|
-
case TOOL_NAMES.FULL_PAGE_SCREENSHOT:
|
|
228
|
-
result = await handleFullPageScreenshot(args);
|
|
229
|
-
break;
|
|
230
218
|
case TOOL_NAMES.ELEMENT_SCREENSHOT:
|
|
231
219
|
result = await handleElementScreenshot(args);
|
|
232
220
|
break;
|
|
@@ -280,9 +268,6 @@ export async function executeToolByName(name, args) {
|
|
|
280
268
|
case "shadow_dom_extractor":
|
|
281
269
|
result = await handleShadowDOMExtractor(args || {});
|
|
282
270
|
break;
|
|
283
|
-
case "cookie_manager":
|
|
284
|
-
result = await handleCookieManager(args);
|
|
285
|
-
break;
|
|
286
271
|
case "form_auto_fill":
|
|
287
272
|
result = await handleFormAutoFill(args);
|
|
288
273
|
break;
|
|
@@ -293,9 +278,6 @@ export async function executeToolByName(name, args) {
|
|
|
293
278
|
case "progress_tracker":
|
|
294
279
|
result = await handleProgressTracker(args || {});
|
|
295
280
|
break;
|
|
296
|
-
case "data_quality_metrics":
|
|
297
|
-
result = await handleDataQualityMetrics(args || {});
|
|
298
|
-
break;
|
|
299
281
|
// Advanced Video & Media Download Tools
|
|
300
282
|
case "video_link_finder":
|
|
301
283
|
result = await handleVideoLinkFinder(args || {});
|
package/dist/tool-definitions.js
CHANGED
|
@@ -331,18 +331,6 @@ export const TOOLS = [
|
|
|
331
331
|
},
|
|
332
332
|
},
|
|
333
333
|
// Smart Data Extractors
|
|
334
|
-
{
|
|
335
|
-
name: 'extract_list',
|
|
336
|
-
description: 'Extract data from bullet lists and numbered lists',
|
|
337
|
-
inputSchema: {
|
|
338
|
-
type: 'object',
|
|
339
|
-
properties: {
|
|
340
|
-
selector: { type: 'string', default: 'ul, ol' },
|
|
341
|
-
includeNested: { type: 'boolean', default: true },
|
|
342
|
-
maxItems: { type: 'number', default: 500 },
|
|
343
|
-
},
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
334
|
{
|
|
347
335
|
name: 'extract_json',
|
|
348
336
|
description: 'Extract embedded JSON/API data from the page',
|
|
@@ -483,18 +471,6 @@ export const TOOLS = [
|
|
|
483
471
|
},
|
|
484
472
|
},
|
|
485
473
|
// Data Validation Tools
|
|
486
|
-
{
|
|
487
|
-
name: 'duplicate_remover',
|
|
488
|
-
description: 'Remove duplicate items from an array',
|
|
489
|
-
inputSchema: {
|
|
490
|
-
type: 'object',
|
|
491
|
-
properties: {
|
|
492
|
-
data: { type: 'array' },
|
|
493
|
-
uniqueKey: { type: 'string' },
|
|
494
|
-
},
|
|
495
|
-
required: ['data'],
|
|
496
|
-
},
|
|
497
|
-
},
|
|
498
474
|
// AI-Powered Features (5 tools)
|
|
499
475
|
{
|
|
500
476
|
name: 'smart_selector_generator',
|
|
@@ -593,20 +569,6 @@ export const TOOLS = [
|
|
|
593
569
|
},
|
|
594
570
|
},
|
|
595
571
|
// Data Quality & Validation (5 tools)
|
|
596
|
-
{
|
|
597
|
-
name: 'data_deduplication',
|
|
598
|
-
description: 'Remove duplicate entries from scraped data',
|
|
599
|
-
inputSchema: {
|
|
600
|
-
type: 'object',
|
|
601
|
-
properties: {
|
|
602
|
-
data: { type: 'array' },
|
|
603
|
-
uniqueKeys: { type: 'array', items: { type: 'string' } },
|
|
604
|
-
fuzzyMatch: { type: 'boolean', default: false },
|
|
605
|
-
threshold: { type: 'number', default: 0.9 },
|
|
606
|
-
},
|
|
607
|
-
required: ['data'],
|
|
608
|
-
},
|
|
609
|
-
},
|
|
610
572
|
{
|
|
611
573
|
name: 'data_type_validator',
|
|
612
574
|
description: 'Validate data types against JSON schema',
|
|
@@ -619,18 +581,6 @@ export const TOOLS = [
|
|
|
619
581
|
required: ['data', 'schema'],
|
|
620
582
|
},
|
|
621
583
|
},
|
|
622
|
-
{
|
|
623
|
-
name: 'consistency_checker',
|
|
624
|
-
description: 'Check data consistency across fields',
|
|
625
|
-
inputSchema: {
|
|
626
|
-
type: 'object',
|
|
627
|
-
properties: {
|
|
628
|
-
data: { type: 'array' },
|
|
629
|
-
rules: { type: 'array', description: 'Validation rules' },
|
|
630
|
-
},
|
|
631
|
-
required: ['data', 'rules'],
|
|
632
|
-
},
|
|
633
|
-
},
|
|
634
584
|
// Advanced Captcha Handling (3 tools)
|
|
635
585
|
{
|
|
636
586
|
name: 'ocr_engine',
|
|
@@ -673,21 +623,6 @@ export const TOOLS = [
|
|
|
673
623
|
},
|
|
674
624
|
},
|
|
675
625
|
// Screenshot & Visual Tools (5 tools)
|
|
676
|
-
{
|
|
677
|
-
name: 'full_page_screenshot',
|
|
678
|
-
description: 'Capture entire page screenshot',
|
|
679
|
-
inputSchema: {
|
|
680
|
-
type: 'object',
|
|
681
|
-
properties: {
|
|
682
|
-
url: { type: 'string' },
|
|
683
|
-
outputPath: { type: 'string' },
|
|
684
|
-
format: { type: 'string', enum: ['png', 'jpeg'], default: 'png' },
|
|
685
|
-
quality: { type: 'number', default: 90 },
|
|
686
|
-
fullPage: { type: 'boolean', default: true },
|
|
687
|
-
},
|
|
688
|
-
required: ['outputPath'],
|
|
689
|
-
},
|
|
690
|
-
},
|
|
691
626
|
{
|
|
692
627
|
name: 'element_screenshot',
|
|
693
628
|
description: 'Capture screenshot of specific element',
|
|
@@ -870,18 +805,6 @@ export const TOOLS = [
|
|
|
870
805
|
},
|
|
871
806
|
},
|
|
872
807
|
},
|
|
873
|
-
{
|
|
874
|
-
name: 'cookie_manager',
|
|
875
|
-
description: 'Manage cookies (get, set, delete, clear)',
|
|
876
|
-
inputSchema: {
|
|
877
|
-
type: 'object',
|
|
878
|
-
properties: {
|
|
879
|
-
action: { type: 'string', enum: ['get', 'set', 'delete', 'clear'], default: 'get' },
|
|
880
|
-
cookie: { type: 'object' },
|
|
881
|
-
cookieName: { type: 'string' },
|
|
882
|
-
},
|
|
883
|
-
},
|
|
884
|
-
},
|
|
885
808
|
{
|
|
886
809
|
name: 'form_auto_fill',
|
|
887
810
|
description: 'Automatically fill form fields',
|
|
@@ -922,16 +845,6 @@ export const TOOLS = [
|
|
|
922
845
|
},
|
|
923
846
|
},
|
|
924
847
|
},
|
|
925
|
-
{
|
|
926
|
-
name: 'data_quality_metrics',
|
|
927
|
-
description: 'Report data quality metrics',
|
|
928
|
-
inputSchema: {
|
|
929
|
-
type: 'object',
|
|
930
|
-
properties: {
|
|
931
|
-
data: { type: 'array' },
|
|
932
|
-
},
|
|
933
|
-
},
|
|
934
|
-
},
|
|
935
848
|
// Advanced Video & Media Download Tools
|
|
936
849
|
{
|
|
937
850
|
name: 'video_link_finder',
|
|
@@ -1083,8 +996,6 @@ export const TOOL_NAMES = {
|
|
|
1083
996
|
RANDOM_SCROLL: 'random_scroll',
|
|
1084
997
|
FIND_SELECTOR: 'find_selector',
|
|
1085
998
|
SAVE_CONTENT_AS_MARKDOWN: 'save_content_as_markdown',
|
|
1086
|
-
// Smart Data Extractors
|
|
1087
|
-
EXTRACT_LIST: 'extract_list',
|
|
1088
999
|
EXTRACT_JSON: 'extract_json',
|
|
1089
1000
|
SCRAPE_META_TAGS: 'scrape_meta_tags',
|
|
1090
1001
|
EXTRACT_SCHEMA: 'extract_schema',
|
|
@@ -1113,7 +1024,6 @@ export const TOOL_NAMES = {
|
|
|
1113
1024
|
BREADCRUMB_NAVIGATOR: 'breadcrumb_navigator',
|
|
1114
1025
|
// Data Processing
|
|
1115
1026
|
HTML_TO_TEXT: 'html_to_text',
|
|
1116
|
-
DUPLICATE_REMOVER: 'duplicate_remover',
|
|
1117
1027
|
// AI-Powered Features
|
|
1118
1028
|
SMART_SELECTOR_GENERATOR: 'smart_selector_generator',
|
|
1119
1029
|
CONTENT_CLASSIFICATION: 'content_classification',
|
|
@@ -1128,14 +1038,12 @@ export const TOOL_NAMES = {
|
|
|
1128
1038
|
ADVANCED_CSS_SELECTORS: 'advanced_css_selectors',
|
|
1129
1039
|
VISUAL_ELEMENT_FINDER: 'visual_element_finder',
|
|
1130
1040
|
// Data Quality & Validation
|
|
1131
|
-
DATA_DEDUPLICATION: 'data_deduplication',
|
|
1132
1041
|
DATA_TYPE_VALIDATOR: 'data_type_validator',
|
|
1133
1042
|
// Advanced Captcha Handling
|
|
1134
1043
|
OCR_ENGINE: 'ocr_engine',
|
|
1135
1044
|
AUDIO_CAPTCHA_SOLVER: 'audio_captcha_solver',
|
|
1136
1045
|
PUZZLE_CAPTCHA_HANDLER: 'puzzle_captcha_handler',
|
|
1137
1046
|
// Screenshot & Visual Tools
|
|
1138
|
-
FULL_PAGE_SCREENSHOT: 'full_page_screenshot',
|
|
1139
1047
|
ELEMENT_SCREENSHOT: 'element_screenshot',
|
|
1140
1048
|
VIDEO_RECORDING: 'video_recording',
|
|
1141
1049
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brave-real-browser-mcp-server",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.5",
|
|
4
4
|
"description": "Universal AI IDE MCP Server - Auto-detects and supports all AI IDEs (Claude Desktop, Cursor, Windsurf, Cline, Zed, VSCode, Qoder AI, etc.) with Brave browser automation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|