dev-browser-mcp
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., "@dev-browser-mcp navigate to github.com and take a screenshot of the login page"
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.
dev-browser-mcp
MCP server for SawyerHood/dev-browser. Agents drive a persistent Chromium (or an already-running Chrome) with sandboxed JavaScript and a small set of structured tools.
Repository: github.com/kamkozlowski/dev-browser-mcp
Scripts run in QuickJS, not Node.js. Named pages persist across tool calls through the dev-browser daemon.
dev-browser (CLI + Playwright Chromium) is a dependency of this package. npm install downloads the CLI and installs Chromium. No global dev-browser install is required. Set DEV_BROWSER_SKIP_CHROMIUM=1 to skip the Chromium download (for example when you only attach to an existing Chrome). DEV_BROWSER_BIN still overrides the bundled CLI.
Install
Clone and build:
git clone https://github.com/kamkozlowski/dev-browser-mcp.git
cd dev-browser-mcp
npm install
npm run buildOr install from the GitHub tarball:
npm pack github:kamkozlowski/dev-browser-mcp
tar -xzf dev-browser-mcp-*.tgz
cd package
npm install
npm run buildRelated MCP server: CloakBrowser MCP
Cursor config
Add to ~/.cursor/mcp.json (or project .cursor/mcp.json).
Recommended: bootstrap from GitHub (cache under ~/.cache)
No local clone needed. On first launch Cursor downloads the package, installs dependencies, builds, and starts the server:
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"/ABS/PATH/TO/dev-browser-mcp/scripts/bootstrap-mcp.sh"
],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}If you do not keep a local clone, use this one-liner (same logic as scripts/bootstrap-mcp.sh):
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"-lc",
"CACHE=\"${XDG_CACHE_HOME:-$HOME/.cache}/dev-browser-mcp\"; LOCK=\"$CACHE/.install.lock\"; PKG=\"$CACHE/package\"; ENTRY=\"$PKG/dist/index.js\"; mkdir -p \"$CACHE\"; install() { cd \"$CACHE\" && rm -rf package dev-browser-mcp-*.tgz && npm pack github:kamkozlowski/dev-browser-mcp >/dev/null && tar -xzf dev-browser-mcp-*.tgz && rm -f dev-browser-mcp-*.tgz && cd package && npm install && npm run build; }; if [ ! -f \"$ENTRY\" ]; then ( flock -n 9 || flock 9; [ -f \"$ENTRY\" ] || install ) 9>\"$LOCK\"; fi; [ -f \"$ENTRY\" ] || { echo \"Install failed; rm -rf $CACHE\" >&2; exit 1; }; cd \"$PKG\" && exec node dist/index.js"
],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}If the server fails to start with Cannot find module .../dist/index.js, remove the broken cache and retry:
rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/dev-browser-mcp"To attach to your running Chrome instead of launching Chromium:
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"-lc",
"CACHE=\"${XDG_CACHE_HOME:-$HOME/.cache}/dev-browser-mcp\"; LOCK=\"$CACHE/.install.lock\"; PKG=\"$CACHE/package\"; ENTRY=\"$PKG/dist/index.js\"; mkdir -p \"$CACHE\"; install() { cd \"$CACHE\" && rm -rf package dev-browser-mcp-*.tgz && npm pack github:kamkozlowski/dev-browser-mcp >/dev/null && tar -xzf dev-browser-mcp-*.tgz && rm -f dev-browser-mcp-*.tgz && cd package && npm install && npm run build; }; if [ ! -f \"$ENTRY\" ]; then ( flock -n 9 || flock 9; [ -f \"$ENTRY\" ] || install ) 9>\"$LOCK\"; fi; [ -f \"$ENTRY\" ] || { echo \"Install failed; rm -rf $CACHE\" >&2; exit 1; }; cd \"$PKG\" && exec node dist/index.js"
],
"env": {
"DEV_BROWSER_CONNECT": "auto",
"DEV_BROWSER_SKIP_CHROMIUM": "true"
}
}
}
}Enable remote debugging in Chrome at chrome://inspect/#remote-debugging, or launch with --remote-debugging-port=9222.
Local clone (simple)
After npm install and npm run build in your checkout:
{
"mcpServers": {
"dev-browser": {
"command": "node",
"args": ["/ABS/PATH/TO/dev-browser-mcp/dist/index.js"],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}Local clone (self-bootstrapping, bash)
Cursor installs and builds on first launch if dist/ is missing:
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"-lc",
"REPO=\"/ABS/PATH/TO/dev-browser-mcp\"; if [ ! -f \"$REPO/dist/index.js\" ]; then cd \"$REPO\" && npm install && npm run build; fi; cd \"$REPO\" && exec node dist/index.js"
],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}Replace REPO with your checkout path.
Development (TypeScript, no build)
{
"mcpServers": {
"dev-browser": {
"command": "bash",
"args": [
"-lc",
"REPO=\"/ABS/PATH/TO/dev-browser-mcp\"; cd \"$REPO\" && exec npx --yes tsx src/index.ts"
],
"env": {
"DEV_BROWSER_HEADLESS": "true"
}
}
}
}Replace REPO with your checkout path.
Tools
Tool | Purpose |
| Main tool. Execute a sandboxed Playwright script. |
| List tabs: |
| Get/create a named page (or attach by targetId) |
| Close a named page |
| Navigate |
| AI accessibility snapshot ( |
| PNG screenshot (also returned as an image) |
| Click by CSS selector or snapshot ref |
| Fill an input |
| Type character by character |
|
|
| Wait for a selector |
| Daemon status |
| Managed browser instances |
| Stop the daemon |
| Install Playwright Chromium |
Read dev-browser://guide for the full sandbox API, including page.cua (vision) and page.domCua (DOM ids).
Environment
Variable | Meaning |
| Override the bundled |
|
|
| Named daemon browser instance (default: |
|
|
|
|
|
|
| Script timeout in seconds (default: |
| Close idle launched browsers, e.g. |
Per-call browser, connect, headless, ignoreHttpsErrors, and timeoutSeconds override the environment.
How it differs from Playwright MCP
dev-browser is built around one sandboxed script per decision, not a long chain of atomic MCP calls. Use dev_browser_run for anything beyond a single goto/click/fill. Convenience tools exist so common inspect/act steps stay structured.
Unlike benkraus/dev-browser-mcp (Chrome extension + CDP relay), this server wraps the official dev-browser CLI with its QuickJS sandbox and persistent daemon pages.
Development
npm test
npm run typecheck
npm run buildAvailable Tools
16 toolsdev_browser_browsersList browsersARead-only
List daemon-managed browser instances and their named pages.
Inputs: no named parameters.
dev_browser_clickClickC
Click an element by CSS selector or snapshotRef from dev_browser_snapshot (e.g. e12).
Inputs: browser, connect, headless, pageName, +5 more.
dev_browser_close_pageClose named pageB
Close and unregister a named page.
Inputs: name (required), browser, connect, headless, +2 more.
dev_browser_evaluateEvaluate JavaScriptB
Evaluate JavaScript in the page. Pass a browser-side expression or statements.
Inputs: code (required), browser, connect, headless, +3 more.
dev_browser_fillFillB
Fill an input by CSS selector or snapshotRef. Replaces existing value.
Inputs: value (required), browser, connect, headless, +6 more.
dev_browser_gotoNavigateA
Navigate a named page to a URL. Prefer waitUntil=domcontentloaded for local dev servers.
Inputs: url (required), browser, connect, headless, +5 more.
dev_browser_installInstall ChromiumA
Install the Playwright Chromium build used by daemon-launched browsers.
Inputs: no named parameters.
dev_browser_list_pagesList pagesARead-only
List named pages and open browser tabs: [{id, url, title, name}].
Inputs: browser, connect, headless, timeoutSeconds, +1 more.
dev_browser_page_openOpen named pageA
Get or create a named page (or attach to a tab by targetId from list_pages) and return url/title.
Inputs: name (required), browser, connect, headless, +2 more.
dev_browser_runRun browser scriptA
Run a sandboxed JavaScript script against a persistent browser (SawyerHood/dev-browser).
This is the main tool. Prefer it whenever you need more than a single navigation/click/fill.
Sandbox is QuickJS, not Node.js: no require/import/fs/fetch/process. Available: browser.getPage(nameOrId), browser.newPage(), browser.listPages(), browser.closePage(name) saveScreenshot(buf, name), writeFile(name, data), readFile(name), console.*, setTimeout Pages are Playwright Page objects (goto, click, fill, locator, evaluate, screenshot, snapshotForAI, getByRef, getByRole, waitForSelector, waitForURL, cua, domCua).
Write small scripts. Named pages persist. End with console.log of the next-decision state. On local dev servers use { waitUntil: "domcontentloaded" }.
Inputs: script (required), browser, connect, headless, +2 more.
dev_browser_screenshotScreenshotARead-only
Take a PNG screenshot of a named page and return the image plus the saved path under ~/.dev-browser/tmp/.
Inputs: browser, connect, fullPage, headless, +3 more.
dev_browser_snapshotAI snapshotBRead-only
Return an AI-friendly accessibility snapshot. Use refs like e12 with getByRef in a later run, or pass snapshotRef to click/fill/type.
Inputs: depth, track, browser, connect, +5 more.
dev_browser_statusDaemon statusARead-only
Show the dev-browser daemon status, idle timeout, and managed browsers.
Inputs: no named parameters.
dev_browser_stopStop daemonADestructive
Stop the dev-browser daemon and close every browser it launched.
Inputs: no named parameters.
dev_browser_typeTypeC
Type into an element character by character, by CSS selector or snapshotRef.
Inputs: text (required), browser, connect, headless, +6 more.
dev_browser_wait_for_selectorWait for selectorC
Wait until a selector reaches the given state on a named page.
Inputs: selector (required), state, browser, connect, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Each tool has a distinct purpose: run sandboxed scripts, manage pages, navigate, interact, take snapshots, evaluate JS, etc. Only minor overlap between fill and type, but descriptions clarify the difference. No ambiguity that would cause an agent to misselect.
All tools use the 'dev_browser_' prefix with snake_case, but a few names break the consistent verb_noun pattern: 'dev_browser_browsers' is a noun, and 'dev_browser_page_open' reverses the order. Most others follow 'verb_noun' like 'close_page', 'list_pages', making it mostly consistent but not perfect.
16 tools is well-scoped for a browser automation MCP server. It covers page lifecycle, navigation, interaction, scripting, and daemon management without feeling bloated or incomplete. Each tool earns its place.
The tool set covers core browser automation tasks: navigation, clicks, fills, screenshots, snapshots, evaluation, waits, and page management. Missing are explicit tools for options selection, hover, or keyboard actions, but these can be handled via the 'dev_browser_run' sandbox script. Minor gap, but overall comprehensive.
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables agents to control an existing Chromium browser or isolated Playwright profile through 50 tools for reading, interacting with, navigating, capturing, transferring files, and coordinating tabs, with per-site permissions and one-use approvals.5MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to drive a Chromium-based browser for web research, testing, and automation with Playwright-compatible tools, persistent profiles, proxy matching, extension loading, and humanized input across local or containerized deployments.335 npmMIT
- AlicenseBqualityBmaintenanceEnables AI agents to control Chromium-based browsers via CDP with 36 tools for navigation, input, screenshots, accessibility inspection, network monitoring, device emulation, and performance tracing.36MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a running Brave/Chromium browser through 33 tools for tab management, DOM inspection, form interaction, screenshots, and console/network capture without closing or relaunching the browser.510 npmMIT