Native Safari browser automation for AI agents on macOS using 97 tools without Chrome dependencies.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
The install command below didn't complete successfully in our automated test.
npx -y safari-mcpnpm notice npm notice New major version of npm available! 10.1.0 -> 12.0.2 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v12.0.2> npm notice Run `npm install -g npm@12.0.2` to update! npm notice npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for safari-mcp@2.15.12: wanted {"os":"darwin"} (current: {"os":"linux"}) npm ERR! notsup Valid os: darwin npm ERR! notsup Actual os: linux npm ERR! A complete log of this run can be found in: /home/user/.npm/_logs/2026-0
This is an experimental automated check and can have false negatives โ missing environment variables, a slow cold install, etc. It doesnโt necessarily mean somethingโs wrong. Last checked 1mo ago.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Safari MCP.
safari_navigateNavigate to URL (auto HTTPS, wait for load)
safari_go_backGo back in history
safari_go_forwardGo forward in history
safari_reloadReload page (optional hard reload)
safari_read_pageGet title, URL, and text content
safari_get_sourceGet full HTML source
The browser for your coding agent.
Your real Safari, logged in โ no Chrome, no heat, no headless.
Install in VS Code ยท VS Code Insiders ยท Install in Cursor
97 tools ยท No Chrome/Puppeteer/Playwright needed ยท ~5ms per command ยท 60% less CPU than Chrome
Quick Start ยท All 97 Tools ยท Examples ยท Why Safari MCP? ยท Architecture ยท Changelog

Your AI agent needs to browse. So it either:
Your AI drives the Safari you're already logged into โ Gmail, GitHub, Ahrefs, Slack, banking.
Native WebKit. ~60% less CPU. Background operation. 97 tools. One npx command. macOS only.
๐ฐ Featured on freeCodeCamp: How to Connect Your AI Coding Agent to a Browser on macOS ยท HackerNoon: Reverse-Engineering React, Shadow DOM, and CSP
๐ Apple shipped an official Safari MCP (July 2026 โ Safari Technology Preview 247+ and the Safari 27 beta). It's built on
safaridriverfor isolated debugging sessions. safari-mcp drives the real Safari you're already logged into โ on the stable Safari that ships with macOS today, with 97 tools. See the full comparison below.
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, 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, on why the guards refuse to touch your tabs
"Direct local validation from the package: Safari MCP doctor 6/6." โ @jrepp, who found and fixed a queue-alignment bug in the focus helper
That's it โ no global install needed. Or install permanently:
All clients run Safari MCP the same way โ npx safari-mcp. Pick your editor:
Or edit ~/.mcp.json:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
Restart Claude Desktop after saving.
Edit .windsurf/mcp.json in your project (or ~/.codeium/windsurf/mcp_config.json globally):
Open Cline in VS Code โ click the MCP icon โ Edit MCP Settings โ add:
Edit ~/.continue/config.yaml (or .continue/config.yaml in workspace):
Edit ~/.config/goose/config.yaml:
Open LM Studio โ Settings โ MCP Servers โ Add Server:
safarinpxsafari-mcpOpen Zed โ Settings โ search for "Context Servers" and add:
The recommended pattern for AI agents using Safari MCP:
Element targeting โ tools accept multiple targeting strategies:
| Strategy | Example | Best for |
|---|---|---|
| CSS selector | #login-btn, .submit | Unique elements |
| Visible text | "Sign In", "Submit" | Buttons, links |
| Coordinates | x: 100, y: 200 | Canvas, custom widgets |
| Ref from snapshot | ref: "e42" | Any element from accessibility tree |
Tip: Start with
safari_snapshotto get element refs, then use refs for precise targeting. This is faster and more reliable than CSS selectors.
Multiple agents or subagents driving one Safari at the same time will fight over the active tab โ unless you run them against a shared HTTP daemon instead of one process per client:
Then point every client at it:
One daemon, many sessions โ and each session gets its own tab state. The server keys activeTabIndex, the ownership flag and a unique tab marker off the MCP session id, so session A physically cannot read or steer session B's tab.
Two properties make this safe rather than merely tidy:
Tab identity is a marker, not an index. Each session stamps a unique id into the page it opens, so ownership survives navigation and survives the user reordering or closing other tabs. An index alone would silently drift onto the wrong tab.
It fails closed. If a session's marked tab can't be re-found, every tool refuses instead of falling back to whatever tab is in front โ because that tab is usually yours:
Factual signals from GitHub, npm, and our automated checks โ not a rating.
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/achiya-automation-safari-mcp)<a href="https://allmcps.com/mcp/achiya-automation-safari-mcp"><img src="https://allmcps.com/api/badge/achiya-automation-safari-mcp?style=directory" alt="Safari MCP on AllMCPs" /></a>