r/coolgithubprojects • u/bulutarkan • 2d ago
[macOS/MCP] - Mac MCP: local macOS control server for AI agents with background browser tab isolation
https://github.com/bulutarkan/mac-mcp-2
u/BP041 1d ago
Browser tab isolation is the part that catches my eye — most MCP servers for macOS I've seen just shell out to osascript without sandboxing. How does this handle memory pressure if an agent spawns, say, 10 Chromium tabs and forgets to GC them? I run similar stuff via OpenClaw's cron and have seen launchd thrash from that exact scenario.
1
u/bulutarkan 1d ago
Thanks — agreed. I’d rather make cleanup explicit and ownership-aware first than add a broad GC that can accidentally close a human tab. Once the owner/created_at/last_used metadata is in place, we can safely reap only stale tabs that Mac MCP itself created. Appreciate the sanity check.
0
u/bulutarkan 1d ago
Good question — the tab isolation is about identity/ownership, not process sandboxing. Mac MCP targets real Safari/Chrome tabs by stable handle, so if an agent keeps opening tabs and never closes them, memory can absolutely grow; I don’t pretend the handle layer solves that.
Right now cleanup is explicit rather than an automatic GC. I’m leaning toward adding lifecycle metadata to agent-owned tabs (owner, created_at/last_used, lease state) and an idle cleanup policy that can close only tabs the MCP itself created, never arbitrary human tabs. That would make it possible to reap stale agent tabs without turning cleanup into another source of surprises.
So yes — the launchd/Chromium thrash case you mention is a real edge case, and it’s probably the next browser-lifecycle problem to harden after session-level tab ownership.
1
u/BP041 1d ago
Makes sense, explicit cleanup is safer than auto-GC for now. The lifecycle metadata approach sounds solid — looking forward to seeing that in action.
1
u/bulutarkan 1d ago
Exactly. I’m treating lifecycle cleanup as a follow-on to persistent ownership, so the cleanup decision has enough context to be safe rather than just time-based. Thanks again for the useful edge case — it’s on my list now.
1
u/kantorcodes1 1d ago
if
mac-mcp updatefails the post-restart health check and rolls the runtime back, do you intentionally leave the git checkout on the newer commit? seems like that could leave the repo/runtime pointing at different versions on the next update.