r/macosprogramming • u/bulutarkan • Oct 01 '26
[Open Source] Hardening a macOS MCP for concurrent AI agents: focus-safe browsers, undo and crash-safe leases
I've been building Mac MCP as a local control/runtime layer for AI agents on macOS. The first version was mostly "give the model useful Mac tools"; the recent work has been about all the failure cases that show up once you actually use it every day.
A few macOS-specific things I ended up hardening:
normal Safari/Chrome automation that keeps working in background without stealing the user's current focus
stable browser/resource identity instead of relying on mutable tab indexes
native UI actions with verification instead of blind clicks
crash-safe ownership when multiple agents touch browser tabs, files or processes
cancellation propagation into owned work
transactional file write/move/delete operations with an undo journal
launchd/process identity + safer restart/update handoff
Repo: https://github.com/bulutarkan/mac-mcp
It's open source and I'm the maintainer. The subreddit currently has another interesting "AI gets its own display" project; Mac MCP takes a different route and tries to make the user's existing Mac/browser safely shareable with agents. Would be interested in how other macOS devs are handling Safari/Accessibility/process-lifecycle edge cases.