Home / MCP / Puppeteer MCP Server
Provides browser automation through Puppeteer to navigate pages, interact with elements, take screenshots, and connect to existing Chrome windows.
Configuration
View docs{
"mcpServers": {
"puppeteer": {
"command": "puppeteer-mcp-server",
"args": [],
"env": {
"NODE_OPTIONS": "--experimental-modules"
}
}
}
}You can automate browser tasks with Puppeteer MCP Server, connecting to new or existing Chrome instances to navigate pages, take screenshots, click elements, fill forms, and run JavaScript. This makes it easy to control a browser as part of broader workflows or AI-assisted actions.
You interact with the server through an MCP client. Start the server using one of the supported local (stdio) configurations, then issue tools to control the browser. The typical workflow includes starting a local MCP server, connecting to a browser (either a fresh instance or an existing one with remote debugging enabled), and chaining actions such as navigate, click, fill, and take screenshots. The server preserves your Chrome instance when you connect to an active tab and provides clear feedback for each operation.
Prerequisites you need before running the server:
Choose one of the available installation methods below and follow the exact commands.
Install and run the MCP server locally using npm or npx. The server is configured to run as a local process and exposes MCP endpoints for your client.
# Global npm install (optional for running as a global command)
npm install -g puppeteer-mcp-server
# Run directly with npx without installation
npx puppeteer-mcp-serverIf you prefer to run from source, you can install dependencies, build, and start the server using the following steps.
# Clone or download the source
# Install dependencies
npm install
# Build the project
npm run build
# Start the server
npm startAdd a local (stdio) MCP entry for Puppeteer in your client’s MCP settings. Use one of the configurations shown here to connect a client to the local server.
{
"mcpServers": {
"puppeteer": {
"command": "puppeteer-mcp-server",
"args": [],
"env": {}
}
}
}{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "puppeteer-mcp-server"],
"env": {}
}
}
}{
"mcpServers": {
"puppeteer": {
"command": "node",
"args": ["path/to/puppeteer-mcp-server/dist/index.js"],
"env": {
"NODE_OPTIONS": "--experimental-modules"
}
}
}
}When using remote or local debugging features, enable access only on trusted networks and manage ports carefully. Close remote debugging ports when not in use and avoid exposing them to public networks.
The server records detailed activity to log files to help you monitor browser actions and diagnose issues.
If a browser action fails, you receive a clear error message with context about the operation and the system logs the event for troubleshooting.
- Ensure Chrome is started with remote debugging when you intend to connect to an existing tab. - If you encounter connection issues, verify the debugging port and that you are connecting to a non-extension tab. - Review logs in the designated log directory for detailed trace information.
Contributions are welcome. Share improvements, fixes, or new automation capabilities that extend browser control via Puppeteer MCP Server.
MIT License - see the license file for details.
Connect to an existing Chrome instance with remote debugging enabled, preserving the current Chrome window and attaching to a non-extension tab.
Navigate the active page to a specified URL.
Capture a screenshot of the current page or a specific element, with optional dimensions.
Click an element on the page using a CSS selector.
Fill text into an input field identified by a CSS selector.
Choose an option from a select element by its value.
Hover the cursor over a specified element.
Execute JavaScript in the browser context and return the result.