Skip to main content
Glama
merajmehrabi

Puppeteer MCP Server

by merajmehrabi

puppeteer_navigate

Automate URL navigation in browser workflows using Puppeteer. Specify the desired URL to initiate precise page loading for enhanced web interactions and testing.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Implementation Reference

  • The core handler logic for the 'puppeteer_navigate' tool. Navigates the browser to the specified URL using Puppeteer's page.goto with networkidle0 wait condition and 30-second timeout. Includes comprehensive error handling for failed navigation, HTTP errors (4xx+), and network issues, returning structured success/error responses.
    case "puppeteer_navigate": try { logger.info('Navigating to URL', { url: args.url }); const response = await page.goto(args.url, { waitUntil: 'networkidle0', timeout: 30000 }); if (!response) { throw new Error('Navigation failed - no response received'); } const status = response.status(); if (status >= 400) { throw new Error(`HTTP error: ${status} ${response.statusText()}`); } logger.info('Navigation successful', { url: args.url, status }); return { content: [{ type: "text", text: `Successfully navigated to ${args.url} (Status: ${status})`, }], isError: false, }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); logger.error('Navigation failed', { url: args.url, error: errorMessage }); return { content: [{ type: "text", text: `Navigation failed: ${errorMessage}\nThis could be due to:\n- Network connectivity issues\n- Site blocking automated access\n- Page requiring authentication\n- Navigation timeout\n\nTry using a different URL or checking network connectivity.`, }], isError: true, }; }
  • Tool schema definition including name, description, and input schema requiring a 'url' string parameter.
    { name: "puppeteer_navigate", description: "Navigate to a URL", inputSchema: { type: "object", properties: { url: { type: "string" }, }, required: ["url"], }, },

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/merajmehrabi/puppeteer-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server