mobile_open_url
Open URLs in mobile device browsers using the Mobile Next MCP server. Specify device identifier and URL to launch web content on iOS or Android devices.
Instructions
Open a URL in browser on device
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | The device identifier to use. Use mobile_list_available_devices to find which devices are available to you. | |
| url | Yes | The URL to open |
Implementation Reference
- src/server.ts:327-338 (registration)Registration of the MCP tool 'mobile_open_url' using the 'tool' helper function. Includes the tool name, description, input schema (url: string), and inline handler that requires a selected robot/device and calls robot.openUrl(url).tool( "mobile_open_url", "Open a URL in browser on device", { url: z.string().describe("The URL to open"), }, async ({ url }) => { requireRobot(); await robot!.openUrl(url); return `Opened URL: ${url}`; } );
- src/server.ts:333-337 (handler)Inline handler function for the 'mobile_open_url' tool. Ensures a device/robot is selected via requireRobot(), then invokes the platform-specific robot.openUrl(url) method, and returns a success message.async ({ url }) => { requireRobot(); await robot!.openUrl(url); return `Opened URL: ${url}`; }
- src/android.ts:256-258 (handler)Android-specific implementation of openUrl in AndroidRobot class, using ADB to start an intent with ACTION_VIEW and the provided URL.public async openUrl(url: string): Promise<void> { this.adb("shell", "am", "start", "-a", "android.intent.action.VIEW", "-d", url); }
- src/ios.ts:150-153 (handler)iOS physical device implementation of openUrl in IosRobot, delegating to WebDriverAgent (WDA).public async openUrl(url: string): Promise<void> { const wda = await this.wda(); await wda.openUrl(url); }
- src/iphone-simulator.ts:66-70 (handler)iOS Simulator implementation of openUrl in Simctl class (extends Robot), delegating to WebDriverAgent (WDA), with commented alternative using simctl.public async openUrl(url: string) { const wda = await this.wda(); await wda.openUrl(url); // alternative: this.simctl("openurl", this.simulatorUuid, url); }