by Epistates
Enables AI agents to control a real, logged‑in Safari instance on macOS, preserving cookies, history, and native UI state for accurate browser automation.
MCPSafari provides a native Safari MCP server that lets any MCP‑compatible client (Claude Code, Codex, Cursor, etc.) drive the user's actual Safari browser. The agent works with existing sessions, allowing access to signed‑in sites, cookies, and local history without the need for a headless browser.
brew trust epistates/tap
brew install --cask epistates/tap/mcp-safari
Open the installed MCPSafari.app once, enable the MCPSafari Extension in Safari, and grant site access.claude mcp add --scope user mcp-safari mcp-safari
Or for Codex CLI:
codex mcp add mcp-safari -- mcp-safari
mcp-safari doctor to verify the installation.Q: Which macOS / Safari versions are required? A: macOS 14 (Sonoma) or later with Safari 17+.
Q: Do I need Xcode? A: Only if you want to build from source; the Homebrew cask provides a pre‑built binary.
Q: Why does Safari need to be in front for some actions? A: Native input (real typing, hover, drag) relies on macOS Accessibility APIs that only work when the target window is active.
Q: How is data privacy handled?
A: Tool results are sent to the MCP client; refer to SECURITY.md for details on redaction, permissions, and what data may be exposed.
Q: What if the server fails to start?
A: Run mcp-safari doctor for diagnostics, ensure the extension is enabled, and verify the Accessibility permission is granted.
Q: Can I run multiple MCP servers simultaneously? A: Yes, each server runs on its own port; configure additional instances in the client’s MCP settings.
A native Safari MCP server for your real, logged-in Safari on macOS. Works with any MCP-compatible client, including Claude Code, Codex, Cursor, OpenCode, and oh-my-pi.
Your agent starts with your existing logins, cookies, and history. Open a signed-in page and get to work.
QA on real sites has shaped the tools, including fixes for menus that ignored clicks and drop zones that missed files.
Built with Swift and a Manifest V3 Safari extension. Requires macOS 14+ and Safari 17+. Xcode is only needed to build from source.
brew trust epistates/tap
brew install --cask epistates/tap/mcp-safari
brew trust is needed once: installing a cask auto-trusts the cask, but not the mcp-safari-server formula it depends on, and without it the install stops at Refusing to load formula epistates/tap/mcp-safari-server from untrusted tap.
Open MCPSafari.app once so Safari picks up the extension, then enable MCPSafari Extension in Safari → Settings → Extensions. Grant access to the sites you want your agent to use.
Homebrew installs the published release. This README and the tool reference describe main, which may include unreleased features. Check Releases for your version.
For Claude Code:
claude mcp add --scope user mcp-safari mcp-safari
For Codex CLI:
codex mcp add mcp-safari -- mcp-safari
Start a new client session after adding the server. For Claude Desktop, Cursor, and other clients, see client configuration.
Ask your agent:
Open example.com in a new Safari tab, read the page heading, and take a screenshot.
The heading should be “Example Domain”. If the connection fails, see troubleshooting. On versions that include it, mcp-safari doctor checks the installation without changing it.
Your agent acts in your existing browser session. It can access signed-in pages where you allow the extension. Tool results go to your MCP client and may be sent to its model provider; see browser access and data.
Background DOM tasks do not need native input. For hover styling, real keyboard events, and native drag, Safari must be in front. Native hover and drag move your pointer, so leave the mouse alone while they run. See synthetic and native input.
Console and network capture have limits. Pages can alter the captured data, and resource timings do not include HTTP status or headers. See debugging.
MIT
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.