Puppeteer MCP Skill
🎯 Goal
Enable the AI Agent to control a headless browser for testing, scraping, and UI verification using the official Model Context Protocol standard.
🛠️ Tools
navigate
Navigate the browser to a specific URL.
- •url: The URL to visit (string)
screenshot
Take a screenshot of the current page or a specific element.
- •path: Path to save the screenshot (string)
- •selector: CSS selector to capture (optional, default: full page)
click
Click an element on the page.
- •selector: CSS selector of the element to click (string)
fill
Fill an input field.
- •selector: CSS selector of the input (string)
- •value: Value to type (string)
evaluate
Execute JavaScript in the page context.
- •script: JavaScript code to run (string)
get_content
Get the HTML content of the page.
- •selector: CSS selector to get content from (optional, default: body)
🚀 Usage Rules
- •Headless: Creating a session spawns a headless browser by default.
- •Selectors: Use stable CSS selectors (id, data-testid) where possible.
- •Wait: Ensure standard Puppeteer
waitForlogic is considered if the page is dynamic (handled by the tool implicitly or explicitly).