Browser Pool MCP
This server provides a dynamic, isolated browser automation pool for concurrent agents via the MCP protocol and Playwright. Each agent gets its own browser instance by passing _agent_id, ensuring session isolation and conflict-free execution (omit _agent_id for a shared browser). It supports comprehensive automation actions:
Navigation: navigate to URLs, go back/forward, get current URL.
Interaction: click, type, press keys, hover, select options, drag & drop, file upload, handle dialogs.
Inspection: full-page/viewport screenshots, accessibility snapshots, console messages (filtered), network requests, JavaScript evaluation.
Waiting: wait for time, text to appear/disappear.
Tab & Window: list, create, switch, close tabs; resize and close browsers.
Pool Management: monitor per-agent status (
pool_status), close instances (browser_close), test async (pool_test).
Configure via environment variables (base port, max instances per wrapper, global max, idle timeout, debug logging). Supports on-demand spawning, graceful cleanup of idle/orphaned instances, and prevents termination of active browsers. Default max 10 concurrent browsers per wrapper, idle cleanup after 30 minutes.
Click on "Install 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 Pool MCPopen example.com in an isolated browser for agent-a and screenshot it"
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 Pool MCP
Dynamic browser pool MCP server β every agent gets its own isolated browser.
English | δΈζζζ‘£
A Model Context Protocol server that wraps
Microsoft's @playwright/mcp and
turns it into a dynamic browser pool: each unique caller gets its own
isolated Chrome instance, so multiple Claude Code sessions, subagents, or any
MCP clients can run browser automation concurrently without conflicts.
β¨ Features
π§© Per-agent isolation β each unique
_agent_idgets its own browser. No more"Browser is already in use"errors when multiple agents hit the browser at once.π On-demand spawning β browsers are lazily started on first use (local CLI, ~1s), never pre-allocated.
π§Ή Auto-cleanup β idle instances are killed after 30 min; orphaned instances from crashed wrappers are cleaned on startup.
π‘οΈ Never kills busy agents β when the pool is full, the wrapper evicts only idle instances; if all are busy it waits, so a running agent's browser is never yanked away.
π Backward compatible β calling tools without
_agent_idshares one "default" browser, preserving original single-session behavior.π Full Playwright toolset β all
@playwright/mcptools (navigate, click, type, screenshot, evaluate, tabs, networkβ¦), no feature loss.
Related MCP server: Leapfrog MCP
π§ Architecture
Claude Code main session ββstdioββ> playwright-pool-mcp (this server)
β
βββ agent "A" ββSSEββ> @playwright/mcp :9000 ββ> Chrome A
βββ agent "B" ββSSEββ> @playwright/mcp :9001 ββ> Chrome B
βββ agent "C" ββSSEββ> @playwright/mcp :9002 ββ> Chrome C
βββ "default" ββSSEββ> @playwright/mcp :9003 ββ> Chrome DThe wrapper does not control Chrome directly. It spawns @playwright/mcp
instances on demand and proxies MCP tool calls to them, adding per-agent routing.
π Quick Start
Prerequisites
Node.js β₯ 18
npm
Install
git clone <your-repo-url> playwright-pool-mcp
cd playwright-pool-mcp
npm install
# First-time Chromium download (if needed):
npx playwright install chromiumConfigure Claude Code
User-level global config (~/.claude.json):
{
"mcpServers": {
"playwright-pool": {
"type": "stdio",
"command": "node",
"args": ["/path/to/playwright-pool-mcp/playwright-pool-script.js"],
"env": {
"BROWSER_POOL_BASE_PORT": "9000",
"BROWSER_POOL_MAX_INSTANCES": "10",
"BROWSER_POOL_GLOBAL_MAX": "12",
"BROWSER_POOL_INSTANCE_TIMEOUT_MS": "1800000",
"BROWSER_POOL_DEBUG": "0"
}
}
}
}Restart Claude Code. Tools appear as mcp__playwright-pool__*.
π‘ Usage
Mode 1: Shared (backward compatible)
Omit _agent_id β all calls share one "default" browser:
mcp__playwright-pool__browser_navigate(url="https://example.com")
mcp__playwright-pool__browser_snapshot()Mode 2: Isolated per agent (recommended)
Pass _agent_id β each unique value gets its own browser:
subagent A: mcp__playwright-pool__browser_navigate(url="https://news.ycombinator.com", _agent_id="agent-a")
subagent B: mcp__playwright-pool__browser_navigate(url="https://github.com/trending", _agent_id="agent-b")
subagent C: mcp__playwright-pool__browser_navigate(url="https://www.baidu.com", _agent_id="agent-c")β οΈ Important: pass the same
_agent_idacross all calls from one agent to keep its browser state (cookies, login, navigation). Different agents use different values.
Subagent template
Create .claude/agents/web-worker.md:
---
name: web-worker
description: Run browser tasks (scraping / research / testing / automation)
tools: mcp__playwright-pool__*, Read, Bash
---
Use mcp__playwright-pool__* tools to operate the browser.
**Key rule: pass the `_agent_id` parameter on every browser tool call.**
The main conversation may dispatch multiple web-workers concurrently; different
workers must use different `_agent_id` values so each gets its own isolated browser.
Examples:
- mcp__playwright-pool__browser_navigate(url="...", _agent_id="worker-1")
- mcp__playwright-pool__browser_evaluate(function="...", _agent_id="worker-1")
Use the same `_agent_id` for all calls within one worker.π οΈ Tools
All tools accept an optional _agent_id parameter. Aligned 1:1 with @playwright/mcp v0.0.78.
βΉοΈ Element targeting: interaction tools use
target(snapshot ref or CSS selector). Therefparameter is accepted as an alias fortarget(Claude Code's client maps it).
Tool | Description |
| Navigate to a URL |
| Go back |
| Accessibility tree (LLM-friendly) |
| Screenshot (PNG/JPEG) |
| Click element |
| Type text into element |
| Press keyboard key |
| Hover element |
| Select dropdown option |
| Drag & drop |
| Run JavaScript |
| Wait for condition |
| Find text in page snapshot |
| Fill multiple form fields (JSON array of |
| Manage tabs |
| Resize window |
| Handle alert/confirm |
| Upload files |
| Get console logs |
| Network activity |
| Mouse control (screen coordinates) |
| Run arbitrary code (dangerous) |
| Close browser for this agent |
| Pool status (per agent) |
βοΈ Configuration
All config via environment variables in ~/.claude.json β no code changes needed:
Variable | Default | Description |
|
| Starting port for browser instances |
|
| Max concurrent browsers per wrapper (β300MB RAM each) |
|
| Global max browsers across ALL wrapper sessions (multiple Claude Code windows). File-lock based counter in |
|
| Idle timeout (30 min) |
|
| Set |
Changes take effect after restarting Claude Code.
π‘ Global limit (
BROWSER_POOL_GLOBAL_MAX): each Claude Code window runs its own wrapper, andBROWSER_POOL_MAX_INSTANCESlimits only that wrapper. To cap browser instances across ALL sessions (e.g. two windows must share a total of 12), setBROWSER_POOL_GLOBAL_MAXto the same value in every session's config. Slots are counted via a lock-protected counter file (~/.browser-pool/global-count) and are released when instances close or the wrapper exits gracefully.
π How It Works
Any browser tool call arrives β wrapper extracts
_agent_id(defaults to"default")Looks up the per-agent assignment map β reuse existing browser if alive
If none: check the global limit (
BROWSER_POOL_GLOBAL_MAX) β find a free port β spawn local@playwright/mcpCLI (node cli.js --port X --isolated)Mark the instance
busyduring the call, so eviction never kills an in-flight callPool full? Evict only idle instances (oldest first); if all busy, wait up to 60s
Idle > 30 min β auto-killed; wrapper startup scans for orphaned instances and cleans them (PPID-guarded, never kills another live session's browsers)
Global slot accounting: acquired before spawn, released when the instance closes or the wrapper exits gracefully
π¦ Dependencies
@modelcontextprotocol/sdkβ MCP protocol@playwright/mcpβ browser automation enginezodβ schema validation
π License
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseCqualityDmaintenanceA dynamic browser pool MCP server that enables multiple concurrent, isolated Playwright sessions for Claude Code and other MCP clients. It manages on-demand instances on dynamic ports to resolve session conflicts and includes automatic cleanup of idle browsers.201
- AlicenseBqualityDmaintenanceMulti-session browser MCP server that gives AI agents up to 15 fully-isolated browsers running in parallel. 36 tools including navigation, extraction, network intercept, stealth, and self-improvement. Each session has its own cookies, storage, and fingerprint so agents never collide.37435MIT
- Alicense-qualityCmaintenanceMCP server providing browser automation for AI agents with context-aware playbooks and skills for complex websites.27175PolyForm Noncommercial 1.0.0

@meshbrow/mcp-serverofficial
Alicense-qualityAmaintenanceMCP server for Meshbrow that gives AI agents full browser automation capabilities with stealth anti-detection, enabling natural language control of browser sessions, data extraction, and multi-browser fleets.MIT
Related MCP Connectors
A paid remote MCP for AI agent browser MCP session, built to return verdicts, receipts, usage logs,
A paid remote MCP for AI agent browser approval MCP, built to return verdicts, receipts, usage logs,
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/hy-2005/playwright-pool-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server