Peekaboo Hits 5K Stars Letting AI Agents Drive Real Mac Desktops
Peekaboo turns your Mac into a controllable target for AI agents, combining screen capture, accessibility inspection, and native UI automation behind an MCP server.
ProTakeaways
- Peekaboo is a macOS CLI, menu-bar app, and MCP server for AI-driven desktop automation.
- Combines screen capture, accessibility tree inspection, and native input control in one see-then-act loop.
- Agent runtime supports OpenAI, Claude, Grok, Gemini, and Ollama with resumable sessions.
- Version 4.2.2 adds background middle/triple clicks and stricter refusal of ambiguous input targets.
- Installs via
brew install steipete/tap/peekabooornpx @steipete/peekaboo, requires macOS 15+. - MIT licensed, 5k+ stars, exposes tools to Codex, Claude Code, and Cursor over stdio MCP.
A macOS automation toolkit called Peekaboo has crossed 5,000 GitHub stars by tackling a problem most agent frameworks handle badly: actually driving a real desktop. Rather than wrapping headless browsers or shelling out to osascript, it exposes the Mac's native accessibility tree and input APIs through a CLI, a menu-bar app, and an MCP server that clients like Codex, Claude Code, and Cursor can call directly.
Peekaboo describes itself as Mac automation that sees the screen and does the clicks. The docs frame it as a toolkit for humans and agents that captures pixels, reads the accessibility tree, drives input, and ships an agent runtime plus an MCP server so AI clients can drive the desktop with the same primitives you would use from the shell.
The see-then-act loop
The core design is a two-step loop: observe the current screen, choose an element from the result, and act on it. The see command produces a structured UI map with opaque element IDs that an agent can then reference in follow-up click, type, or press calls. That means the model does not have to reason about pixel coordinates, which is the failure mode for most vision-only computer-use agents.
A typical Safari automation looks like this from the shell:
peekaboo window list --app Safari --json
peekaboo click "Address and search bar" --app Safari --window-id 12345
peekaboo type "github.com/steipete/Peekaboo" --app Safari --window-id 12345
peekaboo press Return --app Safari --window-id 12345