Enables powerful, detection-resistant browser automation for AI assistants using puppeteer-real-browser.
Provides AI assistants with powerful, detection-resistant browser automation capabilities built on ZFC Digital's puppeteer-real-browser package.
This is an MCP (Model Context Protocol) server that lets AI assistants like Claude control a real web browser. Think of it as giving Claude "hands" to interact with websites - it can click buttons, fill forms, extract content, and much more, all while avoiding bot detection.
If you're just using this MCP server (not developing it), you don't need to run npm install
. The npx
command in the configuration will automatically download and run the latest version for you. Installation is only required for development purposes.
node --version
For Windows:
%APPDATA%\Claude\
claude_desktop_config.json
{
"mcpServers": {
"puppeteer-real-browser": {
"command": "npx",
"args": ["puppeteer-real-browser-mcp-server@latest"]
}
}
}
For Mac:
Cmd+Shift+G
~/Library/Application Support/Claude/
claude_desktop_config.json
For Linux:
~/.config/Claude/
claude_desktop_config.json
Why @latest? The @latest
tag ensures you always get the most recent version with bug fixes and improvements. The npx
command automatically downloads and runs it without installing anything permanently on your system.
Close and reopen Claude Desktop completely.
In Claude Desktop, try saying:
"Initialize a browser and navigate to google.com, then get the page content"
If everything is working, Claude should be able to:
Once set up, you can ask Claude to:
headless: true
) if you don't want to see the browser windowThe Puppeteer Real Browser MCP Server acts as a bridge between AI assistants and browser automation. It leverages puppeteer-real-browser to provide stealth browsing capabilities that can bypass common bot detection mechanisms.
This server implements the Model Context Protocol (MCP), allowing AI assistants to control a real browser, extract content, and more.
Windows:
C:\Program Files\Google\Chrome\Application\chrome.exe
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe
%LOCALAPPDATA%\Google\Chrome SxS\Application\chrome.exe
CHROME_PATH
environment variablemacOS:
/Applications/
Linux:
sudo apt-get install -y google-chrome-stable
or sudo apt-get install -y chromium-browser
sudo apt-get install -y xvfb
Note for Claude Desktop Users: You don't need to install anything! The npx command in your configuration automatically handles everything. Skip to the Usage section.
This section is for developers who want to:
If you want to run the server directly from the command line without using npx:
npm install -g puppeteer-real-browser-mcp-server@latest
After global installation, you can run:
puppeteer-real-browser-mcp-server
# Clone the repository
git clone https://github.com/withLinda/puppeteer-real-browser-mcp-server.git
cd puppeteer-real-browser-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
The configuration below uses npx
to automatically download and run the latest version. No installation required!
{
"mcpServers": {
"puppeteer-real-browser": {
"command": "npx",
"args": ["puppeteer-real-browser-mcp-server@latest"]
}
}
}
What does npx do? The
npx
command downloads and runs the package without permanently installing it. The@latest
ensures you always get the newest version with all bug fixes and improvements.
Claude Code CLI offers multiple convenient methods to add the puppeteer-real-browser MCP server. Choose the method that best fits your workflow:
The fastest way to get started is using the claude mcp add
command:
claude mcp add puppeteer-real-browser -- npx puppeteer-real-browser-mcp-server@latest
This command:
If you need to configure proxy settings or custom Chrome paths:
claude mcp add puppeteer-real-browser \
-e CHROME_PATH="/path/to/chrome" \
-e PROXY_URL="http://proxy:8080" \
-- npx puppeteer-real-browser-mcp-server@latest
For User-Wide Access (Available Across All Projects):
claude mcp add puppeteer-real-browser -s user -- npx puppeteer-real-browser-mcp-server@latest
For Project-Wide Access (Shared with Team via .mcp.json):
claude mcp add puppeteer-real-browser -s project -- npx puppeteer-real-browser-mcp-server@latest
For advanced users who want precise control:
claude mcp add-json puppeteer-real-browser '{
"type": "stdio",
"command": "npx",
"args": ["puppeteer-real-browser-mcp-server@latest"],
"env": {
"CHROME_PATH": "/path/to/chrome",
"PROXY_URL": "http://proxy:8080"
}
}'
After adding the server:
Check MCP Server Status:
/mcp
This command in Claude Code shows all active MCP servers.
Test the Server: In Claude Code, try:
"Initialize a browser and navigate to google.com, then get the page content"
If working correctly, you should see:
Scope | Description | Config Location | Use Case |
---|---|---|---|
local (default) | Available only to you in current project | .mcp.json in project | Testing, project-specific |
project | Shared with entire team | .mcp.json committed to repo | Team collaboration |
user | Available to you across all projects | User config directory | Personal productivity |
@latest
ensures you get bug fixes and improvements/mcp
command for server health checksCursor IDE uses the same npx approach - no installation needed! Here are the setup methods:
Ctrl+Shift+P
on Windows/Linux, Cmd+Shift+P
on Mac)Configuration File Location:
.cursor/mcp.json
in your project directory~/.cursor/mcp.json
in your home directoryBasic Configuration (No Installation Required):
{
"mcpServers": {
"puppeteer-real-browser": {
"command": "npx",
"args": ["puppeteer-real-browser-mcp-server@latest"]
}
}
}
Important: Just like Claude Desktop, Cursor will use
npx
to automatically download and run the server. You don't need to install anything with npm!
Windows-Specific Configuration (if experiencing Chrome path issues):
{
"mcpServers": {
"puppeteer-real-browser": {
"command": "npx",
"args": ["puppeteer-real-browser-mcp-server@latest"],
"env": {
"CHROME_PATH": "C:/Program Files/Google/Chrome/Application/chrome.exe"
}
}
}
}
Note: Browser options like headless mode should be configured when initializing the browser through the
browser_init
tool, not via environment variables.
Advanced Configuration with Custom Chrome Path:
{
"mcpServers": {
"puppeteer-real-browser": {
"command": "npx",
"args": ["puppeteer-real-browser-mcp-server@latest"],
"env": {
"CHROME_PATH": "C:/Program Files/Google/Chrome/Application/chrome.exe"
}
}
}
}
Note: Proxy settings and browser options should be configured when asking Claude to initialize the browser using the
browser_init
tool.
If Chrome auto-detection fails, you can specify the Chrome path using the CHROME_PATH
environment variable:
Windows:
"env": {
"CHROME_PATH": "C:/Program Files/Google/Chrome/Application/chrome.exe"
}
Alternative Windows paths:
"C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"
"%LOCALAPPDATA%/Google/Chrome/Application/chrome.exe"
macOS:
"env": {
"CHROME_PATH": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
}
Linux:
"env": {
"CHROME_PATH": "/usr/bin/google-chrome"
}
Alternative Linux paths: /usr/bin/chromium-browser
, /snap/bin/chromium
After configuration:
If successful, you should see:
Common Issues:
"MCP server not found"
"Browser failed to launch" on Windows
executablePath
"Permission denied"
sudo npm install -g puppeteer-real-browser-mcp-server
on Linux/MacConfiguration not loading
mcp.json
(not mcp.json.txt
)Start the server:
puppeteer-real-browser-mcp-server
Or if installed from source:
npm start
The server communicates via stdin/stdout using the MCP protocol.
User: "Initialize a browser and navigate to example.com"
AI: I'll initialize a stealth browser and navigate to the website.
[Uses browser_init and navigate tools]
User: "Fill in the search form with 'test query'"
AI: I'll type that into the search field.
[Uses type tool with selector and text]
User: "Click the search button"
AI: I'll click the search button.
[Uses click tool]
User: "Get all the product names from this e-commerce page"
AI: I'll extract the product information from the page.
[Uses get_content tool with appropriate selectors]
User: "Save the page content as text"
AI: I'll get the text content of the entire page.
[Uses get_content tool with type: 'text']
User: "Initialize a browser with a proxy server"
AI: I'll set up the browser with your proxy configuration.
[Uses browser_init with proxy: "https://proxy.example.com:8080"]
Tool Name | Description | Required Parameters | Optional Parameters |
---|---|---|---|
browser_init | Initialize stealth browser with advanced options | None | headless , disableXvfb , ignoreAllFlags , proxy , plugins , connectOption |
navigate | Navigate to a URL | url | waitUntil |
get_content | Get page content (HTML or text) | None | type , selector |
browser_close | Close the browser instance | None | None |
Tool Name | Description | Required Parameters | Optional Parameters |
---|---|---|---|
click | Standard click on element | selector | waitForNavigation |
type | Type text into input field | selector , text | delay |
wait | Wait for various conditions | type , value | timeout |
find_selector | Find CSS selector for element containing specific text | text | elementType , exact |
Tool Name | Description | Required Parameters | Optional Parameters |
---|---|---|---|
random_scroll | Perform random scrolling with natural timing | None | None |
Tool Name | Description | Required Parameters | Optional Parameters |
---|---|---|---|
find_selector | Find CSS selector for element containing specific text | text | elementType , exact |
Tool Name | Description | Required Parameters | Optional Parameters |
---|---|---|---|
solve_captcha | Attempt to solve captchas | type | None |
The server includes intelligent element discovery capabilities through the find_selector
tool:
Example Usage:
User: "Find the submit button that says 'Sign Up'"
AI: I'll locate that button for you.
[Uses find_selector with text: "Sign Up", elementType: "button"]
AI: Found button at selector: "form > button.btn-primary:nth-of-type(2)"
This approach eliminates the need for manually crafted selectors and makes automation more reliable across different websites.
The server includes tools designed for natural browsing behavior:
This feature helps avoid detection by sophisticated bot-detection systems that analyze user behavior patterns.
The server includes basic support for solving common captcha types:
Note that captcha solving capabilities depend on the underlying puppeteer-real-browser implementation.
The server automatically detects Chrome installation paths across different operating systems with significantly improved Windows support:
Windows (v1.3.0+):
CHROME_PATH
, PUPPETEER_EXECUTABLE_PATH
)macOS: Looks for Chrome in /Applications/Google Chrome.app/
and Chrome Canary locations
Linux: Checks multiple locations including /usr/bin/google-chrome
, /usr/bin/chromium-browser
, and snap installations
Windows Registry Detection (NEW in v1.3.0): The server now queries Windows Registry to find Chrome installations, making detection more reliable across different installation types.
If Chrome is not found automatically, you can specify a custom path using:
set CHROME_PATH="C:\Your\Chrome\Path\chrome.exe"
customConfig.chromePath
when initializing the browserCustom options like headless mode are not configured in the MCP config file. Instead, they're passed when initializing the browser using the browser_init
tool:
When you ask Claude to initialize a browser, you can specify options like:
Please initialize a browser with headless mode enabled and a 30-second timeout
Claude will then use the browser_init
tool with appropriate parameters:
{
"headless": true,
"connectOption": {
"timeout": 30000
}
}
When initializing with browser_init
, you can configure:
headless
: true/false (Set to true for headless operation)disableXvfb
: true/false (Disable X Virtual Framebuffer)ignoreAllFlags
: true/false (Ignore all Chrome flags)proxy
: "https://proxy:8080" (Proxy server URL)plugins
: ["plugin1", "plugin2"] (Array of plugins to load)connectOption
: Additional connection options like:
slowMo
: 250 (Slow down operations by milliseconds)timeout
: 60,000 (Connection timeout)The MCP config file only tells Claude where to find the server - all browser-specific options are configured through your conversations with Claude.
When initializing the browser with browser_init
, you can configure:
{
"headless": false,
"disableXvfb": false,
"ignoreAllFlags": false,
"proxy": "https://proxy:8080",
"plugins": ["plugin1", "plugin2"],
"connectOption": {
"slowMo": 250,
"timeout": 60000
}
}
{
"customConfig": {
"chromePath": "C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
}
}
{
"headless": true,
"proxy": "https://username:password@proxy.example.com:8080"
}
{
"headless": false,
"ignoreAllFlags": true,
"disableXvfb": false,
"connectOption": {
"slowMo": 100,
"devtools": false
}
}
For advanced users, you can modify the server behavior by editing the source code:
initializeBrowser
functionš§ ECONNREFUSED Error Solutions
Version 1.3.0 includes comprehensive fixes for the connect ECONNREFUSED 127.0.0.1:60725
error commonly experienced on Windows systems:
Enhanced Chrome Path Detection:
CHROME_PATH
, PUPPETEER_EXECUTABLE_PATH
)Windows-Specific Launch Optimizations:
Connection Resilience Features:
If you're still experiencing ECONNREFUSED errors:
Environment Variables (Recommended):
set CHROME_PATH="C:\Program Files\Google\Chrome\Application\chrome.exe"
Manual Chrome Path Configuration:
Ask Claude: "Initialize browser with custom Chrome path at C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe"
Network Troubleshooting:
# Test localhost resolution
ping localhost
# Should resolve to 127.0.0.1
# Check Windows hosts file
notepad C:\Windows\System32\drivers\etc\hosts
# Ensure: 127.0.0.1 localhost
Chrome Process Management:
# Kill existing Chrome processes
taskkill /f /im chrome.exe
"spawn npx ENOENT" or "command not found" errors
node --version
and npm --version
"npx: command not found" in Claude Desktop/Cursor
export PATH="$PATH:$(npm bin -g)"
/usr/local/bin/npx
npx hangs or takes too long
npm cache clean --force
Using NVM (Node Version Manager)?
{
"mcpServers": {
"puppeteer-real-browser": {
"command": "/Users/yourname/.nvm/versions/node/v20.0.0/bin/npx",
"args": ["puppeteer-real-browser-mcp-server@latest"]
}
}
}
nvm alias default 20.0.0
Permission denied errors with npx
sudo npx puppeteer-real-browser-mcp-server@latest
npm config set prefix ~/.npm
"Maximum call stack size exceeded" errors
npx puppeteer-real-browser-mcp-server@latest
"command not found" or "syntax error" when using npx
npx puppeteer-real-browser-mcp-server@latest
npm install -g puppeteer-real-browser-mcp-server@latest
npm install -g puppeteer-real-browser-mcp-server
npm config get prefix
Browser won't start
Check if Chrome/Chromium is installed in standard locations
Windows specific troubleshooting:
Step 1: Verify Chrome Installation Paths Check these locations in order:
C:\Program Files\Google\Chrome\Application\chrome.exe
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe
%PROGRAMFILES%\Google\Chrome\Application\chrome.exe
Step 2: Manual Path Configuration If Chrome is in a different location, specify it manually:
Ask Claude: "Initialize browser with custom Chrome path at C:\Your\Chrome\Path\chrome.exe"
Step 3: Windows Launch Arguments For Windows compatibility, use these launch arguments:
Ask Claude: "Initialize browser with args --disable-gpu --disable-setuid-sandbox"
Step 4: Windows-Specific Solutions
Step 5: Alternative Chrome Installation If Chrome detection still fails:
C:\Program Files\Google\Chrome\
)Step 6: PowerShell vs Command Prompt Try switching between PowerShell and Command Prompt:
cmd.exe
instead of PowerShellStep 7: Node.js and npm Configuration
node --version
npm cache clean --force
npm install -g puppeteer-real-browser-mcp-server@latest
Linux: Install dependencies: sudo apt-get install -y google-chrome-stable
macOS: Ensure Chrome is in /Applications/
Try with headless: true
first
Check console output for Chrome path detection messages
Claude doesn't see the MCP server
claude_desktop_config.json
is in the correct location4a. Claude Code CLI doesn't see the MCP server
Installation Issues:
claude mcp add
command was successfulclaude mcp add puppeteer-real-browser -- npx puppeteer-real-browser-mcp-server@latest
Scope and Configuration:
.mcp.json
exists in project rootMCP Server Status:
/mcp
command in Claude Code to check server statusEnvironment Variables:
claude mcp add puppeteer-real-browser -- npx puppeteer-real-browser-mcp-server@latest
Node.js and npx Issues:
node --version
npx puppeteer-real-browser-mcp-server@latest
npm cache clean --force
Protocol Version Issues (Known Issue):
Re-adding Server:
# Remove and re-add if issues persist
claude mcp remove puppeteer-real-browser
claude mcp add puppeteer-real-browser -- npx puppeteer-real-browser-mcp-server@latest
4b. Cursor IDE doesn't see the MCP server
Config File Location Issues:
mcp.json
is in the correct location:
~/.cursor/mcp.json
(%USERPROFILE%\.cursor\mcp.json
on Windows).cursor/mcp.json
in your project rootmcp.json
(not mcp.json.txt
)JSON Syntax Validation:
"C:/Program Files/Google/Chrome/Application/chrome.exe"
Cursor IDE Restart Process:
Environment Variables:
node --version
npm --version
Cursor IDE Version Compatibility:
Permission denied errors
sudo npm install -g puppeteer-real-browser-mcp-server
Detection issues
random_scroll
proxy: "http://proxy.example.com:8080"
Memory leaks
browser_close
when doneTimeout errors
{ "timeout": 60000 }
wait
tool before interacting with elementsQ: When should I use npm install vs npx? A:
Q: Should I use Claude Desktop or Claude Code CLI? A: Both are excellent choices, depending on your needs:
Claude Desktop:
Claude Code CLI:
claude mcp add
)Use Claude Code CLI if you:
Use Claude Desktop if you:
Q: Why do we use @latest in the npx command?
A: The @latest
tag ensures you always get the newest version with bug fixes and security updates. Without it, npx might cache an older version. It's especially important for actively maintained projects.
Q: Does this work with headless browsers?
A: Yes, set headless: true
in browser_init options.
Q: Can I use multiple browsers at once? A: Currently supports one browser instance. Close the current one before starting a new one.
Q: What captchas can it solve? A: Supports reCAPTCHA, hCaptcha, and Cloudflare Turnstile through puppeteer-real-browser.
Q: Is this detectable by websites? A: puppeteer-real-browser includes anti-detection features, but no solution is 100% undetectable.
Q: Can I use custom Chrome extensions?
A: Yes, through the plugins
option in browser_init.
Q: Does it work on all operating systems? A: Yes, tested on Windows, macOS, and Linux. The server automatically detects Chrome installations on all platforms.
Q: What's the difference between Claude Desktop, Claude Code CLI, and Cursor IDE configurations? A: Here's a comparison:
Feature | Claude Desktop | Claude Code CLI | Cursor IDE |
---|---|---|---|
Setup Method | Manual JSON editing | Command-line (claude mcp add ) | One-click install OR manual JSON |
Config Location | claude_desktop_config.json | .mcp.json (scoped) | .cursor/mcp.json |
Team Sharing | No | Yes (project scope) | Yes |
Environment Variables | Limited support | Full support | Full support |
Scope Control | No | Yes (local/project/user) | Project/Global |
Server Monitoring | No | Yes (/mcp command) | Limited |
Authentication | None | OAuth available | OAuth available |
Best For | Individual GUI use | Development teams | Code-focused workflows |
Command Examples:
claude mcp add puppeteer-real-browser -- npx puppeteer-real-browser-mcp-server@latest
Q: What if Chrome is installed in a non-standard location? A: Version 1.3.0 dramatically improves Chrome detection. The server now searches 15+ locations including portable installations and uses Windows Registry detection. If Chrome is still not found automatically, you can:
set CHROME_PATH="C:\Your\Chrome\Path\chrome.exe"
customConfig.chromePath
option: {"customConfig": {"chromePath": "C:\\Custom\\Chrome\\chrome.exe"}}
Q: Why am I getting "Chrome not found" or ECONNREFUSED errors on Windows? A: Version 1.3.0 includes comprehensive fixes for Windows Chrome detection and connection issues. The server now automatically searches these locations and more:
C:\Program Files\Google\Chrome\Application\chrome.exe
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
%LOCALAPPDATA%\Google\Chrome\Application\chrome.exe
%USERPROFILE%\AppData\Local\Google\Chrome\Application\chrome.exe
The server also implements multiple connection strategies with automatic fallback between localhost and 127.0.0.1, plus enhanced Windows-specific Chrome flags for better compatibility.
Q: I'm still getting ECONNREFUSED errors after upgrading to v1.3.0. What should I do? A: Try these steps in order:
CHROME_PATH
environment variable to your Chrome locationtaskkill /f /im chrome.exe
127.0.0.1 localhost
To enable debug logging:
DEBUG=true npm start
Or when running from source:
DEBUG=true npm run dev
If you're still having issues:
node --version
)npm --version
)puppeteer-real-browser-mcp-server/
āāā src/
ā āāā index.ts # Main server implementation
ā āāā stealth-actions.ts # Browser interaction functions
āāā test/
ā āāā test-server.ts # Test script
āāā package.json
āāā tsconfig.json
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Test the server
npm test
To add a new tool:
TOOLS
array in src/index.ts
CallToolRequestSchema
handlerThis project includes a comprehensive testing suite with multiple categories optimized for different purposes:
npm run test:quick # Fast Jest tests for protocol compliance
npm test # Alias for test:quick
npm run test:full # End-to-end MCP client testing
npm run test:performance # Browser performance benchmarking
Performance tests measure:
npm run test:debug # Environment diagnostics and troubleshooting
Debug tools provide:
npm run test:all # Runs quick + full + performance tests
npm run test:dashboard # Unified test runner with reporting
The test dashboard provides:
test-results/
directorynpm run test:integration # Claude Code CLI integration testing
For detailed testing information, see TESTING.md.
Contributions are welcome! Please feel free to submit a Pull Request.
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
This MCP server is based on the excellent puppeteer-real-browser library by ZFC-Digital.
Thank you to the puppeteer-real-browser team for creating such a powerful and detection-resistant browser automation solution!
Extracts web content using the Jina.ai Reader API.
Integrate real-time Scrapeless Google SERP(Google Search, Google Flight, Google Map, Google Jobs....) results into your LLM applications. This server enables dynamic context retrieval for AI workflows, chatbots, and research tools.
Scrape websites with Oxylabs Web API, supporting dynamic rendering and parsing for structured data extraction.
Fetches and converts website content to Markdown with AI-powered cleanup, OpenAPI support, and stealth browsing.
Provides real-time financial market data from Yahoo Finance.
Extracts information from YouTube videos and channels using the YouTube Data API.
Discover, extract, and interact with the web - one interface powering automated access across the public internet.
Fetch and extract web content using a Playwright headless browser, with support for intelligent extraction and flexible output.
Control web browsers using the Selenium WebDriver for automation and testing.
Fast, token-efficient web content extraction that converts websites to clean Markdown. Features Mozilla Readability, smart caching, polite crawling with robots.txt support, and concurrent fetching with minimal dependencies.