Skip to main content
Glama
andreahaku

Expo iOS Development MCP Server

by andreahaku

simulator.record_video.start

Start recording video of the iOS Simulator screen for React Native/Expo development testing and debugging.

Instructions

Start recording video of the simulator screen

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName prefix for the video file.recording

Implementation Reference

  • Core implementation of the video recording start logic using simctl's recordVideo command.
    export async function startVideoRecording(name: string = "recording"): Promise<VideoRecordingInfo> {
      logger.info("simulator", `Starting video recording: ${name}`);
    
      if (recordingProcess) {
        throw createError("SIMCTL_FAILED", "Video recording is already in progress", {
          details: `Current recording: ${currentVideoPath}`,
        });
      }
    
      // Check if simulator is booted
      if (!stateManager.isSimulatorReady()) {
        const bootedDevice = await getBootedDevice();
        if (!bootedDevice) {
          throw createError("SIM_NOT_BOOTED", "No simulator is currently booted", {
            details: "Boot a simulator first using simulator.boot",
          });
        }
        stateManager.updateSimulator({
          state: "booted",
          udid: bootedDevice.udid,
          deviceName: bootedDevice.name,
        });
      }
    
      currentVideoPath = await artifactManager.getVideoPath(name);
    
      // Start recording in the background
      recordingProcess = execa("xcrun", ["simctl", "io", "booted", "recordVideo", currentVideoPath], {
        reject: false,
      });
    
      const startedAt = new Date().toISOString();
    
      logger.info("simulator", `Video recording started: ${currentVideoPath}`);
    
      return {
        isRecording: true,
        path: currentVideoPath,
        startedAt,
      };
    }
  • MCP tool registration, including thin wrapper handler that calls the core startVideoRecording function.
    server.tool(
      "simulator.record_video.start",
      "Start recording video of the simulator screen",
      VideoRecordingInputSchema.shape,
      async (args) => {
        try {
          const result = await startVideoRecording(args.name);
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify({ success: true, ...result }, null, 2),
              },
            ],
          };
        } catch (error) {
          return handleToolError(error);
        }
      }
    );
  • Zod schema defining input parameters for the tool (optional name with default).
    export const VideoRecordingInputSchema = z.object({
      name: z.string().optional().default("recording").describe("Name prefix for the video file."),
    });

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/andreahaku/expo_ios_development_mcp'

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