Skip to main content
Glama

browsercat_navigate

Navigate to any URL using BrowserCat's cloud browser service to automate web browsing tasks without local browser installation.

Instructions

Navigate to a URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Implementation Reference

  • The handler logic for the 'browsercat_navigate' tool. It navigates the browser page to the specified URL using Puppeteer's page.goto method and returns a textual confirmation.
    case "browsercat_navigate": await page.goto(args.url); return { content: [{ type: "text", text: `Navigated to ${args.url}`, }], isError: false, };
  • The schema definition for the 'browsercat_navigate' tool, specifying the input schema that requires a 'url' string parameter.
    { name: "browsercat_navigate", description: "Navigate to a URL", inputSchema: { type: "object", properties: { url: { type: "string" }, }, required: ["url"], }, },
  • index.ts:421-423 (registration)
    Registration of the ListToolsRequestSchema handler, which exposes the list of available tools including 'browsercat_navigate'.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));
  • index.ts:425-427 (registration)
    Registration of the CallToolRequestSchema handler, which routes tool calls to the handleToolCall function based on the tool name.
    server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}) );
  • Helper function ensureBrowser() that initializes and connects to the BrowserCat remote browser instance via Puppeteer if not already done, sets up console logging, and returns the active page instance used by the navigate handler.
    async function ensureBrowser() { if (!browser) { // Connect to BrowserCat remote browser using the correct endpoint and header format const browsercatEndpoint = 'wss://api.browsercat.com/connect'; browser = await puppeteer.connect({ browserWSEndpoint: browsercatEndpoint, headers: { 'Api-Key': requiredEnvVars.BROWSERCAT_API_KEY! } }); const pages = await browser.pages(); if (pages.length === 0) { page = await browser.newPage(); } else { page = pages[0]; } // Capture console logs from the browser page.on("console", (msg) => { const logEntry = `[${msg.type()}] ${msg.text()}`; consoleLogs.push(logEntry); server.notification({ method: "notifications/resources/updated", params: { uri: "console://logs" }, }); }); } return page!; }

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/pipethedev/browsercat-mcp-server'

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