# ๐ฆ Safari MCP
**The browser for your coding agent.**
*Your real Safari, logged in โ no Chrome, no heat, no headless.*
[](https://www.npmjs.com/package/safari-mcp)
[](https://www.npmjs.com/package/safari-mcp)
[](https://opensource.org/licenses/MIT)
[](https://www.apple.com/macos/)
[](https://scorecard.dev/viewer/?uri=github.com/achiya-automation/safari-mcp)
[Install in VS Code](vscode:mcp/install?%7B%22safari-mcp%22%3A%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22safari-mcp%22%5D%7D%7D) ยท
[VS Code Insiders](https://insiders.vscode.dev/redirect?url=vscode-insiders:mcp/install?%7B%22safari-mcp%22%3A%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22safari-mcp%22%5D%7D%7D) ยท
[Install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=safari-mcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22safari-mcp%22%5D%7D)
**98 tools** ยท **No Chrome/Puppeteer/Playwright needed** ยท **~5ms per command** ยท **60% less CPU than Chrome**
[Quick Start](#quick-start) ยท [All 98 Tools](#tools-98) ยท [Examples](examples/) ยท [Why Safari MCP?](#safari-mcp-vs-alternatives) ยท [Architecture](#architecture) ยท [Changelog](CHANGELOG.md)

## โ Without Safari MCP
Your AI agent needs to browse. So it either:
- **Spins up Chromium via Playwright** โ with no logins, no cookies, no sessions
- **Uses Chrome DevTools MCP** โ and melts your fan running a second browser
- **Relies on headless scrapers** โ blocked by Cloudflare, reCAPTCHA, and bot detection
## โ
With Safari MCP
Your AI drives the **Safari you're already logged into** โ Gmail, GitHub, Ahrefs, Slack, banking.
Native WebKit. ~60% less CPU. Background operation. 98 tools. One `npx` command. macOS only.
> ๐ฐ **Featured on freeCodeCamp:** [How to Connect Your AI Coding Agent to a Browser on macOS](https://www.freecodecamp.org/news/how-to-connect-your-ai-coding-agent-to-a-browser-on-macos/) ยท [HackerNoon: Reverse-Engineering React, Shadow DOM, and CSP](https://hackernoon.com/i-had-to-reverse-engineer-react-shadow-dom-and-csp-to-automate-safari-without-chrome)
> ๐ **Apple ships an official Safari MCP** โ `safaridriver --mcp`, first in Safari Technology Preview 247 (July 2026) and in stable Safari since 27.0. It drives an isolated automation session for debugging. safari-mcp drives the **real Safari you're already logged into** โ your cookies and sessions, in the background, with 98 tools. See the full comparison below.
---
## Highlights
- **98 tools** โ navigation, clicks, forms, screenshots, network, storage, accessibility, and more
- **Zero heat** โ native WebKit on Apple Silicon, ~60% less CPU than Chrome
- **Your real browser** โ keeps all logins, cookies, sessions (Gmail, GitHub, Ahrefs, etc.)
- **Background operation** โ Safari stays in the background, no window stealing
- **No browser dependencies** โ no Puppeteer, no Playwright, no WebDriver, no Chrome
- **Persistent process** โ reuses a single osascript process (~5ms per command vs ~80ms)
- **Framework-compatible** โ React, Vue, Angular, Svelte form filling via native setters
---
## In users' own words
Not solicited testimonials โ quotes lifted from the public issue tracker, each linked to the thread it came from.
> "I run multiple Pi sessions/subagents against my normal Safari profile in parallel. **Sharing its cookies and logins is intentional.**"
> โ [@maxim](https://github.com/achiya-automation/safari-mcp/issues/76), on running concurrent agents against a real browser
> "The server has a deliberate tab-ownership model โฆ **the code is careful about this, and for the default case that's the right safety posture.**"
> โ [@turner-moore](https://github.com/achiya-automation/safari-mcp/issues/92), on why the guards refuse to touch your tabs
> "Direct local validation from the package: **Safari MCP doctor 6/6.**"
> โ [@jrepp](https://github.com/achiya-automation/safari-mcp/pull/53), who found and fixed a queue-alignment bug in the focus helper
---
## Quick Start
### Prerequisites
- macOS (any version with Safari)
- Node.js 20+
- Safari โ Settings โ Advanced โ **Show features for web developers** โ
- Safari โ Settings โ Developer โ **Allow JavaScript from Apple Events** โ
### Install (one command)
```bash
npx safari-mcp
```
That's it โ no global install needed. Or install permanently:
```bash
npm install -g safari-mcp
```
### Configure your MCP client
All clients run Safari MCP the same way โ `npx safari-mcp`. Pick your editor: