What is Safari MCP?
Safari MCP is a Model Context Protocol server for native Safari automation on macOS, providing AI agents with 80 tools for browser control including navigation, form filling, screenshots, network interception, and storage management. It uses your real Safari with all logins, cookies, and sessions, running on WebKit via AppleScript and JavaScript with zero external dependencies like Puppeteer or Playwright.
How to use Safari MCP?
After installing Safari MCP (via npm, Homebrew, or source), enable Safari’s “Show features for web developers” and “Allow JavaScript from Apple Events.” Then add the server configuration to your MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, or VS Code + Continue). The recommended workflow is: take an accessibility snapshot, interact with elements by ref, then verify with another snapshot.
Key features of Safari MCP
- 80 tools for navigation, clicks, forms, screenshots, network, storage, and accessibility
- Zero dependencies — no Puppeteer, Playwright, WebDriver, or Chrome
- Native WebKit on Apple Silicon — ~60% less CPU than Chrome
- Uses your real Safari with all logins, cookies, and sessions
- Background operation — Safari stays in background, never steals focus
- Persistent osascript process — ~5ms per command vs ~80ms
Use cases of Safari MCP
- Automate authenticated web tasks using existing Safari sessions (Gmail, GitHub, Slack)
- Extract structured data from tables, meta tags, images, and links
- Run batch automation scripts with multiple actions in one call
- Test web applications with device emulation, network throttling, and CSS coverage
- Capture performance metrics and network requests for analysis
评论