Safari MCP in macOS 27: Setup and First Test

JeredBlugo watch the original →

macOS 27 includes a native Safari MCP server that allows AI agents to control an isolated WebKit instance for debugging, bypassing the limitations of Chromium-based emulation.

The Breakthrough

Apple integrated a native Model Context Protocol (MCP) server directly into Safari 27, enabling AI agents to interact with a WebKit-based browser instance to debug CSS and JavaScript issues that previously required manual testing or imperfect Chromium-based emulation.

What Actually Worked

  • Enable the developer features by navigating to Settings, Advanced, and toggling "Show features for web developers."
  • Activate the server by going to the Developer tab and enabling "Allow remote automation" and "External agents."
  • Run the following command in the terminal to enable the Safari driver:
sudo safaridriver --enable
  • Configure the agent (e.g., Claude Code) to use the Safari MCP by adding the server to the agent configuration file.
  • Note that the MCP opens a clean, isolated Safari instance that does not share history, bookmarks, or login sessions with your primary browser, ensuring privacy but requiring re-authentication for gated sites.

Context

Developers frequently encounter bugs that appear only in Safari due to its WebKit engine, which Chromium-based tools like Playwright or Chrome DevTools often fail to reproduce accurately. This native MCP server provides a local, secure way for agents to inspect the DOM, manage network requests, and adjust viewports within the actual WebKit environment. While it does not fully simulate mobile touch events or specific hardware sensors, it resolves nearly all rendering and script execution discrepancies between desktop and mobile WebKit.

Content References

{"type": "tool", "title": "Safari MCP", "url": "https://webkit.org/blog/18136/introducing-the-safari-mcp-server-for-web-developers/", "context": "mentioned"}, {"type": "tool", "title": "Community Safari MCP", "url": "https://github.com/achiya-automation/safari-mcp", "context": "mentioned"}

  • #ai
  • #dev-tooling
  • #macos

summary by google/gemini-3.1-flash-lite. probably wrong about something. check the source.