Puppeteer MCP
Allows automation of the Firefox browser via Puppeteer, including navigation, element interaction, form filling, snapshots, screenshots, and diagnostics.
Allows automation of the Firefox browser via Puppeteer, including navigation, element interaction, form filling, snapshots, screenshots, and diagnostics.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@greenfinity/puppeteer-mcp
MCP server for browser automation using Puppeteer - equivalent to Playwright MCP.
Motivation
Playwright is an alternative to Puppeteer for browser testing, but at the end of the day it does not have significantly more to offer, apart from WebKit support and patched browser executables.
However, Puppeteer works with unpatched Chrome and Firefox browser executables which offer advantages, for example for in-browser debugging during automated tests.
Puppeteer is a well-established testing framework with significant experience and code accumulated during the years, so it's a more solid choice for features that it can do.
Since I use Puppeteer for testing, I would also like to use it with my agents for various automation and introspection tasks.
Puppeteer's existing MCP is deprecated, so it makes sense to build a new MCP from scratch.
Related MCP server: Charlotte
Installation
npm install @greenfinity/puppeteer-mcpUsage
With Claude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"puppeteer": {
"command": "npx",
"args": ["@greenfinity/puppeteer-mcp"]
}
}
}CLI Options
npx @greenfinity/puppeteer-mcp [options]
Options:
--headless Run browser in headless mode (default: true)
--no-headless Run browser in headed mode
--browser <type> Browser to use: chrome, firefox (default: chrome)
--viewport <size> Viewport size as WIDTHxHEIGHT (default: 1280x720)
--timeout <ms> Default timeout in milliseconds (default: 30000)
--user-data-dir Path to user data directory for browser profileSupported Tools
Navigation & Page Control
browser_navigate- Navigate to a URLbrowser_navigate_back- Go back in browser historybrowser_close- Close the browserbrowser_tabs- List, create, close, or select browser tabsbrowser_resize- Resize the browser viewportbrowser_wait_for- Wait for text, element, or time
Interaction
browser_click- Click on an elementbrowser_type- Type text into an elementbrowser_hover- Hover over an elementbrowser_drag- Drag and drop between elementsbrowser_press_key- Press a keyboard keybrowser_select_option- Select an option in a dropdownbrowser_file_upload- Upload filesbrowser_handle_dialog- Handle browser dialogs (alert, confirm, prompt)
Forms
browser_fill_form- Fill multiple form fields at once
Snapshots & Screenshots
browser_snapshot- Capture accessibility tree snapshot (recommended for LLM interaction)browser_take_screenshot- Capture visual screenshot
Diagnostics
browser_console_messages- Get console log messagesbrowser_network_requests- Get network request history
Code Execution
browser_evaluate- Execute JavaScript on the pagebrowser_run_code- Run Puppeteer code snippets
Setup
browser_launch- Launch or relaunch browser with specific settings (headless mode, userDataDir for session persistence)browser_install- Install browser if not present
Session Persistence
To preserve login sessions and cookies across browser relaunches (e.g., when switching between headless and visible mode), use the userDataDir parameter with browser_launch:
browser_launch with userDataDir="/path/to/profile" and headless=false
# Login to your site in the visible browser
# Then switch to headless mode while keeping the session:
browser_launch with userDataDir="/path/to/profile" and headless=trueThe browser profile directory stores cookies, localStorage, and other session data, allowing you to maintain authenticated sessions across mode switches.
Accessibility Snapshots
The browser_snapshot tool uses Puppeteer's page.accessibility.snapshot() to capture a structured representation of the page. This is the recommended way for LLMs to understand page content as it provides:
Semantic information (roles, names, states)
Hierarchical structure
Element references for interaction
Fast and lightweight (no vision models required)
Each element in the snapshot has a ref attribute that can be used with interaction tools like browser_click and browser_type.
Why ReScript?
This package is implemented in ReScript, a functional language that compiles to JavaScript. ReScript is superior to TypeScript in every way - it offers a sound type system, excellent pattern matching, and produces clean, readable JavaScript output with no runtime overhead.
I use ReScript in my daily development for everything. There is no drawback to using ReScript, and TypeScript offers zero advantages over it.
The compiled JavaScript is included in the released npm package, so you can use this as a regular JavaScript module without any additional tooling.
Local Development
For local development of this package, ReScript tooling is provided in the package.json scripts:
# Build the ReScript sources to JavaScript
yarn build
# Watch mode for development (rebuilds on file changes)
yarn rescript:devNote: These scripts are only needed if you're modifying the package source code locally. End users can simply install and use the package as-is.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
A real browser for your agent: screenshots, page checks, Markdown and PDFs.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to control a browser through tools for web automation tasks such as navigation, typing, clicking, and taking screenshots.Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to browse and interact with web pages through a token-efficient, structured page representation — orientation summaries, targeted element queries, and full detail only on request — instead of raw accessibility-tree dumps. Supports navigation, interaction, forms, screenshots, console and network monitoring, session/tab management, and browser-based development auditing.4 npm-
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to open URLs in a persistent headless browser and interact with pages by clicking, typing, selecting, reading content, evaluating JavaScript, waiting for elements, and capturing screenshots.MIT
- AlicenseBqualityBmaintenanceEnables AI agents to control headless and VS Code-integrated browsers for navigation, snapshots, clicking, typing, screenshots, and live tab streaming.25MIT