home / mcp / puppeteer mcp server
Configurable Puppeteer MCP Server
Configuration
View docs{
"mcpServers": {
"afshawnlotfi-mcp-configurable-puppeteer": {
"command": "npx",
"args": [
"-y",
"github:afshawnlotfi/mcp-configurable-puppeteer"
],
"env": {
"PUPPETEER_ARGS": "{\"defaultViewport\": {\"width\": 1280, \"height\": 800}}"
}
}
}
}You can run a configurable Puppeteer MCP Server to automate a real browser for tasks like navigating pages, taking screenshots, clicking elements, and running JavaScript. It exposes a flexible environment where you tailor Puppeteer launch options and browser behavior to fit your needs, enabling powerful browser automation for your LLM workflows.
Set up the Puppeteer MCP Server and connect your MCP client to control a headless or visible browser. Use the available tools to navigate to URLs, capture screenshots, click and hover on elements, fill forms, select options, and execute JavaScript in the browser console. You can customize how the browser launches by providing Puppeteer options through environment variables.
Prerequisites you need before installation:
Install the MCP server configuration by running the following steps exactly as shown:
# Start with the standard NPX-based setup shown in the examples
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["-y", "github:afshawnlotfi/mcp-configurable-puppeteer"]
}
}
}Configuration and runtime options are documented through concrete examples you can enable via environment variables. You can customize Puppeteer launch behavior to use a different browser, change the default viewport size, or apply other launch flags without changing the server code.
Navigate to a URL in the browser. Input: url string.
Capture screenshots of the page. Inputs: name (required), selector (optional), width (optional, default 800), height (optional, default 600).
Click elements on the page. Input: selector string.
Hover elements on the page. Input: selector string.
Fill out input fields. Inputs: selector string, value string.
Select an option in a SELECT element. Inputs: selector string, value string.
Execute JavaScript in the browser console. Input: script string.