browser-for-claude
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-for-claude go to example.com and read the main heading"
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.
An MCP server that gives Claude control of a real, headed Chromium browser via Playwright. It exposes a small set of tools — navigate, click, type, read text, screenshot, run JS, get URL, close — so Claude can drive a live browser session instead of just reading static content.
Features
Isolated from your real browser — Claude never touches your everyday Chrome. See Privacy & Isolation below.
Headed Chromium — the browser window is visible, not run in the background, so you can watch what Claude does in real time.
Persistent session — the same browser/page stays open across tool calls until explicitly closed, so multi-step flows (navigate → click → type → screenshot) act on one continuous session.
Minimal surface — eight tools, each a thin wrapper over one Playwright action.
Related MCP server: Browser AI MCP Server
Privacy & Isolation
This is not your everyday Chrome — it's a completely separate, throwaway browser instance:
Different binary. Playwright launches its own bundled Chromium (installed via
npx playwright install chromium), not the Chrome app on your machine.No shared profile. Each session starts from
browser.newContext()— a brand-new, blank browsing context. It does not read your Chrome profile directory, so there's no access to your bookmarks, saved passwords, browsing history, extensions, or cookies.No Google account. Because the context starts blank, any site you're logged into in your real browser (Google, GitHub, etc.) shows up logged out here — Claude has no way to see or use your existing sessions.
Nothing persists across restarts.
browser_close(or the process exiting) discards the context entirely; nothing is written back to disk for next time.
In short: Claude can look at and click around a real, live web page, but it's working in its own sandboxed browser with a clean slate — never your personal one.
Tools
Tool | Description |
| Navigate the headed Chromium window to a URL |
| Click an element matching a CSS selector |
| Fill a text input matching a CSS selector |
| Read the text content of an element matching a CSS selector |
| Capture a PNG screenshot of the current page |
| Evaluate a JavaScript expression in the page context and return the result |
| Return the current page URL |
| Close the Chromium window and end the session |
Requirements
Node.js 20+
npm
Setup
npm install
npx playwright install chromium
npm run buildUsage
Standalone
npm startThis starts the MCP server on stdio (dist/server.js). It's meant to be launched by an MCP client, not run interactively on its own.
With Claude Code
Add it as an MCP server, e.g. via a .mcp.json in your project:
{
"mcpServers": {
"browser-for-claude": {
"command": "node",
"args": ["dist/server.js"]
}
}
}Claude Code will then discover the browser_* tools automatically.
Development
npm run build # compile TypeScript (src -> dist)
npm run smoke-test # launch a real browser and exercise every tool against example.comThe smoke test (test/smoke-test.ts) is an end-to-end check: it navigates to a real page, reads text, evaluates JS, takes a screenshot, and confirms that clicking a missing selector throws — all against a live Chromium instance rather than mocks.
Project structure
src/
server.ts MCP server: registers the browser_* tools
browserController.ts Playwright session management (launch/navigate/click/type/...)
test/
smoke-test.ts End-to-end smoke test against example.comHow it works
browserController.ts lazily launches a single headed Chromium browser, context, and page on first use, and keeps reusing them across tool calls until browser_close is called. A launch guard (launchInFlight) ensures concurrent tool calls can't race into launching two separate browser instances.
Caveats
Only one browser session is supported at a time (no multi-tab/multi-context support).
The isolation described above (see Privacy & Isolation) cuts both ways: if a task genuinely needs an already-logged-in site, you'll need to log in manually within the session first — there's no way to reuse credentials from your regular browser.
Intended for local/trusted use —
browser_evaluateruns arbitrary JavaScript in the page with no sandboxing beyond what the browser itself provides.
License
No license specified.
Available Tools
8 toolsbrowser_clickClick elementC
Click an element matching a CSS selector
Inputs: selector (required), timeoutMs.
browser_closeClose browserA
Close the Chromium window and end the session
Inputs: no named parameters.
browser_evaluateEvaluate JSB
Evaluate a JavaScript expression in the page context and return the result
Inputs: script (required).
browser_get_textGet element textA
Read the text content of an element matching a CSS selector
Inputs: selector (required).
browser_get_urlGet current URLA
Return the current page URL
Inputs: no named parameters.
browser_screenshotScreenshotA
Capture a PNG screenshot of the current page
Inputs: no named parameters.
browser_typeType textC
Fill a text input matching a CSS selector
Inputs: text (required), selector (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose: navigating, clicking, typing, reading text, evaluating JS, taking screenshots, getting the URL, and closing the browser. There is no ambiguity or overlap.
All tools share the 'browser_' prefix and follow a consistent verb-based pattern (navigate, click, type, get_text, evaluate, get_url, close). 'browser_screenshot' is the only deviation but still reads as an action.
With 8 tools, the set is appropriately scoped for browser automation, covering session management, navigation, interaction, inspection, and evaluation. Each tool earns its place.
The set covers core browser workflows, but lacks explicit back/forward/refresh or wait commands. However, browser_evaluate can compensate for these missing operations, making gaps minor.
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
A real browser for your agent: screenshots, page checks, Markdown and PDFs.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables browser automation and web interaction control through Playwright, allowing Claude Code to navigate, click, fill forms, take screenshots, and manage sessions.68 npm9MIT
- AlicenseNot gradedqualityDmaintenanceEnables natural language browser automation through Claude, wrapping Playwright to execute commands like navigation, clicking, form filling, and screenshots.8 npm30MIT
- FlicenseNot gradedqualityCmaintenanceDrives a real Chromium browser with Playwright, providing a live, clickable view of the page for the model to browse and the user to interact with.2-
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to control a browser via Playwright for web scraping, automation, and research, with features like navigation, screenshots, form filling, and PDF export.24 npmMIT