Sandbox
@openclaw/Peekaboo

MCP server for macOS screen capture and UI automation

Peekaboo gives agents a way to inspect the macOS screen, capture screenshots, and control apps through the CLI or MCP. It combines screenshot, accessibility, click, type, and window commands so an agent can observe and then act. The menu-bar app adds permission onboarding and visual feedback.

5,141 starsβ€’394 forksβ€’Swiftβ€’Updated 9d ago
Who it's for

Builders who want their agent to inspect macOS apps, take screenshots, and control the UI.

What it delivers

You can let an agent see the screen, choose a target, and carry out macOS actions without switching tools.

What it does

Screen capture

Captures an app window or the whole screen with CLI commands like `see` and `capture`.

UI inspection

Lists windows and returns structured accessibility data with stable element IDs.

Native UI automation

Clicks, types, presses keys, scrolls, drags, and sets values in macOS apps.

Agent runs

Runs natural-language agent sessions that combine observation and action steps.

MCP integration

Exposes the same tools to MCP clients through the launcher package.

Permission onboarding

The menu-bar app helps users grant screen recording, accessibility, and input permissions.

How to get it

  1. 1Run
    brew install openclaw/tap/peekaboo
  2. 2The npm package requires Node.js 22 or later and includes the CLI plus its MCP launcher.
    npx -y @steipete/peekaboo --version
  3. 3Check the permissions available to Peekaboo, then take a screenshot
    peekaboo permissions status
    peekaboo see --no-elements --mode screen --path /tmp/peekaboo-screen.png
  4. 4Inspect a running app to get a structured UI map with opaque element IDs
    peekaboo see --app Finder --json

README

Peekaboo 🫣 β€” Mac automation that sees the screen and does the clicks.

CI npm GitHub release macOS 15+ Swift 6.2 Node License Homebrew Ask DeepWiki

Peekaboo is a macOS CLI and menu-bar app for screen capture, accessibility inspection, and native UI automation. Use it directly, let its agent plan multi-step work, or expose the same toolset to MCP clients.

Peekaboo banner

Install

The released CLI and app require macOS 15 or later.

CLI with Homebrew

brew install openclaw/tap/peekaboo

MCP package with npm

The npm package requires Node.js 22 or later and includes the CLI plus its MCP launcher.

npx -y @steipete/peekaboo --version

See MCP setup to connect it to Codex, Claude Code, Cursor, or another MCP client.

Mac app

Download the signed DMG from the latest GitHub release. The menu-bar app provides permission onboarding, visual feedback, and agent sessions; install the CLI separately when you also need peekaboo on PATH.

For source builds and alternative install details, see the installation guide.

Quick start

Check the permissions available to Peekaboo, then take a screenshot:

peekaboo permissions status
peekaboo see --no-elements --mode screen --path /tmp/peekaboo-screen.png

Screen capture requires Screen Recording permission. Accessibility permission enables UI inspection and control; the permissions guide covers setup and the additional permission used for synthetic input.

Inspect a running app to get a structured UI map with opaque element IDs:

peekaboo see --app Finder --json

That is the core loop: observe the current screen, choose an element from the result, and act on it.

What's new in 4.3.3

Peekaboo 4.3.3 prevents accidental GUI host launches when the app bundle is invoked as the CLI, makes immutable Firestaff manifest reads safer with optional byte limits, and restores side-effect-free config edit --print-path queries. Generated Homebrew smoke tests now recognize the v4 help header.

Automate an app

List Safari's windows, copy the intended window_id (12345 below), then keep the entire interaction pinned to that exact window:

peekaboo window list --app Safari --json
peekaboo click "Address and search bar" --app Safari --window-id 12345
peekaboo type "github.com/openclaw/Peekaboo" --app Safari --window-id 12345
peekaboo press Return --app Safari --window-id 12345

Targeted semantic and typed CLI input uses background delivery when Peekaboo can resolve the process, so the app does not have to become frontmost. Raw CLI press chords can also stay background with an exact window selector. The CLI also accepts a fresh exact non-dialog snapshot; that snapshot is required by background-only Agent/MCP policy. App/PID-only and targetless chords require explicit foreground consent, as do window-selector-only Agent/MCP chords. Prefer a semantic action such as menu click when one exists. See the automation guide for element IDs, coordinates, snapshots, waits, and input behavior.

Agent and MCP

The agent combines the same observation and action tools into a natural-language run:

peekaboo agent "Open Safari, go to github.com, and search for Peekaboo" --allow-foreground

Agent runs need a configured model provider. See agent setup for providers and sessions, or MCP setup to expose Peekaboo's tools to another client.

Command map

GoalCommandsGuide
Observe the desktopsee, screen list, window listCapture and inspection
Interact with UIclick, type, press, scroll, drag, set-value, actionAutomation
Control macOSapp, window, menu, menubar, dock, dialog, spaceCommand reference
Run workflowsagent, captureAgent Β· Capture
Integrate with clientsmcp, browser, toolsMCP

Run peekaboo help <command> for live CLI help. The complete command index links to flags, examples, and troubleshooting for every command.

Configuration

Peekaboo stores provider credentials and settings under ~/.peekaboo. Use peekaboo config to inspect or change them, and consult the configuration guide for profiles, environment variables, and custom providers. The provider reference covers hosted, compatible, and local model backends.

Shell completions for zsh, bash, and fish come from peekaboo completions; see the completion guide for persistent setup.

Learn more

Community

  • PeekabooWin β€” Windows-first rewrite of the Peekaboo automation loop (JavaScript + PowerShell) by @FelixKruger
  • PeekabooX β€” Linux-first rewrite of the Peekaboo automation loop (Rust + Python) by @nordbyte

Development

Source builds require macOS 15 or later, Swift 6.2 or later, Node.js 22 or later, and the repository's submodules.

pnpm install --frozen-lockfile
pnpm run build:cli
pnpm run lint:docs
pnpm run test:safe

More build, signing, and test details live in docs/building.md.

License

MIT. See LICENSE.

Files in the repo

Repository payloadβ€’41 top-level entries
  • .agents
  • .github
  • Apps
  • assets
  • Core
  • docs
  • experiments
  • Helpers
  • homebrew
  • release
  • scripts
  • skills
  • tests
  • .crabbox.yaml
  • .envrc
  • .gitignore
  • .gitmodules
  • .mac-release-terminal.env
  • .mac-release.env
  • .npmignore
  • .swiftformat
  • .swiftlint-ci.yml
  • .swiftlint.yml
  • AGENTS.md
  • appcast.xml
  • AXorcist
  • CHANGELOG.md
  • CLAUDE.md
  • Commander
  • LICENSE
  • package.json
  • Package.swift
  • peekaboo-mcp.js
  • pnpm-lock.yaml
  • pnpm-workspace.yaml
  • README.md
  • Swiftdansi
  • Tachikoma
  • TauTUI
  • version.json
  • VISION.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph β€” average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code β€” use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300Β΅s in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up β€” it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k