Summary
Replace the current CLI-based IPC (JSON over stdin/stdout with child process spawning) with XPC for faster, more efficient communication.
Details
- Currently, the TypeScript MCP server spawns the Swift executor as a child process and communicates via JSON over stdin/stdout
- XPC would provide:
- Lower latency (no process spawn per call)
- Better resource management
- Native macOS IPC with Mach messaging
- Requires an XPC service target in the Swift package
- The TypeScript side would need an XPC client (likely via a native addon or a long-lived bridge process)
- This is a significant architectural change
Affected components
packages/executor-swift/ — convert to XPC service
packages/mcp-server/src/exec/ — replace child process spawning with XPC client
Phase 23 item
From TODO.md
Phase 23: XPC executor — Replace CLI-based IPC with XPC for faster communication
Summary
Replace the current CLI-based IPC (JSON over stdin/stdout with child process spawning) with XPC for faster, more efficient communication.
Details
Affected components
packages/executor-swift/— convert to XPC servicepackages/mcp-server/src/exec/— replace child process spawning with XPC clientPhase 23 item
From TODO.md
Phase 23: XPC executor — Replace CLI-based IPC with XPC for faster communication