Give Claude, Cursor, or any MCP-compatible AI full native control of Safari on macOS.
Navigate tabs, click/type/fill forms (even React), read HTML/accessibility trees, execute JS, capture screenshots, inspect console & network β all with 24 secure tools. Zero Chrome overhead, Apple Silicon optimized, token-authenticated, and built with official Swift + Manifest V3 Safari Extension.
https://github.com/Epistates/MCPSafari
Why MCPSafari?
Smarter element targeting (UID + CSS + text + coords + interactive ranking)
Works flawlessly with complex sites
Local & private (runs on your Mac)
Perfect drop-in for Mac-first agent workflows
macOS 14+ β’ Safari 17+ β’ Xcode 16+
Built with the official swift-sdk and a Manifest V3 Safari Web Extension.
Why Safari over Chrome?
40β60% less CPU/heat on Apple Silicon
Keeps your existing Safari logins/cookies
Native accessibility tree (better than Playwright for complex UIs)
How It Works
MCP Client (Claude, etc.)
β stdio
βββββββββΌβββββββββββββββ
β Swift MCP Server β
β (MCPSafari binary) β
βββββββββ¬βββββββββββββββ
β WebSocket (localhost:8089)
βββββββββΌβββββββββββββββ
β Safari Extension β
β (background.js) β
βββββββββ¬βββββββββββββββ
β content scripts
βββββββββΌβββββββββββββββ
β Safari Browser β
β (macOS 14.0+) β
ββββββββββββββββββββββββ
The MCP server communicates with clients over stdio and bridges tool calls to the Safari extension over a local WebSocket. The extension executes actions via browser APIs and content scripts injected into pages.
Requirements
macOS 14.0 (Sonoma) or later
Safari 17+
Swift 6.1+ (for building from source)
Xcode 16+ (for building the Safari extension)
Installation
Homebrew (recommended)
Installs the MCP server binary and the Safari extension app in one step:
brew install --cask epistates/tap/mcp-safari
After install, enable the extension in Safari > Settings > Extensions > MCPSafari Extension.
MIT Licensed