bwb-browser
A lightweight 30KB MCP browser automation server that uses raw Chrome DevTools Protocol to enable AI agents to browse the web, take screenshots, interact with elements, and capture live page events like console logs and network requests.
README
bwb-browser
Browser Without Bloat — 76KB. 25 tools. Zero dependencies. Runs on your phone.
A lightweight MCP server that gives any AI agent browser superpowers. Written by a guy in India on Termux because the existing tools were 200MB of "why."
The Pitch (60 seconds)
Every other MCP browser tool ships a full browser binary. Playwright MCP? ~250MB. Puppeteer MCP? ~400MB. Chrome DevTools MCP? ~350MB.
bwb uses raw Chrome DevTools Protocol (CDP) — the same protocol Chrome speaks natively. It auto-detects the browser already on your system. No downloads. No binary mismatches. No "why is my disk full" panic.
| Factor | bwb | Playwright MCP | Puppeteer MCP |
|---|---|---|---|
| Source size | 76KB | ~50MB+ | ~100MB+ |
| Total install | ~1MB | ~250MB | ~400MB |
| Bundled browser | None | Chromium (~200MB) | Chromium (~300MB) |
| Works on Termux/Android | ✅ Yes | ❌ | ❌ |
| Zero deps (no node_modules hell) | ✅ Yes | ❌ | ❌ |
| Live event streaming | ✅ | ❌ | ❌ |
| Natural language interaction | ✅ | ❌ | ❌ |
| Persistent sessions | ✅ | ❌ | ❌ |
| CPU profile at idle | Basically nothing | 🐌 | 🐌 |
🔥 The Features That Actually Matter
1. browser_act — Talk to the Browser Like a Human
browser_act({instruction: "search for laptops under a thousand dollars"})
No findElement hell. No chaining 10 calls. bwb parses what you want, finds the right elements, interacts, and returns the result. Pure DOM heuristics — no LLM dependency, no API costs, no "the AI is thinking..." spinner.
2. browser_watch — See What the Page Is Doing
This is the one feature nobody else has. Your agent can listen to the page:
browser_watch({action: "start", events: ["console", "network"]})
// ... do stuff ...
const events = browser_watch({action: "poll"})
// → [{type: "console", text: "React mounted"}, {type: "network", url: "https://api.example.com/data", status: 200}]
Console logs. Network requests. JS exceptions. Page navigations. Your agent isn't flying blind anymore.
3. "Login Once, Agent Works for Days"
// Monday: Login
browser_saveCookies({name: "gmail"})
// Wednesday: Still logged in. Fresh browser. Zero fuss.
browser_loadCookies({name: "gmail"})
browser_goto({url: "https://gmail.com"}) // Already authenticated
Sessions persist across agent restarts, server restarts, even across different machines.
4. browser_diagnose — Lighthouse for Your AI Agent
One call gets you: performance metrics, console errors, broken images, meta tags, interaction count, and a health score. Your agent can self-diagnose instead of guessing.
5. Multi-Tab & Sessions
Create tabs, close them, switch between them, save cookies, load them back. Like a real browser. Because it is one.
6. Realistic Browser Profile
Normalizes navigator.webdriver, plugins, languages, and user-agent for testing environments. Not "stealth mode" — just honest fingerprint normalization so your tests actually match real user conditions.
Quick Install
npm install -g bwb-browser
bwb --version
# → bwb-browser 3.0.0
Done. If you have Chrome/Chromium anywhere on your system, bwb finds it. No config files. No environment variables. Just works.
On Termux/Android:
pkg install chromium # One-time
npm install -g bwb-browser
bwb
Yes, this runs on a phone. Yes, it's fully functional. Yes, I built it this way on purpose.
All 25 Tools
| Tool | Description |
|---|---|
browser_act |
🔥 Natural language — "search for X", "click the button", "what's on this page" |
browser_watch |
🔥 Live event capture — console, network, errors, navigation |
browser_diagnose |
🔥 Full page health check — perf, errors, broken images, score |
browser_fingerprint |
🔥 Realistic browser profile for testing |
browser_goto |
Navigate to a URL |
browser_screenshot |
Take a screenshot |
browser_html |
Get page/selector HTML |
browser_text |
Get page/selector text |
browser_title |
Get page title |
browser_url |
Get current URL |
browser_back |
Go back in history |
browser_click |
Click an element (native CDP) |
browser_fill |
Fill an input field (native CDP) |
browser_elements |
List interactive elements |
browser_eval |
Execute JavaScript |
browser_setViewport |
Change viewport size |
browser_waitForSelector |
Wait for element to appear/disappear |
browser_newTab |
Create new tab |
browser_closeTab |
Close a tab |
browser_switchTab |
Switch to a tab |
browser_listTabs |
List all tabs |
browser_saveCookies |
Save session to disk |
browser_loadCookies |
Load session from disk |
browser_listSessions |
List saved sessions |
browser_status |
Browser connection info |
browser_restart |
Restart the browser |
Where It Runs
| Platform | Status | Notes |
|---|---|---|
| Termux/Android | ✅ Verified | pkg install chromium, that's it |
| Linux | ✅ Verified | Auto-detects Chrome/Chromium |
| macOS | ✅ Verified | Auto-detects Chrome.app |
| Windows | ✅ Verified | Auto-detects Chrome.exe |
| CI (GitHub Actions) | ✅ Verified | Uses system Chrome |
| Docker | ✅ Verified | Just need Chrome in container |
| Your Raspberry Pi | ✅ Why not | Same npm install |
MCP Agent Integration
Add this to any MCP-compatible agent's config:
{
"mcpServers": {
"bwb": {
"command": "bwb"
}
}
}
Works with: Claude Code, OpenCode, Antigravity CLI, Cline, Continue.dev, Aider, Codex CLI, Cody, Windsurf, Cursor — literally anything that speaks MCP.
See AGENTS.md for copy-paste configs for each one.
The Backstory
I built this because I was tired of every browser automation tool assuming you have 400MB to spare and a desktop-class machine. I work from my phone sometimes. Termux exists. Why shouldn't browser automation work there too?
So I did what any reasonable person would do: I ignored all the existing solutions and wrote my own, using nothing but raw CDP — the protocol Chrome speaks natively. No wrappers. No abstractions. Just JSON messages over WebSocket.
The result is 76KB of source code that does what 400MB of dependencies do. It's not better code — it's less code. And sometimes less is all you need.
— Krish Tiwari (@krshforever), somewhere on an Indian train, writing code on a phone
Roadmap
- bwb Cloud — hosted browser instances so your agent has a browser even when your laptop's asleep
browser_actv2 — multi-step with feedback loops (not just "search for X" but "research this topic and summarize")- Recording & Replay — record sessions, replay them, debug them
- Browser pool — multiple isolated instances for CI parallelization
Support
If bwb saves you time, money, or a few brain cells:
No gating. No "pro" tier. No bait-and-switch. The code is MIT forever. If you can't or won't pay, that's genuinely fine — I built this because I wanted it to exist.
License
MIT — Krish Tiwari (@krshforever)
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。