feat: MCP Browser - servidor MCP para automação de navegador com Playwright

This commit is contained in:
2026-03-25 10:16:14 -03:00
commit c1d716bb84
24 changed files with 2803 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
const browser = require('../browser');
module.exports = async ({ selector = 'body' }) => {
await browser.start();
const p = await browser.ensurePage();
const text = await p.evaluate((sel) => {
const el = document.querySelector(sel);
if (!el) return null;
const t = el.innerText || el.textContent || '';
return t.trim() || null;
}, selector);
return {
success: true,
action: "get_text",
selector,
text
};
};