browser-ai
Enables AI agents to control the Brave browser via the Chrome DevTools Protocol, allowing them to navigate tabs, read page content, click, type, take screenshots, download PDFs, and run JavaScript.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@browser-ai open example.com and take a screenshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
browser-ai
Dê ao seu agente de IA um navegador de verdade pra operar.
browser-ai é um servidor MCP (stdio, biblioteca padrão pura — zero dependências) que
deixa um agente de IA (Codex, Claude Code, Cursor…) controlar o Chrome: ler a
página, clicar, digitar, navegar e tirar screenshot. Ele fala CDP (Chrome
DevTools Protocol) direto com o navegador — então não instala extensão
nenhuma: você sobe o Chrome com a porta de depuração e o agente assume a aba.
Como funciona
Agente (Codex) ──MCP/stdio──► web-ai ──CDP──► Chrome (porta 9222) ──► a abaRelated MCP server: @nimbus21.ai/chrome-devtools-mcp
Passo 1 — subir o Chrome com a porta de debug
Use um perfil dedicado (mantém a automação longe do seu perfil do dia a dia):
google-chrome --remote-debugging-port=9222 \
--user-data-dir="$HOME/.browser-ai-profile"(Qualquer navegador Chromium serve: chromium, brave, edge. Para rodar sem janela,
acrescente --headless=new.)
Passo 2 — conferir a conexão
cd browser-ai
python3 -m webai doctor # ✓ Chrome reachable ... N tab(s) open
python3 -m webai tabs # lista as abas abertasPasso 3 — plugar no Codex
No ~/.codex/config.toml:
[mcp_servers.browser-ai]
command = "python3"
args = ["-m", "webai", "mcp"]
# rode o Codex a partir da pasta browser-ai, OU instale com `pip install -e .`
# e use: command = "web-ai" args = ["mcp"]Depois de pip install -e . o comando web-ai fica no PATH e dá para apontar de
qualquer lugar. Em outros clientes MCP o formato é o mesmo:
{ "mcpServers": { "browser-ai": { "command": "web-ai", "args": ["mcp"] } } }Ferramentas expostas ao agente
Ferramenta | O que faz |
| Lista as abas (id, título, url). |
| Abre uma aba (opcionalmente numa URL). |
| Fecha uma aba pelo id. |
| Navega uma aba para uma URL. |
| Texto visível da página (+ título e url). |
|
|
| Clica por seletor CSS ou pelo texto visível. |
| Digita num campo (seletor), com |
| Espera um elemento aparecer. |
| Roda JavaScript na página (a ferramenta "coringa"). |
| PNG da aba (para IAs com visão). |
| Salva a página atual como PDF e retorna o caminho do arquivo. |
| Traz uma aba para frente / torna ativa, pelo id. |
| Volta uma entrada no histórico da aba (botão Voltar). |
| Avança uma entrada no histórico da aba (botão Avançar). |
Toda ferramenta aceita target_id para escolher a aba; sem ele, usa a primeira.
Segurança
web_evalexecuta JS arbitrário na página — é o que torna o agente realmente útil, mas é poderoso. Desligue comWEBAI_NO_EVAL=1(ouWEBAI_ALLOW_EVAL=0) em máquina compartilhada/sensível.Use sempre um
--user-data-dirdedicado. Não aponte para o perfil onde você fica logado em banco, e-mail etc., a menos que seja proposital.A porta de debug (9222) dá controle total do navegador a quem alcançá-la. Deixe em
127.0.0.1e não exponha na rede.
Variáveis de ambiente
Variável | Padrão | Para quê |
|
| Host da porta de debug. |
|
| Porta de debug do Chrome. |
| — |
|
|
| Pasta padrão dos PDFs de |
| — |
|
Testes
python3 -m pytest -q # 11 testes, sem precisar de Chrome abertoLicença
MIT.
Available Tools
15 toolsweb_backA
Go back one entry in the tab's history (like the browser's Back button).
Inputs: target_id.
web_clickA
Click an element by CSS 'selector', or the first clickable element whose visible text contains 'text'.
Inputs: text, selector, target_id.
web_close_tabC
Close a tab by id.
Inputs: target_id (required).
web_download_pdfA
Save the current page as a PDF and return the file path. Optional 'path' (a file or a folder); defaults to ~/Downloads named after the page title.
Inputs: path, target_id.
web_evalB
Run arbitrary JavaScript in the page and return the result. The power tool; can be disabled with WEBAI_NO_EVAL.
Inputs: expression (required), target_id.
web_forwardB
Go forward one entry in the tab's history (like the browser's Forward button).
Inputs: target_id.
web_htmlC
Get outerHTML of the page, or of the element matching 'selector'.
Inputs: selector, max_chars, target_id.
web_new_tabB
Open a new tab, optionally at a URL. Returns its id.
Inputs: url.
web_readB
Read the visible text of the page (document.body.innerText), with title and URL.
Inputs: max_chars, target_id.
web_screenshotC
Capture a PNG screenshot of the tab.
Inputs: target_id.
web_switch_tabC
Bring a tab to the front / make it active, by id.
Inputs: target_id (required).
web_tabsA
List the open browser tabs (id, title, url).
Inputs: no named parameters.
web_typeB
Type 'text' into the input/textarea matching 'selector'. Set submit=true to submit the form.
Inputs: selector (required), text, submit, target_id.
web_waitA
Wait until an element matching 'selector' appears (polls), up to timeout_seconds.
Inputs: selector (required), target_id, timeout_seconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Each tool maps to a distinct browser action: tab lifecycle (list/new/close/switch), history (back/forward), navigation, inspection (read/html/eval/screenshot/pdf), and interaction (click/type/wait). The only mild overlap is web_eval versus web_read/web_html, but eval's arbitrary-JS purpose is clearly differentiated. An agent can reliably pick the right tool for a given intent.
All tools share a consistent 'web_' snake_case prefix, which makes the set instantly recognizable. Minor deviation: some names are verbs (web_click, web_navigate) while others are nouns (web_tabs, web_screenshot, web_html), but the convention remains readable and predictable.
Fifteen tools is well within the sweet spot and each one earns its place by covering a real browser primitive. There is no redundancy or filler in the surface.
Core lifecycle is fully covered: tab management, navigation, history, content extraction, interaction, waiting, and export (screenshot/PDF). Notable gaps remain for common automation needs — hover, select-option for dropdowns, keyboard key presses, scrolling, and iframe/frame targeting — which agents may have to work around via web_eval.
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to control the Google Chrome browser through a Node.js WebSocket bridge and a dedicated browser extension. It provides tools for capturing screenshots, executing JavaScript, managing tabs, and extracting page content via the MCP protocol.2-
- AlicenseNot gradedqualityDmaintenanceLets AI coding agents control and inspect a live Chrome browser via MCP, providing Chrome DevTools capabilities for automation, debugging, and performance analysis.25 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to control Chrome browser actions like navigation, clicking, form filling, screenshots, and console/network logging via an MCP server and Chrome extension.688 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to control and interact with a Chrome browser via MCP, providing tools for navigation, screenshots, clicking, form filling, content extraction, and tab management.1-