Skip to main content
Glama

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
NameRequiredDescriptionDefault
udidNoUdid of target, can also be set with the IDB_UDID env var
app_pathYesPath 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}` ), }, ], }; } } ); }
  • 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" ), },
  • 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}` ), }, ], }; } }

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/joshuayoes/ios-simulator-mcp'

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