Enables AI agents to capture screenshots of macOS screens, applications, and windows using Apple's ScreenCaptureKit, with support for listing running apps and windows for targeted captures.
Enables local AI-powered visual analysis of screenshots using Ollama vision models (llava, qwen2-vl) without sending data to cloud services.
Provides AI-powered visual analysis of screenshots using OpenAI's GPT-4o vision model to answer questions about captured screen content.
PeepIt MCP: Lightning-fast macOS Screenshots for AI Agents

PeepIt: Because Your AI Deserves to See What You See
Ever wish your AI assistant could just look at your screen and get it? PeepIt is here to grant your digital sidekick the gift of sight—no magic wands required. Whether you're debugging a UI, capturing a bug in the wild, or just want to know what's lurking behind that mysterious window, PeepIt's got your back (and your screen).
What is PeepIt?
PeepIt is a macOS-only MCP server that lets AI agents capture screenshots of your apps, windows, or the whole system—then analyze them with local or cloud-based AI models. It's like giving your AI a pair of glasses and a magnifying glass, all in one.
Capture screenshots of anything: the whole screen, a single app, or that one window you can never find
Analyze visual content with AI vision models (local or cloud—your call)
List running apps and windows for laser-targeted captures
Work non-intrusively—no window focus stealing, no workflow interruptions, no drama
Key Features
🚀 Fast & Non-intrusive: Blink and you'll miss it—PeepIt uses Apple's ScreenCaptureKit for lightning-fast screenshots, all without hijacking your window focus or interrupting your groove.
🎯 Smart Window Targeting: Fuzzy matching so sharp, it'll find the right window even if you only remember half its name (we've all been there).
🤖 AI-Powered Analysis: Ask questions about your screenshots and get answers from GPT-4o, Claude, or local models—because sometimes you need a second set of (robotic) eyes.
🔒 Privacy-First: Prefer to keep things on the down-low? Run everything locally with Ollama, or call in the cloud cavalry only when you really need it.
📦 Easy Installation: One-click install via Cursor, or just a quick npm/npx incantation—no arcane rituals required.
🛠️ Developer-Friendly: Clean JSON API, TypeScript support, and logs so comprehensive you'll wonder if PeepIt is secretly writing your memoirs.
Installation
Requirements
macOS 14.0+ (Sonoma or later)
Node.js 20.0+
Screen Recording Permission (don't worry, you'll be prompted—no need to go spelunking in System Settings)
Quick Start
For Cursor IDE
Or manually add to your Cursor settings:
For Claude Desktop
Edit your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add the PeepIt configuration (copy, paste, and you're halfway to AI vision):
Then restart Claude Desktop. (Yes, you really do have to restart it. We checked.)
Configuration
PeepIt is as configurable as your favorite text editor. Use environment variables to tune it to your workflow:
Available Environment Variables
Variable | Description | Default |
| Who's your AI? List providers for image analysis (see AI Analysis). |
|
| How chatty should PeepIt be? (trace, debug, info, warn, error, fatal) |
|
| Where to stash the logs. If the directory isn't writable, PeepIt finds a cozy temp folder. |
|
| Default directory for screenshots when you don't specify a path. | System temp directory |
| Where's your Ollama API? Only needed if it's not at the usual spot. |
|
| Want logs in your console? Set to |
|
| How long to wait for Swift CLI magic (ms). |
|
| Custom path to the Swift | (uses bundled CLI) |
AI Provider Configuration
The PEEPIT_AI_PROVIDERS variable is your golden ticket to AI-powered screenshot analysis. Want PeepIt to answer questions about your screen? Just list your favorite models:
PEEPIT_AI_PROVIDERS="openai/gpt-4o,ollama/llava:latest,anthropic/claude-3-haiku-20240307"
Or, if you're a semicolon connoisseur:
PEEPIT_AI_PROVIDERS="openai/gpt-4o;ollama/llava:latest;anthropic/claude-3-haiku-20240307"
Each entry is provider_name/model_identifier. Supported providers: ollama (for local), openai (for the cloud), and soon, anthropic (for the truly adventurous).
PeepIt will try providers in order, checking for API keys or local services as needed. You can override the model per request if you're feeling particular.
Setting Up Local AI with Ollama
Ollama brings AI vision to your desktop—no cloud required, no data leaving your Mac. (Your secrets are safe. Probably.)
Installing Ollama
Downloading Vision Models
For beefy machines:
For lighter laptops:
Model Size Guide:
qwen2-vl:7b- ~4GB download, ~6GB RAM (great for mortals)llava:7b- ~4.5GB download, ~8GB RAMllava:13b- ~8GB download, ~16GB RAMllava:34b- ~20GB download, ~40GB RAM (bring snacks)
Configuring PeepIt with Ollama
Add Ollama to your Claude Desktop config:
For lighter machines:
Mix and match AI providers:
macOS Permissions
PeepIt needs a few macOS permissions to work its magic. Don't worry, it's not asking for your Netflix password.
1. Screen Recording Permission (Required)
macOS Sequoia (15.0+):
System Settings → Privacy & Security
Scroll to Screen & System Audio Recording
Toggle on your terminal or MCP client
Restart the app (yes, again)
macOS Sonoma (14.0) and earlier:
System Preferences → Security & Privacy → Privacy
Select Screen Recording
Click the lock, enter your password
Add your terminal or MCP client
Restart the app
Apps that need permission:
Terminal.app
Claude Desktop
VS Code
Cursor
2. Accessibility Permission (Optional, but nice)
macOS Sequoia (15.0+):
System Settings → Privacy & Security → Accessibility
Toggle on your terminal/MCP client
macOS Sonoma (14.0) and earlier:
System Preferences → Security & Privacy → Privacy
Select Accessibility
Add your terminal/MCP client
Testing & Debugging
Using MCP Inspector
Want to see PeepIt in action? Fire up the MCP Inspector:
Direct CLI Testing
Expected output:
Available Tools
PeepIt gives you three main tools—think of them as your AI's Swiss Army knife:
1. image - Capture Screenshots
Snap a screenshot of your Mac—screen, app, or window. Shadows and frames? Gone. (You're welcome.)
Note: Screen captures are always saved to files (no Base64 for giant images—your stack won't like it). If you ask for format: "data", PeepIt will politely ignore you and save a PNG instead, with a gentle warning.
Examples:
Browser Helper Filtering: PeepIt is smart enough to avoid browser helper processes (no more "Google Chrome Helper (Renderer)" shenanigans). You'll get the real browser window, or a clear message if it's not running.
File Naming and Path Behavior:
Single capture? Your path is used as-is.
Multiple captures? PeepIt adds metadata to filenames so nothing gets overwritten.
Directory path? PeepIt generates unique names for you.
Long filenames? PeepIt trims them to fit macOS's 255-byte limit, keeping your emoji and non-Latin scripts intact.
Invalid formats? Only PNG and JPEG are allowed. Anything else gets converted, with a friendly warning.
2. list - System Information
List running apps, windows, or check server status. Because sometimes you just need to know what's out there.
Examples:
3. analyze - AI Vision Analysis
Feed an image to your AI and ask it anything. (Well, almost anything.)
Examples:
Testing
PeepIt comes with tests galore:
TypeScript Tests
Unit Tests: For the code that likes to be alone
Integration Tests: For the code that plays well with others
Platform-Specific Tests: Some tests need macOS and the Swift binary
Swift Tests
Platform Support
macOS: All tests
Linux/CI: TypeScript-only (Swift tests are skipped)
Env Vars:
SKIP_SWIFT_TESTS=true: Skip Swift testsCI=true: Skip Swift tests automatically
Troubleshooting
Haunting | Exorcism |
| Grant Screen Recording permission. Restart the app. |
Window capture issues | Grant Accessibility permission for more reliable targeting. |
| Make sure the |
| Check your AI provider config and API keys. Make sure local services are running. Check logs for details. |
| Ensure your PATH includes npm binaries, or use the right command. |
General weirdness | Check the logs! Set |
Debug Mode
Getting Help
Building from Source
Development Setup
Local Development Configuration
For local dev:
Or, running directly with node:
Use absolute paths and unique server names to avoid confusion.
AppleScript Version (Legacy)
For the old-school crowd:
Note: No AI analysis or MCP features in this version.
Manual Configuration for Other MCP Clients
Tool Documentation
image - Screenshot Capture
Capture your Mac's screen and optionally analyze it. Shadows and frames are automatically banished.
Parameters:
app_target(string, optional): Specifies the capture target. If omitted or empty, captures all screens.Examples:
"screen:INDEX": Captures the screen at the specified zero-based index (e.g.,"screen:0"). (Note: Index selection from multiple screens is planned for full support in the Swift CLI)."frontmost": Captures the frontmost window of the currently active application."AppName": Captures all windows of the application namedAppName(e.g.,"Safari","com.apple.Safari"). Fuzzy matching is used."PID:ProcessID": Captures all windows of the application with the specified process ID (e.g.,"PID:663"). Useful when multiple instances of the same app are running."AppName:WINDOW_TITLE:Title": Captures the window ofAppNamethat has the specifiedTitle(e.g.,"Notes:WINDOW_TITLE:My Important Note")."AppName:WINDOW_INDEX:Index": Captures the window ofAppNameat the specified zero-basedIndex(e.g.,"Preview:WINDOW_INDEX:0"for the frontmost window of Preview).
path(string, optional): Base absolute path for saving the captured image(s). Ifformatis"data"andpathis also provided, the image is saved to this path (as a PNG) AND Base64 data is returned. If aquestionis provided andpathis omitted, a temporary path is used for capture, and the file is deleted after analysis.question(string, optional): If provided, the captured image will be analyzed. The server automatically selects an AI provider from those configured in thePEEPIT_AI_PROVIDERSenvironment variable.format(string, optional, default:"png"): Specifies the output image format or data return type."png"or"jpg": Saves the image to the specifiedpathin the chosen format. For application captures: ifpathis not provided, behaves like"data". For screen captures: always saves to file."data": Returns Base64 encoded PNG data of the image directly in the MCP response. Ifpathis also specified, a PNG file is also saved to thatpath. Note: Screen captures cannot use this format and will automatically fall back to PNG file format.Invalid values (empty strings, null, or unrecognized formats) automatically fall back to
"png".
capture_focus(string, optional, default:"background"): Controls window focus behavior during capture."background": Captures without altering the current window focus (default)."foreground": Attempts to bring the target application/window to the foreground before capture. This might be necessary for certain applications or to ensure a specific window is captured if multiple are open.
Behavior with
If a
questionis provided, the tool will capture the image (saving it topathif specified, or a temporary path otherwise).This image is then sent to an AI model for analysis. The AI provider and model are chosen automatically by the server based on your
PEEPIT_AI_PROVIDERSenvironment variable (trying them in order until one succeeds).The analysis result is returned as
analysis_textin the response. Image data (Base64) is NOT returned in thecontentarray when a question is asked.If a temporary path was used for the image, it's deleted after the analysis attempt.
Output Structure (Simplified):
content: Can containImageContentItem(ifformat: "data"orpathwas omitted, and noquestion) and/orTextContentItem(for summaries, analysis text, warnings).saved_files: Array of objects, each detailing a file saved topath(ifpathwas provided).analysis_text: Text from AI (ifquestionwas asked).model_used: AI model identifier (ifquestionwas asked).
For detailed parameter documentation, see docs/spec.md.
File Naming and Path Behavior
PeepIt intelligently manages output paths to prevent file overwrites while respecting your intentions:
Key Principle: Single vs Multiple Captures
When you provide a specific file path (e.g., ~/Desktop/screenshot.png), PeepIt determines whether to use it exactly or add metadata based on the capture context:
Single Capture → Exact Path
Capturing one specific window
Capturing one specific screen (when only one display exists)
Capturing with
app_target: "frontmost"Your path is used exactly as specified
Multiple Captures → Metadata Added
Capturing all windows of an app (
mode: "multi"or multiple windows exist)Capturing all screens (when multiple displays exist)
Capturing with no specific target (defaults to all screens)
Metadata is appended to prevent overwrites
Examples:
Long Filename Protection:
PeepIt automatically handles filesystem limitations:
Truncates filenames exceeding macOS's 255-byte limit
Preserves UTF-8 multibyte characters (emoji, non-Latin scripts)
Ensures metadata is always included when needed
Never creates invalid filenames
Example:
Format Validation:
Invalid formats ("bmp", "gif", "tiff", etc.) automatically convert to PNG
You'll receive a clear warning message when format correction occurs
Only "png" and "jpg"/"jpeg" are valid formats
Browser Helper Filtering:
PeepIt automatically filters out browser helper processes when searching for common browsers (Chrome, Safari, Firefox, Edge, Brave, Arc, Opera). This prevents confusing errors when helper processes like "Google Chrome Helper (Renderer)" are matched instead of the main browser application.
Examples:
Browser-Specific Error Messages:
Instead of generic "Application not found"
Shows clear messages like "Chrome browser is not running or not found"
Only applies to browser identifiers - other apps work normally
Technical Features
Multi-display support: Each monitor gets its own moment in the spotlight
Smart app targeting: Fuzzy matching for app names
Multiple formats: PNG, JPEG, WebP, HEIF
Automatic naming: Timestamp-based, no overwrites
Permission checking: No surprises
Application listing: See what's running
Window enumeration: List all windows for an app
PID targeting: For the process-obsessed
Status monitoring: Know what's active
Provider agnostic: Ollama, OpenAI, and soon Anthropic
Natural language: Ask questions about images
Configurable: Environment-based
Fallback support: Automatic failover between providers
Architecture
Technical Details
JSON Output Format
The Swift CLI outputs structured JSON when called with --json-output:
MCP Integration
The Node.js server provides:
Schema validation via Zod
Proper MCP error codes
Structured logging via Pino
Full TypeScript type safety
Security
PeepIt respects macOS security:
Checks permissions before operations
Graceful handling of missing permissions
Clear guidance for permission setup
Development
Testing Commands
Building
Known Issues
FileHandle warning: Non-critical Swift warning about TextOutputStream conformance
AI Provider Config: Requires
PEEPIT_AI_PROVIDERSenvironment variable for analysis features
License
MIT License - see LICENSE file for details.
Contributing
Fork the repo
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Author
Created by Peter Steinberger - @mantisware
Read more about PeepIt's design and implementation in the blog post.