Turning a phone into a secondary input device for a Mac usually requires installing companion apps on both devices. MacPilot skips mobile app installation entirely and runs everything through a standard phone browser.

Zero-Dependency Native Server on macOS

A lightweight Swift menu bar app hosts both an HTTP server and a WebSocket server directly on the Mac using Apple’s native NWListener API, handling local network traffic with zero third-party frameworks.

On the phone, scanning a QR code opens the controller interface immediately in Safari or Chrome with nothing to install.

The build setup stays equally lean: XcodeGen generates project files dynamically, and an optional launchd configuration starts the server automatically in the background at login without opening Xcode.

OS-Level Input Injection via Quartz Event Services

Touch gestures and keystrokes travel from the mobile browser over WebSockets to the Mac, where an input injector creates native CGEvent instances so macOS treats them like physical mouse and keyboard hardware.

Beyond basic clicks, the app handles two-finger scrolling, pinch-to-zoom, and three-finger swipes smoothly. Direct Unicode injection also ensures Korean characters and emoji type cleanly without layout glitches.

Because all traffic stays inside the local Wi-Fi router with no cloud relay, input packets never leave the local network.

Software Macro Deck Built In

MacPilot also replicates hardware Stream Deck workflows in software. Users arrange shortcut chords, text snippets, and app launchers as touch cards, including multi-step macros that fire actions in sequence.

Configuration data lives in local Mac storage and syncs live across multiple connected phones or tablets, turning spare mobile devices into responsive desk controllers without extra hardware.

Built end-to-end with Claude Code, this compact open-source utility offers a clean alternative to bloated commercial remote apps.

Summary

  • Connects mobile browsers directly to macOS over the local network, eliminating companion app installs on phones.
  • Implements fast native input injection using NWListener and CGEvent with zero external library dependencies.
  • Serves as a clean example of a focused open-source macOS utility built end-to-end with Claude Code.