Web Browser MCP Server
Powers web_search and web_research by querying DuckDuckGo for result titles, unwrapped URLs, and snippets, with automatic fallback to another search engine when needed.
Drives a real Google Chrome browser via Playwright, supporting persistent sessions, navigation, page reading, screenshots, tab management, and user-like interactions such as clicking and filling forms.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π Web Browser MCP Server
A Python Model Context Protocol (MCP) server that drives a real Chrome browser with Playwright β research the web in parallel, read and interact with any website using deterministic element refs, and keep your LinkedIn profile updated with human-in-the-loop confirmation.
π Table of Contents
Related MCP server: MCP Playwright Server
β¨ Features
Area | What It Provides |
Parallel Web Research |
|
Any Website Navigation & Reading | Open URLs, follow redirects, inspect paged text (with |
Element Ref Targeting |
|
Persistent Browser Profiles | Each |
LinkedIn Profile Management | Read structured profile sections ( |
Built-in Guardrails | Refuses to type into password, card-number, or OTP fields; gates submit/save/send/delete actions and all LinkedIn edits behind preview + |
stdio & HTTP Transports | Runs over |
Works on any site you use in Chrome, for example:
Job portals (Naukri, LinkedIn Jobs, Indeed): search jobs, read descriptions, compare roles; clicking Apply requires confirmation.
Webmail (Gmail, Outlook): read and summarize unread threads or draft replies; clicking Send requires confirmation.
Docs, blogs, GitHub: read long pages in chunks, extract links, capture screenshots.
Web forms: fill inputs and dropdowns by ref; submitting requires confirmation.
βοΈ How It Works
AI Client (Claude, Cursor, Antigravity, Windsurf, Cline)
β
β MCP (stdio by default, or streamable-http / sse)
βΌ
web_browser_mcp.server (FastMCP β 34 tools + /health)
βββ BrowserManager (browser_manager.py)
β βββ Persistent Playwright Chromium/Chrome/Edge contexts per session_name
β βββ URL policy check (http/https only, allowlist/blocklist)
β βββ Snapshot DOM walker -> assigns short refs (e1, e2, ...) + dialog scoping
β βββ Submit/secret heuristics -> gates mutating clicks, blocks password/OTP fills
βββ Web Research (web_research.py)
β βββ DuckDuckGo HTML -> automatic Bing fallback on bot check
β βββ Unwraps search redirect URLs (uddg / base64 u=)
β βββ Concurrent background tabs extract main readable article text
βββ LinkedInHelper + WriteLimiter (linkedin.py, config.py)
βββ Reads profile sections and opens native section edit dialogs
βββ Enforces preview-before-save (confirm=true) + post-save verification
βββ Persists daily edit count & cooldown across restartsSession & Profile Lifecycle: Calling any tool starts (or reuses) the named
session_namebrowser context using installed Google Chrome (BROWSER_CHANNEL=chrome), Microsoft Edge (msedge), or Playwright's bundled Chromium (chromium). Each session stores cookies and local storage under~/.web-browser-mcp/<session_name>.Deterministic Ref Targeting:
browser_snapshotinspects visible interactive controls in the DOM and stores locator metadata on the session. Subsequentbrowser_click,browser_fill, orbrowser_select_optioncalls resolveref="e12"directly, and stale refs after navigation tell the client to re-snapshot.Human-in-the-Loop Confirmation: When
browser_clicktargets a button matching save/submit/send/post/delete/buy/apply heuristics (or when any LinkedIn edit tool is called withoutconfirm=true), the server stops and returns a preview so the user can approve before the action runs.Parallel Research:
web_researchexecutesweb_search, unwraps tracking links, and opens background tabs concurrently withasyncio.gatherto extract clean article text while flagging sign-in walls or CAPTCHAs.
π‘οΈ Safety Model
Protection | How It Works |
You sign in, not the AI |
|
Preview before every change | LinkedIn tools return current vs. new text first and only save when called again with |
Enter follows the same gate | Pressing Enter where it would submit a form or send a message ( |
Tool annotations | Read-only tools carry |
Site pop-ups follow the same gate | JavaScript |
Rate limiting on LinkedIn | Enforces a daily cap (default 20 edits/day) and minimum cooldown (default 10 s between edits), persisted on disk across server restarts. |
No CAPTCHA bypassing | Bot challenges are reported to the user; |
URL & download guardrails |
|
Local-first defaults | Profiles stay in |
π Project Layout
web-browser-mcp/
βββ src/web_browser_mcp/
β βββ __init__.py # Package version
β βββ __main__.py # `python -m web_browser_mcp` entry point
β βββ server.py # FastMCP instance, 34 tools, /health, CLI transport setup
β βββ browser_manager.py # Persistent Playwright contexts, snapshots, refs, click/fill guards
β βββ web_research.py # Search engine fallback, redirect unwrapping, parallel tab reader
β βββ linkedin.py # LinkedIn login check, profile reader, section editors
β βββ config.py # Environment settings, URL policy, persistent WriteLimiter
βββ tests/
β βββ fake_site.py # Local HTTP mock server (pages, search engines, LinkedIn UI)
β βββ test_web_browser_mcp.py
βββ pyproject.toml # Hatchling build config + `web-browser-mcp` console script
βββ Dockerfile # Headless Chromium container (HTTP mode, LinkedIn disabled)
βββ mcpize.yaml # Hosted HTTP runtime config
βββ smithery.yaml # Smithery stdio configπ¦ Installation
Requires Python 3.10+, uv, and Google Chrome (or Microsoft Edge, or set BROWSER_CHANNEL=chromium and run uv run playwright install chromium).
git clone https://github.com/Pawangunjkar/web-browser-mcp.git
cd web-browser-mcp
uv sync # or: pip install -e .Verify the server starts over stdio (Ctrl+C to stop):
uv run web-browser-mcpπ Configuring Your AI Client
Claude Code
claude mcp add web-browser -- uv --directory /absolute/path/to/web-browser-mcp run --frozen web-browser-mcpClaude Desktop / Cursor / Antigravity / Windsurf / Cline
{
"mcpServers": {
"web-browser": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/web-browser-mcp", "run", "--frozen", "web-browser-mcp"],
"env": {
"BROWSER_CHANNEL": "chrome"
}
}
}
}Offline / enterprise startup alternative (skip uv on every start):
Point your client directly at the virtual environment's Python interpreter so startup never contacts PyPI:
{
"mcpServers": {
"web-browser": {
"command": "C:\\AI_Workspaces\\Anti_Workspace\\web-browser-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "web_browser_mcp"],
"env": {
"BROWSER_CHANNEL": "chrome"
}
}
}
}(On macOS/Linux use /absolute/path/to/web-browser-mcp/.venv/bin/python.)
On Windows, use an escaped path such as C:\\AI_Workspaces\\Anti_Workspace\\web-browser-mcp.
π First Run: Sign In to LinkedIn
Ask your assistant: "Open LinkedIn login." β it calls
linkedin_open_loginand opens a visible Chrome window.Sign in yourself in that window (email, password, any 2-step code) and optionally tick "Keep me signed in".
Ask: "Check my LinkedIn login." β
linkedin_check_loginverifies the session and reports your profile URL.
Because the browser profile persists on disk, you stay signed in across restarts. To wipe a saved profile and sign out everywhere, call browser_clear_profile(confirm=true).
π¬ Example Prompts
"Read my LinkedIn profile and suggest a stronger headline for a senior DevOps / platform engineer. Show me options first."
"Rewrite my About section to highlight Kubernetes, CI/CD, and MCP servers I've built. Keep it under 2,000 characters and show the preview."
"Add Terraform, Argo CD, and GitHub Actions to my LinkedIn skills if they're missing."
"Research best practices for Kubernetes canary rollouts and summarize the top sources."
"Open Naukri, search for Senior DevOps Engineer jobs in Pune with 8+ years, and list the top 10 with company and salary."
"Open my Gmail and summarize today's unread emails."
"Open the Playwright Python docs, find how persistent contexts work, and take a screenshot."
π§° Complete Tool Reference (34 tools)
Every tool accepts an optional session_name (default "default"). Each session maintains its own persistent browser profile.
Category 1: Browser Sessions (5)
Tool | Description |
| Start a session ( |
| Close a running session (keeps the saved profile on disk). |
| Close all active sessions. |
| List running sessions, open tabs, active page, and profile directories. |
| Delete a saved profile directory. Requires |
Category 2: Navigation (5)
Tool | Description |
| Open a URL in the active tab (enforces URL scheme and domain policies). |
| History navigation and page reload. |
| Wait for text, a selector, or a URL change (useful after manual sign-in). |
Category 3: Reading Pages (4)
Tool | Description |
| Read visible text of the page or a selector, paginated via |
| List interactive elements with short refs ( |
| List page links, optionally filtered by substring. |
| Capture viewport, full page, or a specific ref as a JPEG image (full-page shots stop at 7,500 px so AI clients accept them). |
Category 4: Interacting (6)
Tool | Description |
| Click by |
| Type into an input (optionally press Enter; Enter that would submit or send needs |
| Select a dropdown option by label or value (case-insensitive); lists the available options when nothing matches. |
| Press a key or shortcut ( |
| Move the mouse over an element by |
| Scroll |
Category 5: Tabs (4)
Tool | Description |
| Inspect and manage tabs; links that open popups/new tabs switch automatically. |
Category 6: Web Research (3)
Tool | Description |
| Search and read the top |
| Return titles, unwrapped URLs, and snippets ( |
| Extract main readable text from a URL in a background tab, flagging bot checks or login walls. |
Category 7: LinkedIn Profile (7)
Tool | Description |
| Open LinkedIn sign-in in a visible window so you can log in manually. |
| Verify sign-in status, profile URL, and remaining daily edits. |
| Read name, headline, location, and chosen sections ( |
| Preview, then save headline (β€ 220 chars) with |
| Preview, then replace About section (β€ 2,600 chars) with |
| Add up to 10 skills per call, skipping any already present. |
| Open the form for |
βοΈ Environment Variables
All settings are optional β see .env.example.
Variable | Default | Purpose |
|
|
|
| visible on desktops |
|
|
| Directory for persistent browser profiles and rate-limit state. |
|
| Default Playwright navigation/action timeout. |
|
| Browser viewport dimensions. |
|
| Require |
| (all) | Comma-separated domain allowlist (subdomains included). |
| (none) | Comma-separated domain blocklist. |
|
| Allow opening local |
|
| Refuse localhost and private/internal addresses, including hostnames that resolve to them. Use when others can reach the server. |
|
| Daily limit on LinkedIn write operations. |
|
| Minimum delay between LinkedIn write operations. |
|
| Disable LinkedIn tools (enabled in headless Docker containers). |
|
| Transport selection ( |
πΌ LinkedIn Notes
Use only on your own account at human pace. LinkedIn's User Agreement restricts automated access. This server only operates on your own signed-in session, never scrapes third-party profiles, never enters credentials, previews every change before saving, and enforces daily/per-action rate limits β yet any automation carries account risk, so use it at your own discretion.
UI changes: LinkedIn updates DOM selectors frequently. Each editor tries multiple known entry points and falls back to listing open form fields so
browser_*tools can finish edits if needed.Container / HTTP mode: Runs headless with
WEB_BROWSER_MCP_DISABLE_LINKEDIN=true, because logging in requires a visible browser window on your local machine.
π©Ί Troubleshooting
Problem | Fix |
"Could not start a browser β¦ Executable doesn't exist" | Install Google Chrome, or set |
"profile folder is in use" | Another browser process is holding that profile; close it or pass a different |
Search reports CAPTCHA | Headless traffic triggers bot checks more often. Use |
"Ref β¦ run browser_snapshot again" | The DOM updated or navigated after the snapshot; run |
LinkedIn: "Not signed in" | Call |
Windows: "An Application Control policy has blocked this file" | Smart App Control blocked a new native extension; install locked dependencies via |
π§ͺ Development & Tests
uv sync
uv run python -m unittest discover -s tests -vThe test suite (38 tests, run by GitHub Actions on every push and pull request) launches a real headless browser against tests/fake_site.py β simulating regular pages, DuckDuckGo/Bing search results with CAPTCHA fallback, and a LinkedIn profile editor β so it requires no internet access and no real LinkedIn account. Set BROWSER_CHANNEL=chromium to test against bundled Chromium instead of Chrome.
π€ Author & License
Pawan Gunjkar β pawangunjkar@gmail.com Β· GitHub
MIT License β see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Let your AI agent operate any website through a real, logged-in browser session.
Run reusable browser automations from your AI assistant: scrape sites, extract data, fill forms.
AI-powered browser automation β navigate, click, fill forms, and extract data from any website.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to automate web browsers through Playwright, providing capabilities for navigation, content extraction, form filling, screenshot capture, and JavaScript execution. Supports multiple browser engines with comprehensive error handling and security features.1-
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to control web browsers through Playwright automation, providing 50+ tools for navigation, interaction, testing, accessibility audits, and visual testing across Chromium, Firefox, and WebKit.-
- AlicenseNot gradedqualityBmaintenanceLets AI assistants control your real Chrome browser to perform web tasks like reading pages, taking screenshots, clicking, and typing, using your existing logged-in sessions.145MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to drive the user's real, already-logged-in Chrome browser locally, so they can read and navigate pages, click, type, fill forms, take screenshots, and inspect cookies, tabs, console, and network traffic without headless browsers or remote-debugging ports.1 npmISC