Skip to main content
Glama
mobile-next

Mobile Next MCP Server

Official
by mobile-next

mobile_open_url

Use this tool to open any specified URL directly in the browser of a mobile device, enabling quick access to web content during automation processes on iOS and Android platforms.

Instructions

Open a URL in browser on device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to open

Implementation Reference

  • src/server.ts:428-440 (registration)
    Registers the 'mobile_open_url' MCP tool, including schema for 'device' and 'url' parameters, and the handler function that retrieves the appropriate robot for the device and calls its openUrl method.
    tool( "mobile_open_url", "Open a URL in browser on device", { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), url: z.string().describe("The URL to open"), }, async ({ device, url }) => { const robot = getRobotFromDevice(device); await robot.openUrl(url); return `Opened URL: ${url}`; } );
  • The core handler logic for the mobile_open_url tool: obtains the platform-specific Robot instance and invokes its openUrl method with the provided URL.
    async ({ device, url }) => { const robot = getRobotFromDevice(device); await robot.openUrl(url); return `Opened URL: ${url}`; }
  • Zod schema defining input parameters: 'device' (string, required device ID) and 'url' (string, the URL to open).
    { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), url: z.string().describe("The URL to open"), },
  • Helper function used by the handler to resolve a device identifier to the corresponding Robot implementation (AndroidRobot, IosRobot, or Simulator).
    const getRobotFromDevice = (device: string): Robot => { const iosManager = new IosManager(); const androidManager = new AndroidDeviceManager(); const simulators = simulatorManager.listBootedSimulators(); const androidDevices = androidManager.getConnectedDevices(); const iosDevices = iosManager.listDevices(); // Check if it's a simulator const simulator = simulators.find(s => s.name === device); if (simulator) { return simulatorManager.getSimulator(device); } // Check if it's an Android device const androidDevice = androidDevices.find(d => d.deviceId === device); if (androidDevice) { return new AndroidRobot(device); } // Check if it's an iOS device const iosDevice = iosDevices.find(d => d.deviceId === device); if (iosDevice) { return new IosRobot(device); } throw new ActionableError(`Device "${device}" not found. Use the mobile_list_available_devices tool to see available devices.`);

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/mobile-next/mobile-mcp'

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