install_app
Install app bundles (.app or .ipa files) on iOS Simulators for testing and development purposes.
Instructions
Installs an app bundle (.app or .ipa) on the iOS Simulator
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| udid | No | Udid of target, can also be set with the IDB_UDID env var | |
| app_path | Yes | Path to the app bundle (.app directory or .ipa file) to install |
Implementation Reference
- src/index.ts:875-931 (registration)Conditional registration of the 'install_app' tool using server.tool(), including schema and handler, only if not filtered by IOS_SIMULATOR_MCP_FILTERED_TOOLS environment variable.if (!isToolFiltered("install_app")) { server.tool( "install_app", "Installs an app bundle (.app or .ipa) on the iOS Simulator", { udid: z .string() .regex(UDID_REGEX) .optional() .describe("Udid of target, can also be set with the IDB_UDID env var"), app_path: z .string() .max(1024) .describe( "Path to the app bundle (.app directory or .ipa file) to install" ), }, async ({ udid, app_path }) => { try { const actualUdid = await getBootedDeviceId(udid); const absolutePath = path.isAbsolute(app_path) ? app_path : path.resolve(app_path); // Check if the app bundle exists if (!fs.existsSync(absolutePath)) { throw new Error(`App bundle not found at: ${absolutePath}`); } // run() will throw if the command fails (non-zero exit code) await run("xcrun", ["simctl", "install", actualUdid, absolutePath]); return { isError: false, content: [ { type: "text", text: `App installed successfully from: ${absolutePath}`, }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: errorWithTroubleshooting( `Error installing app: ${toError(error).message}` ), }, ], }; } } ); }
- src/index.ts:879-891 (schema)Zod input schema for 'install_app' tool: optional 'udid' matching UDID regex, required 'app_path' as string up to 1024 chars.{ udid: z .string() .regex(UDID_REGEX) .optional() .describe("Udid of target, can also be set with the IDB_UDID env var"), app_path: z .string() .max(1024) .describe( "Path to the app bundle (.app directory or .ipa file) to install" ), },
- src/index.ts:892-929 (handler)Handler function installs the app: resolves UDID, makes app_path absolute, checks existence, runs 'xcrun simctl install', returns success or error message with troubleshooting.async ({ udid, app_path }) => { try { const actualUdid = await getBootedDeviceId(udid); const absolutePath = path.isAbsolute(app_path) ? app_path : path.resolve(app_path); // Check if the app bundle exists if (!fs.existsSync(absolutePath)) { throw new Error(`App bundle not found at: ${absolutePath}`); } // run() will throw if the command fails (non-zero exit code) await run("xcrun", ["simctl", "install", actualUdid, absolutePath]); return { isError: false, content: [ { type: "text", text: `App installed successfully from: ${absolutePath}`, }, ], }; } catch (error) { return { isError: true, content: [ { type: "text", text: errorWithTroubleshooting( `Error installing app: ${toError(error).message}` ), }, ], }; } }