agent-peek
Reads text from Arc browser tabs, including background tabs, either from the live page or through a logged-out fetch of the tab URL.
Reads iMessage and SMS history from the local Messages database, with tools to list chats, read messages, and search messages; contact names are included, and the feature can be disabled.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-peekSummarize the PDF I have open in Preview."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-peek
Let your AI agents see what you're looking at on your Mac.
Connectors cover Notion, Slack and Gmail. They don't cover the PDF open in Preview, the page in your browser, the chart in some internal tool, or the conversation in Messages. Peek gives your local agents (the Claude desktop app, Claude Code and Codex) a read-only view of anything open on your Mac. The agent decides what it needs, and you decide what's off limits.
You: Summarize the PDF I have open in Preview.
Claude: → list_sources (sees Preview, Arc, Slack, Notes…)
→ peek(Preview)
"It's a 12-page lease. The key terms are…"What it can read
Source | How |
Any app window: visible, minimized, or on another Space | macOS Accessibility gives the text, including text scrolled out of view where the app exposes it. Windows on other Spaces are read with Apple's built-in OCR on a screenshot. |
Screenshots of any window | One window at a time, never your whole screen |
Arc and Chrome tabs, including background tabs | The live page through the browser, or a logged-out fetch of the URL |
PDFs and documents open in Preview, TextEdit and similar apps | The whole file, not just the visible page |
Clipboard | Text, links, copied files, images |
Files selected in Finder | PDF, Word, RTF, HTML, text and code files, images, folders |
iMessage / SMS history (on by default, can be turned off) | The local Messages database, with contact names |
Tested with Arc, Chrome, Slack, Notion, Linear, Granola, Messages, Spotify and Docker Desktop. Electron and Chromium apps are supported: peek turns on their accessibility tree for you.
Related MCP server: mac-mcp
Install
Pick one of the two modes.
A. For one agent
Claude desktop app: download agent-peek.mcpb, double-click it, and click Install. Settings → Extensions → Peek lets you turn off Messages and block apps.
Claude Code or Codex: use the machine-wide installer below and name just that agent:
curl -fsSL https://raw.githubusercontent.com/lu-wo/agent-peek/main/install.sh | sh -s -- claude-codeB. Machine-wide, connected to every agent
curl -fsSL https://raw.githubusercontent.com/lu-wo/agent-peek/main/install.sh | shThis installs peek once to ~/.agent-peek and connects it to every supported agent it finds: the Claude desktop app, Claude Code and Codex. Add --no-messages to leave out Messages history, or --block "Signal,WhatsApp" to block apps:
curl -fsSL https://raw.githubusercontent.com/lu-wo/agent-peek/main/install.sh | sh -s -- --no-messages --block "Signal"Manage it later with the agent-peek command:
agent-peek connect codex # connect another agent
agent-peek disconnect claude-desktop
agent-peek grant # give Agent Peek its macOS permissions
agent-peek doctor # check connections and permissionsBefore changing an agent's config file, peek saves a one-time backup next to it (*.peek-backup). It never touches anything else in that file.
The machine-wide install needs Node.js 18 or newer (brew install node). The Claude extension doesn't, because Claude ships its own Node.js.
Then grant permissions (both modes)
Peek's native part runs as its own small app, Agent Peek, so you grant permissions once to Agent Peek, not to each agent. Run agent-peek grant, or just ask your agent what's on your screen: macOS shows its prompts the first time. In System Settings → Privacy & Security, turn on Agent Peek under:
Accessibility: reading window text
Screen Recording: screenshots, and windows on other Spaces
Full Disk Access: Messages history (skip it if you turned Messages off; add Agent Peek with +)
Changes take effect immediately; nothing needs restarting. The first time peek reads a browser tab, macOS asks whether your agent app may control Arc or Chrome. Click Allow.
Why a separate app? Agent apps such as the Claude desktop app start tools in a way that stops macOS from passing the app's own permissions on to them. Turning Claude.app on under Accessibility therefore doesn't help peek. Launching Agent Peek on its own makes it the app macOS checks.
"Agent Peek Not Opened" / "Apple could not verify…" Peek isn't notarized yet. Open System Settings → Privacy & Security, scroll to Security, click Allow Anyway next to Agent Peek, and retry. The
curlinstaller avoids this prompt. Until releases are signed with a Developer ID, each update also resets Agent Peek's permissions, so you'll need to switch them on again.
The ChatGPT chat app isn't supported because it only accepts remote servers. Codex inside the ChatGPT desktop app works.
Tools
Tool | What it does |
| Lists windows front to back, each with a state ( |
| Returns a window's text, URL and open document, and optionally a screenshot |
| Returns any tab's text. |
| Returns the clipboard contents |
| Returns the selected Finder files with their contents |
| Read Messages history (unless turned off) |
Privacy
Read-only. Peek never clicks, types or sends. The only visible effect is
read_tabwithactivate: true, which switches a tab and switches it back.Local. Peek makes no network calls, with one exception: fetching a public URL when a background tab is suspended. What an agent reads goes to that agent's model provider, just like anything else you share with it.
You set the limits. Password managers (Passwords, 1Password, Bitwarden, Keychain Access) are always blocked. Block more with
--blockor in the Claude extension's settings. Messages can be turned off with--no-messagesor in the extension settings; without Full Disk Access it can't read anything anyway.Prompt injection. Window and web content can contain text written to manipulate an agent. Peek labels everything it returns as untrusted data, and the agent should never follow instructions found in it.
Limitations
macOS 13 or newer.
Apps running with no window open can't be read; Messages history is the exception. Hidden apps (⌘H) are listed but usually can't be read.
Long lists like Slack channels and Messages threads only expose the rows currently rendered. Scroll to load more, or enable Messages history.
Apps that draw their own UI (canvases, games) expose little text. Use
screenshot: true.OCR text, used for other Spaces, has no links or structure.
The machine-wide install records the absolute path to
node. If you switch Node versions (nvm, for example), runagent-peek connectagain.
How it works
helper/peek-helper.swiftis a small native command-line program, packaged asAgent Peek.appand launched withopenso it holds its own permissions. It uses CoreGraphics (window list), Accessibility (text),screencapture(screenshots), Vision (OCR), PDFKit (PDFs), NSPasteboard (clipboard) and SQLite (Messages and Contacts).server.mjsis an MCP server on stdio. It calls the helper (throughhelper.mjs), AppleScript (browser tabs, Finder selection) andtextutilfor Word, RTF and HTML.cli.mjsprovides theagent-peekconnect, disconnect and doctor commands.
Develop
npm install
scripts/build-helper.sh # helper/Agent Peek.app with a universal binary
scripts/package.sh # dist/agent-peek.mcpb + dist/agent-peek-macos.tar.gz
node cli.mjs connect claude-codeReleases are built by GitHub Actions when a v* tag is pushed.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Read-only MCP server exposing a user ORANO library to their own AI agent.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that lets AI assistants see your macOS desktop, capture screenshots, read browser tabs, and preview files via local macOS tools.417 npmMIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that exposes data from native macOS apps (Mail, Notes, Calendar, Reminders, Contacts, Messages, Spotlight) to AI agents over stdio, currently in early development with no domain tools wired yet.4 npm5MIT
- AlicenseBqualityDmaintenanceMCP server that enables AI to fully control macOS — mouse, keyboard, terminal, screenshots, window management, UI element detection, and provides AI-optimized information reporting.3633 npmMIT
- AlicenseNot gradedqualityBmaintenanceMCP server that gives AI agents hands and eyes on macOS, enabling them to see and operate native and Electron applications via structured accessibility queries, screenshots, OCR, and application-specific skills.4MIT