browser-pool-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., "@browser-pool-mcp Navigate to https://news.ycombinator.com and take a screenshot of the front 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.
browser-pool-mcp
A dynamic browser pool MCP server that wraps @playwright/mcp to enable multiple concurrent browser sessions for Claude Code and other MCP clients.
Problem Solved
The standard Playwright MCP server only allows one browser instance at a time. If you try to use browser tools from multiple Claude Code sessions simultaneously, you get:
Browser is already in use for C:\Users\...\mcp-chrome-xxx, use --isolated to run multiple instancesbrowser-pool-mcp solves this by:
Spawning Playwright MCP instances on-demand on dynamic ports (9000+)
Automatically detecting port conflicts from other sessions
Assigning each Claude session to its own isolated browser
Auto-cleanup of idle instances after 30 minutes
Related MCP server: mcp-unified-automation
Architecture
Claude Code Session 1 ──stdio──> browser-pool-mcp ──SSE──> Playwright MCP (port 9000)
Claude Code Session 2 ──stdio──> browser-pool-mcp ──SSE──> Playwright MCP (port 9001)
Claude Code Session 3 ──stdio──> browser-pool-mcp ──SSE──> Playwright MCP (port 9002)Each Claude Code session gets its own browser-pool-mcp process, which spawns and connects to an isolated Playwright instance on an available port.
Installation
Prerequisites
Node.js 18+
npm
Setup
Clone or download this repository:
git clone https://github.com/everdijsje/browser-pool-mcp.git
cd browser-pool-mcp
npm installAdd to your Claude Code MCP configuration (
~/.claude.json):
{
"mcpServers": {
"browser": {
"type": "stdio",
"command": "node",
"args": ["/path/to/browser-pool-mcp/index.js"]
}
}
}Restart Claude Code
Usage
Use browser tools as normal in Claude Code:
Navigate to https://example.com
Take a screenshot
Click on the "Learn more" linkAdditional Tools
pool_status- Check the status of running browser instancespool_test- Debug tool to test async responses
Configuration
Environment variables:
Variable | Default | Description |
|
| Set to |
Constants in index.js:
Constant | Default | Description |
|
| Starting port for Playwright instances |
|
| Maximum concurrent browser instances |
|
| Idle timeout before killing instance (30 min) |
How It Works
When you call any browser tool (e.g.,
browser_navigate), browser-pool-mcp:Checks if this session already has an assigned Playwright instance
If not, finds an available port (checking for conflicts)
Spawns
npx @playwright/mcp@latest --port PORT --isolatedConnects via MCP SDK client over SSE
Proxies the tool call to Playwright
Each session is assigned one browser instance for its lifetime
Instances are cleaned up after 30 minutes of inactivity
When max instances are reached, the oldest idle instance is recycled
Supported Browser Tools
All standard Playwright MCP tools are proxied:
browser_navigate- Navigate to URLbrowser_snapshot- Get page accessibility snapshotbrowser_click- Click elementbrowser_type- Type text into elementbrowser_screenshot- Take screenshotbrowser_tabs- Manage browser tabsbrowser_press_key- Press keyboard keybrowser_hover- Hover over elementbrowser_select_option- Select dropdown optionbrowser_evaluate- Run JavaScriptbrowser_wait_for- Wait for conditionbrowser_resize- Resize browser windowbrowser_handle_dialog- Handle alerts/confirmsbrowser_file_upload- Upload filesbrowser_console_messages- Get console logsbrowser_network_requests- Get network activitybrowser_navigate_back- Go backbrowser_close- Close browser
Dependencies
@modelcontextprotocol/sdk- MCP SDK for server and client communicationzod- Schema validation@playwright/mcp- Spawned as child processes (installed via npx)
License
MIT
Author
Built by Claude Code for Everdijs
Available Tools
20 toolsbrowser_clickD
Click element
Inputs: element (required), ref (required).
browser_closeC
Close browser
Inputs: no named parameters.
browser_console_messagesD
Get console
Inputs: level.
browser_evaluateD
Run JavaScript
Inputs: function (required).
browser_file_uploadD
Upload files
Inputs: paths.
browser_handle_dialogD
Handle dialog
Inputs: accept (required), promptText.
browser_hoverC
Hover element
Inputs: element (required), ref (required).
browser_network_requestsC
Get network requests
Inputs: no named parameters.
browser_press_keyD
Press key
Inputs: key (required).
browser_resizeD
Resize window
Inputs: width (required), height (required).
browser_screenshotD
Take screenshot
Inputs: fullPage.
browser_select_optionD
Select option
Inputs: element (required), ref (required), values (required).
browser_snapshotD
Page snapshot
Inputs: no named parameters.
browser_tabsD
Manage tabs
Inputs: action (required), index.
browser_typeD
Type text
Inputs: element (required), ref (required), text (required), submit.
browser_wait_forD
Wait for condition
Inputs: time, text, textGone.
pool_statusC
Browser pool status
Inputs: no named parameters.
pool_testD
Test async response
Inputs: message (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools have distinct purposes targeting specific browser interactions like clicking, typing, navigating, or taking screenshots. However, 'browser_evaluate' (run JavaScript) and 'browser_snapshot' (page snapshot) could potentially overlap with other tools in functionality, creating minor ambiguity in certain scenarios.
Tool names follow a highly consistent snake_case pattern with clear 'browser_' or 'pool_' prefixes, making them predictable and readable. The verb_noun structure is maintained throughout, such as 'browser_click', 'browser_navigate', and 'pool_status', ensuring no mixing of conventions.
With 20 tools, the count is borderline heavy for a browser automation server, potentially overwhelming for agents. While it covers many interactions, some tools like 'browser_snapshot' and 'browser_screenshot' might be redundant, suggesting the set could be more streamlined without losing core functionality.
The toolset provides comprehensive coverage for browser automation, including navigation, interaction, debugging, and pool management. Minor gaps exist, such as no explicit tool for handling cookies or local storage, but agents can likely work around these using existing tools like 'browser_evaluate' for JavaScript execution.
Maintenance
Related MCP Connectors
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Zenrows MCP server: Fetch, Extract, Batch, and Browser Sessions for AI agents
Hosted OpenAI Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceStateful MCP server wrapping Playwright for browser automation. Provides tools to navigate, interact, and extract data from web pages via a persistent browser session.19MIT
- FlicenseNot gradedqualityDmaintenanceA custom MCP server for Playwright browser automation and system control, providing 25 tools to enable Claude Code to perform web interactions and system tasks via natural language.-
- AlicenseBqualityDmaintenanceAn MCP server for generic browser automation using Playwright. Enables MCP clients to navigate pages, inspect elements, execute JavaScript, capture screenshots, and monitor console logs and network traffic via a headless Chromium instance.7ISC
- AlicenseAqualityCmaintenanceAn MCP server that runs concurrent, session-isolated Playwright browser contexts, so many agents can each drive their own browser at the same time without colliding.238 npm5MIT