I built a system that lets AI agents (like Claude) interact with Classic Mac OS System 7 through OS 9 on real hardware and emulators.
The architecture is simple: AgentBridge is a native Mac app that polls an inbox folder for text-file commands, executes them via the Mac Toolbox, and writes responses to an outbox folder. An MCP server on the modern side reads and writes those files. The shared folder can be a NAS, an emulator's host directory, or anything else both sides can access.
No SSH. No screen capture. No input injection at the host level. No system extensions or modifications. AgentBridge is just a regular Mac application, the only interface between the AI and the Mac is a folder full of text files.
The protocol is intentionally minimal: line-oriented key-value pairs, CR line endings, MacRoman encoding, parseable in ~50 lines of C with zero dynamic memory allocation. Commands cover window enumeration, app launching, menu selection, mouse/keyboard input, clipboard access, file browsing, and process listing.
The whole pipeline is verified working end-to-end: Claude Desktop -> MCP server -> Synology NAS -> AgentBridge on a Mac -> launches AppleWorks and types into a document.
Some fun bugs I hit along the way: a short overflow that silently prevented the text buffer from ever being populated (the 32KB max message size overflowed a 16-bit signed parameter to -32768, causing an early return), and PostEvent delivering keyboard events to AgentBridge's own event queue instead of the frontmost app under cooperative multitasking.
Built with Retro68 (GCC cross-compiler for 68k/PPC Macs). The MCP server is GPLv3 TypeScript; the Mac app is closed-source with pre-built binaries available. The protocol itself is open for anyone to implement.
hammer32•3h ago
The architecture is simple: AgentBridge is a native Mac app that polls an inbox folder for text-file commands, executes them via the Mac Toolbox, and writes responses to an outbox folder. An MCP server on the modern side reads and writes those files. The shared folder can be a NAS, an emulator's host directory, or anything else both sides can access.
No SSH. No screen capture. No input injection at the host level. No system extensions or modifications. AgentBridge is just a regular Mac application, the only interface between the AI and the Mac is a folder full of text files.
The protocol is intentionally minimal: line-oriented key-value pairs, CR line endings, MacRoman encoding, parseable in ~50 lines of C with zero dynamic memory allocation. Commands cover window enumeration, app launching, menu selection, mouse/keyboard input, clipboard access, file browsing, and process listing.
The whole pipeline is verified working end-to-end: Claude Desktop -> MCP server -> Synology NAS -> AgentBridge on a Mac -> launches AppleWorks and types into a document.
Some fun bugs I hit along the way: a short overflow that silently prevented the text buffer from ever being populated (the 32KB max message size overflowed a 16-bit signed parameter to -32768, causing an early return), and PostEvent delivering keyboard events to AgentBridge's own event queue instead of the frontmost app under cooperative multitasking.
Built with Retro68 (GCC cross-compiler for 68k/PPC Macs). The MCP server is GPLv3 TypeScript; the Mac app is closed-source with pre-built binaries available. The protocol itself is open for anyone to implement.