Peekaboo MCP is a powerful macOS utility that enables you to capture screenshots, analyze them with AI vision models, and automate GUI interactions. It functions as both a standalone CLI tool and as an MCP server for integration with AI assistants like Claude Desktop and Cursor.
brew tap steipete/tap
brew install peekaboo
curl -L https://github.com/steipete/peekaboo/releases/latest/download/peekaboo-macos-universal.tar.gz | tar xz
sudo mv peekaboo-macos-universal/peekaboo /usr/local/bin/
npm install -g @steipete/peekaboo-mcp
# Capture specific app
peekaboo image --app Safari --path screenshot.png
# Capture frontmost window
peekaboo image --mode frontmost
# Capture specific screen
peekaboo image --mode screen --screen-index 0
# List all running applications
peekaboo list apps
# List windows for a specific app
peekaboo list windows --app "Visual Studio Code"
# List all displays
peekaboo list screens
# Analyze a saved screenshot
peekaboo image --analyze "What error is shown?" --path screenshot.png
# Capture and analyze in one command
peekaboo image --analyze "Find all buttons" --app Safari
# Identify UI elements
peekaboo see --analyze "Describe this UI" --app Chrome
# Identify UI elements
peekaboo see --app Safari
# Click elements by text
peekaboo click "Submit"
# Type text
peekaboo type "Hello world"
# Press keyboard keys
peekaboo press return
peekaboo press tab --count 3
# Scroll content
peekaboo scroll --direction down --amount 5
# Use keyboard shortcuts
peekaboo hotkey cmd,c
# Use natural language to perform tasks
peekaboo "Open TextEdit and write Hello World"
peekaboo agent "Take a screenshot of Safari and email it"
peekaboo agent --verbose "Find all Finder windows and close them"
# Close window
peekaboo window close --app Safari
# Minimize window
peekaboo window minimize --app Finder
# Move window
peekaboo window move --app TextEdit --x 100 --y 100
# Resize window
peekaboo window resize --app Terminal --width 800 --height 600
# Focus window
peekaboo window focus --app "Visual Studio Code"
# Move app to specific screen
peekaboo window resize --app Safari --target-screen 1
# Move to next screen
peekaboo window move --app Terminal --screen-preset next
# Apply window preset on specific screen
peekaboo window resize --app Notes --preset left_half --target-screen 0
# List all menus for an app
peekaboo menu list --app Calculator
# List menus for frontmost app
peekaboo menu list-all
# Click menu item
peekaboo menu click --app Safari --item "New Window"
# Click through nested menus
peekaboo menu click --app TextEdit --path "Format > Font > Bold"
# Click system menu extras
peekaboo menu click-extra --title "WiFi"
{
"mcpServers": {
"peekaboo": {
"command": "npx",
"args": ["-y", "@steipete/peekaboo-mcp@beta"],
"env": {
"PEEKABOO_AI_PROVIDERS": "anthropic/claude-opus-4,openai/gpt-4.1,ollama/llava:latest",
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}
Add to your Cursor settings:
{
"mcpServers": {
"peekaboo": {
"command": "npx",
"args": ["-y", "@steipete/peekaboo-mcp@beta"],
"env": {
"PEEKABOO_AI_PROVIDERS": "openai/gpt-4.1,ollama/llava:latest",
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}
# Set API key securely (stored in ~/.peekaboo/credentials)
peekaboo config set-credential OPENAI_API_KEY sk-...
# View current configuration
peekaboo config show --effective
For privacy-focused local AI analysis:
# Install Ollama
brew install ollama
ollama serve
# Download recommended models
ollama pull llama3.3 # For agent tasks
ollama pull llava:latest # For vision tasks
# Use with Peekaboo
PEEKABOO_AI_PROVIDERS="ollama/llama3.3" peekaboo agent "Click the Submit button"
Check permissions status:
peekaboo permissions check
peekaboo permissions request screen-recording
peekaboo permissions request accessibility
Enable debug logging for more details:
export PEEKABOO_LOG_LEVEL=debug
peekaboo list server_status
For step-by-step debugging, use the verbose flag:
peekaboo image --app Safari --verbose
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "peekaboo" '{"command":"npx","args":["-y","@steipete/peekaboo-mcp"],"env":{"PEEKABOO_AI_PROVIDERS":"openai/gpt-4o,ollama/llava:latest","OPENAI_API_KEY":"your-openai-api-key-here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"peekaboo": {
"command": "npx",
"args": [
"-y",
"@steipete/peekaboo-mcp"
],
"env": {
"PEEKABOO_AI_PROVIDERS": "openai/gpt-4o,ollama/llava:latest",
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"peekaboo": {
"command": "npx",
"args": [
"-y",
"@steipete/peekaboo-mcp"
],
"env": {
"PEEKABOO_AI_PROVIDERS": "openai/gpt-4o,ollama/llava:latest",
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect