Skip to main content
Glama

MCP iOS Simulator Screenshot

by yorifuji
config.ts1.11 kB
/** * Application configuration */ /** * Escape function for command injection prevention * @param input String to escape * @returns Escaped string */ function escapeShellArg(input: string): string { // Remove dangerous characters (shell special characters) return input.replace(/[;&|`$(){}[\]<>"'\\]/g, ''); } export const config = { /** * Screenshot settings */ screenshot: { // Default output directory name for screenshots defaultOutputDirName: '.screenshots', // Default maximum width for resizing (pixels) defaultMaxWidth: 640, // Maximum buffer size for command execution (bytes) maxBufferSize: 50 * 1024 * 1024, // 50MB // Command definitions commands: { // Screenshot capture command capture: (deviceId?: string): string => { // Use 'booted' if deviceId is not specified const id = deviceId || 'booted'; // Apply escape processing for command injection prevention const safeId = escapeShellArg(id); return `xcrun simctl io ${safeId} screenshot --type=png -`; } } } };

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

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