MCP
browser
Puppeteer
Drive a headless Chromium browser — navigate, screenshot, click, type, and run JS in the page.
Requires Growth plan or above.
Enable Puppeteer
Stateless — no credentials required. Toggle Puppeteer on at /dashboard/connections. Each call shares a per-app browser session within the MCP runner.
Example
Navigate to a URL and take a full-page screenshot.
app/api/page-shot/route.ts
export async function POST() {const headers = {'x-api-key': process.env.LEASH_API_KEY!,'content-type': 'application/json',}await fetch('https://leash.build/api/integrations/puppeteer/puppeteer_navigate', {method: 'POST',headers,body: JSON.stringify({ url: 'https://leash.build' }),})const res = await fetch('https://leash.build/api/integrations/puppeteer/puppeteer_screenshot', {method: 'POST',headers,body: JSON.stringify({name: 'leash-homepage',fullPage: true,}),})const { data } = await res.json()// data =>// {// name: 'leash-homepage',// data: 'iVBORw0KGgoAAAANSUhEUgAAB...', // base64 PNG// width: 1280,// height: 3214// }return Response.json({ screenshotBytes: data.data.length })}
Available tools
puppeteer_navigate— load a URL.puppeteer_screenshot— capture the current page (base64 PNG).puppeteer_click— click an element by CSS selector.puppeteer_fill— type into an input or textarea.puppeteer_select— pick a<select>option.puppeteer_hover— hover an element.puppeteer_evaluate— execute JS in the page context and return the result.
Common gotchas
- Selectors must already be in the DOM. For SPAs, navigate then
puppeteer_evaluateawaitForSelectorbefore clicking. - No persistent cookies. Each app session starts fresh; perform login in-flow rather than relying on stored state.
- Screenshots can be large. Full-page captures on long pages routinely exceed 1MB; gate by URL/page-type before storing.
See the Puppeteer MCP server source for the underlying provider docs.
Other languages: see SDK overview.