dev-tools 4 min read

Safari MCP – Native macOS Browser Automation for AI Agents

Safari MCP drives your real Safari browser from any MCP-compatible AI coding agent. 97 tools, no Puppeteer or Playwright needed, ~60% less CPU than Chrome.

By
Share: X in
Safari MCP Server – 97 native browser automation tools for AI agents on macOS

TL;DR

TL;DR: Safari MCP is an open-source MCP server that drives a real Safari browser for AI coding agents — 97 tools, no Chrome/Puppeteer/Playwright, ~60% less CPU.

What Is Safari MCP?

Safari MCP is an open-source MCP (Model Context Protocol) server by achiya-automation that gives AI coding agents native control over Safari on macOS. It ships with 97 built-in tools covering navigation, clicks, forms, screenshots, network monitoring, storage, and accessibility — all through a single npx safari-mcp command.

The core pitch is direct from the README:

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.

Setup Workflow

Step 1: Prerequisites

Ensure your Mac meets these requirements:

  • macOS (any version with Safari)
  • Node.js 18 or later
  • Safari: Settings → Advanced → Show features for web developers
  • Safari: Develop → Allow JavaScript from Apple Events

Step 2: Install the Server

One-command install via npx (no global install required):

npx safari-mcp

Or install permanently:

npm install -g safari-mcp

Step 3: Configure Your MCP Client

Claude Code:

claude mcp add safari -- npx safari-mcp

Or edit ~/.mcp.json directly:

{
  "mcpServers": {
    "safari": {
      "command": "npx",
      "args": ["safari-mcp"]
    }
  }
}

Claude Desktop: edit ~/Library/Application Support/Claude/claude_desktop_config.json with the same JSON structure.

Cursor: use 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.

Step 4: Start Using It

Once configured, your AI agent can call any of the 97 tools. Examples from the README:

# Take a screenshot
screenshot_take()

# Fill a React/Vue/Angular form field
form_fill(field_name, value)

# Monitor network requests
network_start_monitoring()

# Get accessibility tree
accessibility_get_tree()

How It Works: Architecture

Safari MCP drives Safari via osascript (Apple’s automation bridge), not WebDriver, Puppeteer, or Playwright. This has several implications:

  • Persistent process — reuses a single osascript process; ~5ms per command vs ~80ms for browser-spawned alternatives.
  • Real logged-in browser — sessions, cookies, and localStorage from your actual Safari profile are preserved.
  • No second browser — no Chrome, Chromium, or headless browser process runs alongside Safari.
  • Framework-compatible form filling — native property setters bypass React synthetic events, Vue reactivity, Angular change detection, and Svelte reactivity without triggering their event systems.

The README notes that Apple shipped an official Safari MCP in Safari Technology Preview 247 (July 2026) built on safaridriver for isolated debugging sessions. Safari MCP differs by targeting stable Safari with 97 tools and your existing logged-in sessions.

Practical Evaluation Checklist

  • [ ] macOS with Safari installed
  • [ ] Node.js 18+ on PATH
  • [ ] Safari developer features enabled
  • [ ] npx safari-mcp launches without errors
  • [ ] AI agent can take a screenshot of a logged-in site
  • [ ] CPU usage compared to Playwright/Chrome baseline

FAQ

Q: Does this work on Linux or Windows? A: No. Safari MCP is macOS-only since it drives Safari via Apple’s osascript bridge.

Q: How is this different from Puppeteer or Playwright? A: Puppeteer and Playwright spawn a separate browser instance (usually Chrome/Chromium) with no logins, cookies, or sessions. Safari MCP drives your actual Safari with all your existing sessions intact — and uses ~60% less CPU.

Q: Is it faster than Chrome-based automation? A: Yes per the README: ~5ms per command vs ~80ms for browser-spawned alternatives, and ~60% less CPU on Apple Silicon.

Q: Does it work with all MCP clients? A: Yes. Any client that supports the MCP protocol (Claude Code, Cursor, Windsurf, Roo Code, etc.) can use Safari MCP — the protocol is client-agnostic.

Q: What if Apple updates Safari and breaks things? A: The project maintains compatibility per its CHANGELOG. The July 2026 update coincided with Apple’s official Safari MCP announcement.

Source and Accuracy Notes