The Safari Screenshot MCP Server allows you to capture high-quality screenshots of webpages using Safari on macOS with various configurable options:
- Capture Screenshots: Take screenshots of any webpage by specifying the URL 
- Custom Dimensions: Define width and height (default: 1024x768) or use device presets (iPhone, iPad, desktop) 
- Zoom Control: Adjust the zoom level (e.g., 0.5x, 1x, 2x, 50% zoom) 
- Wait Timing: Set a wait time before capturing to ensure the page is fully loaded (default: 3 seconds) 
- Custom Output: Specify where to save the screenshot (default: - ./screenshots/[hostname]-[timestamp].png)
- Native Quality: Leverage Safari and macOS native tools for pixel-perfect captures 
- MCP Integration: Use with Cursor for command-based screenshot workflows 
- Auto-Cleanup: Automatically closes Safari windows after capturing 
Safari Screenshot
A Node.js MCP Server for capturing screenshots using Safari on macOS.
Features
- Capture window screenshots at specific sizes 
- Support for different zoom levels 
- Configurable wait times for page load 
- Clean up after capture 
- Native macOS screenshot quality 
Usage
Requirements
- macOS 
- Safari 
- Node.js >= 14.0.0 
- Terminal needs Accessibility permissions (System Preferences → Security & Privacy → Privacy → Accessibility) 
Installation
Options
| Option | Type | Default | Description | 
| url | string | required | The URL to capture | 
| outputPath | string | auto | Where to save the screenshot (default: ./screenshots/[hostname]-[timestamp].png) | 
| width | number | 1024 | Window width in pixels | 
| height | number | 768 | Window height in pixels | 
| waitTime | number | 3 | Seconds to wait for page load | 
| zoomLevel | number | 1 | Page zoom level (1 = 100%) | 
Common Viewport Sizes
The module is tested with these common viewport sizes:
- Desktop: 1920×1080 (Full HD) 
- Laptop: 1366×768 
- Tablet Landscape: 1024×768 
- Tablet Portrait: 768×1024 
- Mobile Large: 428×926 (iPhone 12 Pro Max) 
- Mobile Medium: 390×844 (iPhone 12 Pro) 
- Mobile Small: 375×667 (iPhone SE) 
How It Works
- Opens Safari with specified window size 
- Loads the URL and waits for page load 
- Applies zoom level if specified 
- Uses native macOS screencapture for pixel-perfect results 
- Verifies screenshot was captured successfully 
- Cleans up Safari windows 
Permissions
This package requires System Events permissions to work:
- Open System Preferences > Security & Privacy > Privacy > Accessibility 
- Add Terminal (or your IDE) to the list of allowed apps 
Using with Cursor
Setup in Cursor
- Open Cursor 
- Go to settings, "Add MCP Server" 
- In the configuration dialog: - Name: - safari-screenshot
- Type: - command
- Command: - npx -y @rogerheykoop/mcp-safari-screenshot
 - Or for local development: - Command: - npx -y /path/to/mcp-safari-screenshot/server.js
 
Example Commands
After connecting to the server in Cursor, you can use these commands:
Response: Will capture at 1920×1080
Response: Will capture at 390×844
Response: Will capture with zoomLevel: 0.5
Supported Parameters
The MCP server understands these concepts:
- Device names (e.g., "iPhone", "iPad", "desktop") 
- Dimensions (e.g., "1024x768") 
- Zoom levels (e.g., "50% zoom", "2x zoom") 
- Wait times (e.g., "wait 5 seconds") 
Example Workflows
- Responsive Testing Take screenshots of apple.com on iPhone, iPad, and desktop
- Zoom Testing Capture github.com at 75% zoom and 125% zoom
- Custom Size Screenshot example.com at 1440x900
Tips
- Screenshots are saved to the - screenshotsdirectory by default
- Device names automatically set appropriate dimensions 
- The server handles cleanup of Safari windows 
- Use "wait X seconds" for slow-loading pages 
Troubleshooting
If you encounter issues:
- Check Terminal has Accessibility permissions 
- Verify Safari is not in private browsing mode 
- Ensure the working directory is writable 
- Check Cursor's console for error messages 
License
MIT
Testing Locally
You can test the MCP implementation directly:
Expected responses:
- Discover will return capabilities 
- Execute will: - Log progress to stderr 
- Return result JSON to stdout 
- Save screenshot to ./screenshots/ 
 
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Enables capturing high-quality native macOS screenshots using Safari through a Node.js server, supporting various sizes, zoom levels, and load wait times.
- Features
- Usage
- Requirements
- Installation
- Options
- Common Viewport Sizes
- How It Works
- Permissions
- Using with Cursor
- License
- Testing Locally
Related Resources
Related MCP Servers
- Asecurity-licenseAqualityProvides screenshot and OCR capabilities for macOS.Last updated -13822MIT License
- Asecurity-licenseAqualityA server that captures screenshots from iOS Simulator using the Model Context Protocol (MCP) and saves them to a specified directory.Last updated -101MIT License
- Asecurity-licenseAqualityA macOS utility that captures screenshots and analyzes them with AI vision, enabling AI assistants to see and interpret what's on your screen.Last updated -37,031638MIT License
- -security-license-qualityA privacy-first macOS MCP server that enables AI agents to capture screenshots of pre-approved application windows for development and debugging tasks.Last updated -6MIT License