About Browser4agent
Browser4agent is an MCP server published by mantou132 in the Blockchain category: expose browser tab reading, browser control, and page tool execution to user-configured AI agents through a local MCP service. Conduid read 12 tools from its source: debugger_detach, debugger_send_command, execute_script, execute_script_in_background, execute_tab_tool, get_cookies and 6 more. No package is published for it, so it installs from a source checkout.
The repository has 44 stars and 6 forks, and its last commit was on 24 Nov 2026. Conduid has no tagged release on record for it. Its topics include browser-automation and browser-extension.
Install
git clone https://github.com/mantou132/browser4agentTools (12)
debugger_detach(Chromium-only) End the CDP debugging session and dismiss the yellow banner. Idempotent.debugger_send_command(Chromium-only, last resort) Send a raw Chrome DevTools Protocol command when dedicated tools and page/background scripts cannot provide required lower-level data such as network response bodies or protocol diagnostics. Attaches automatically (Chrome shows a yellow debugging banner; fails while DevTools is open). For event-driven domains: enable the domain, read and save debuggerEvents(tab_id).cursor as a baseline, trigger the action, then read debuggerEvents in execute_script_in_background and keep only events whose seq is at least the baseline. Run required follow-up commands such as Network.getResponseBody before calling debugger_detach. More domains can be enabled without re-attaching. Warning: Debugger.pause blocks the page until Debugger.resume.execute_scriptRun custom JavaScript inside the given tab. Use ONLY after read_tab shows no matching page tool, or read_active_tab shows none for the current page. For site-specific actions, prefer execute_tab_tool instead.execute_script_in_backgroundRun a JavaScript function in the extension's background service worker and return its result. Use this for one-shot browser-level operations such as opening/closing tabs and windows (chrome.tabs.create/remove, chrome.windows.create/remove) or controlling downloads. For read-only tasks, check list_tabs and reuse a matching open tab instead of opening a URL. Tabs created via chrome.tabs.create are automatically organized into the 'B4A' tab group and default to quiet background tabs (active: false, collapsed: true) unless active: true is explicitly requested. Both chrome.* and browser.* namespaces are proxied for Promise-style calls whose arguments and results are JSON-serializable. Event-listener callbacks and persistent background work are not supported; timers are dropped when the function returns, so await your sleeps. This cannot access page DOM or quit the browser process. Use debugger_send_command, not browser event listeners, for Chromium network observation. setTimeout/setInterval (+clear), queueMicrotask, captured console logs, and basic URL parsing are available. On Chromium, debuggerEvents(tab_id) returns that tab's { attached, cursor, events: [{method, params, time, seq}] }, or null before any debugging session.execute_tab_toolInvoke a discovered page tool on the given tab. For the current page, call read_active_tab directly; with a known tab ID call read_tab; only use list_tabs first when the target is unknown. From the selected tools[] item, pass toolsetId as toolset_id, name as tool_name, and args matching inputSchema exactly. Do not guess. Prefer this over execute_script whenever the tab has a matching tool. Reuse the discovery result while the same document is loaded; read again after navigation.get_cookiesFetch the browser's cookies for the given URL's domain. Use this to access login-protected pages that aren't currently open in the browser: grab the cookies, then issue a plain HTTP request with them.get_errorsFetch page errors from the given tab: JS exceptions, unhandled promise rejections, and CSP violations. Use this for debugging.get_local_storageRead the localStorage of the given tab (long values are truncated). Use this to inspect the page's locally persisted state.list_tabsList every open tab in the browser. Returns each tab's id, title, active flag, last-accessed time, and URL. Use this to find the target tab ID, including before opening a URL for a read-only task: reuse an already-open matching tab instead of creating a new one. For the current page use read_active_tab directly.read_active_tabRead a condensed HTML snapshot of the active tab in the current window. Returns tabId, title, URL, content, and page tools. Each tools[] item contains toolsetId, name, description, and inputSchema for use with execute_tab_tool. Use this when the user asks about "the current page" — no list_tabs or follow-up read_tab is needed first. Content over 20,000 characters is saved to a local file and returned as contentFile (path) and contentLength instead of content; prefer a matching page tool, otherwise read or search the file, or pass inline_content: true.read_tabRead a condensed HTML snapshot of the given tab. Also returns the page tools available on this tab. Each tools[] item contains toolsetId, name, description, and inputSchema for use with execute_tab_tool. If the tab ID is unknown, find it with list_tabs; do not open a new tab just to read a page the user already has open. Content over 20,000 characters is saved to a local file and returned as contentFile (path) and contentLength instead of content; prefer a matching page tool, otherwise read or search the file, or pass inline_content: true.screenshot_tabScreenshot the given tab and return an image (default JPEG for lower token usage and latency; the CLI saves it to a temporary file and prints the path). Use list_tabs first only when its ID is unknown. On Chromium, background tabs and windows that are not visible are captured through CDP without switching tabs (briefly shows the debugging banner); a background tab CDP cannot attach to is activated instead. On Firefox the tab is activated first.Security checks
6 checks have not been run yet.