xc-mcp
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
57 lines • 4.18 kB
TypeScript
interface IdbConnectArgs {
udid?: string;
operation?: 'connect' | 'disconnect';
}
/**
* Manage IDB companion connections - establish persistent gRPC connections to iOS targets
*
* **What it does:**
* Manages persistent gRPC connections between IDB and iOS targets (simulators and physical devices).
* Establishes companion connections for faster subsequent operations, verifies connectivity, and
* cleanly disconnects when testing is complete. Auto-detects targets when UDID not provided and
* validates device readiness for physical devices (USB connection, trust status, companion service).
*
* **Why you'd use it:**
* - Warm up connections before automation workflows to reduce first-operation latency
* - Troubleshoot connectivity issues between IDB and physical devices over USB/WiFi
* - Explicitly manage connection lifecycle for multi-target test orchestration
* - Verify companion registration and gRPC channel establishment before critical operations
*
* **Parameters:**
* - udid (optional): Target identifier - auto-detects if omitted
* - operation (optional): "connect" | "disconnect" - defaults to "connect"
*
* **Returns:**
* Connection status with success indicator, target metadata (name, type, connection type),
* companion output, error details if failed, and troubleshooting guidance specific to
* simulators vs. physical devices.
*
* **Example:**
* ```typescript
* // Auto-detect and connect to booted target
* const result = await idbConnectTool({
* operation: 'connect'
* });
*
* // Connect to specific physical device
* const deviceConnect = await idbConnectTool({
* udid: 'DEVICE-UDID-123',
* operation: 'connect'
* });
* ```
*
* **Full documentation:** See idb/connect.md for detailed parameters and operations
*
* @param args Tool arguments with optional UDID and operation type
* @returns Tool result with connection status and troubleshooting guidance
*/
export declare function idbConnectTool(args: IdbConnectArgs): Promise<{
content: {
type: "text";
text: string;
}[];
isError: boolean;
}>;
export declare const IDB_CONNECT_DOCS = "\n# idb-connect\n\nManage IDB companion connections for persistent target access.\n\n## Overview\n\nManages persistent gRPC connections between IDB and iOS targets (simulators and physical devices). Establishes companion connections for faster subsequent operations, verifies connectivity, and cleanly disconnects when testing is complete. Auto-detects targets when UDID not provided and validates device readiness for physical devices (USB connection, trust status, companion service).\n\n## Parameters\n\n### Required\nNone - all parameters are optional\n\n### Optional\n- **udid** (string): Target identifier - auto-detects if omitted\n- **operation** (string, default: \"connect\"): Connection operation (\"connect\" or \"disconnect\")\n\n## Returns\n\nConnection status with success indicator, target metadata (name, type, connection type), companion output, error details if failed, and troubleshooting guidance specific to simulators vs. physical devices.\n\n## Examples\n\n### Auto-detect and connect to booted target\n```typescript\nconst result = await idbConnectTool({\n operation: 'connect'\n});\n```\n\n### Connect to specific physical device\n```typescript\nconst deviceConnect = await idbConnectTool({\n udid: 'DEVICE-UDID-123',\n operation: 'connect'\n});\n```\n\n### Disconnect from target\n```typescript\nconst disconnect = await idbConnectTool({\n udid: 'ABC-123-DEF',\n operation: 'disconnect'\n});\n```\n\n## Related Tools\n\n- idb-targets: List and manage iOS targets before connecting\n- idb-list-apps: Query installed apps after connection established\n- idb-install: Install apps after connection is ready\n\n## Notes\n\n- IDB maintains persistent gRPC connections to targets\n- Connecting registers the companion for faster subsequent operations\n- Auto-starts by IDB CLI if not already running\n- Physical devices require USB connection or WiFi network, device trust, and idb_companion service\n- Simulators only require IDB installation and booted state\n";
export {};
//# sourceMappingURL=connect.d.ts.map