feat: MCP Browser v3.0 - 42 tools with stealth mode, multi-tab, PDF, cookies, storage, network logs, device emulation

This commit is contained in:
2026-03-27 11:58:52 -03:00
parent c1d716bb84
commit 13f7392555
48 changed files with 1269 additions and 714 deletions
+5 -17
View File
@@ -2,22 +2,10 @@ const browser = require('../browser');
module.exports = async () => {
await browser.start();
const p = await browser.ensurePage();
const buttons = await p.evaluate(() => {
const elements = Array.from(document.querySelectorAll('button, input[type="submit"], input[type="button"], [role="button"], a.btn, a.button'));
return elements.map(el => ({
text: (el.innerText || el.value || el.getAttribute('aria-label') || '').trim(),
type: el.tagName.toLowerCase(),
id: el.id || null
})).filter(b => b.text !== '');
const buttons = await browser.evaluateJS(() => {
return Array.from(document.querySelectorAll('button, input[type="submit"], input[type="button"], [role="button"], a.btn, a.button'))
.map(el => ({ text: (el.innerText || el.value || el.getAttribute('aria-label') || '').trim(), type: el.tagName.toLowerCase(), id: el.id || null }))
.filter(b => b.text !== '');
});
return {
success: true,
action: "get_buttons",
count: buttons.length,
buttons
};
return { success: true, action: 'get_buttons', count: buttons.length, buttons };
};