MCP Directory

How to add Safari MCP to Claude Desktop

Native Safari browser automation for AI agents on macOS — 80 tools, your real logged-in browser, no Chrome. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 · 116 · stdio · no auth

Claude Desktop config for Safari MCP

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

Setup steps

  1. 1Open Claude Desktop → Settings → Developer → Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Safari MCP config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Safari MCP's tools appear under the 🔌 tools menu.

Before you start

  • macOS (any version with Safari)
  • Node.js 18+
  • Safari → Settings → Advanced → Show features for web developers enabled
  • Safari → Develop → Allow JavaScript from Apple Events enabled
  • Automation → Safari permission granted to the MCP client's parent process (e.g. VS Code or Terminal)
  • Optional: Safari MCP extension (built via Xcode) for closed Shadow DOM, strict CSP, and framework-heavy editors

What Safari MCP can do in Claude Desktop

safari_navigate

Navigate to a URL (auto HTTPS, wait for load).

safari_go_back

Go back in browser history.

safari_go_forward

Go forward in browser history.

safari_reload

Reload the page (optional hard reload).

safari_read_page

Get the page title, URL, and text content.

safari_get_source

Get the full HTML source of the page.

safari_navigate_and_read

Navigate to a URL and read the page in one call.

safari_click

Click an element by CSS selector, visible text, or coordinates.

Security

Runs locally on macOS with no remote connections (stdio + localhost only) and no telemetry. The optional Safari extension communicates only with localhost:9224. Requires macOS system permissions: Automation → Safari (granted to the parent process running the MCP client, e.g. VS Code/Terminal), "Allow JavaScript from Apple Events" in Safari's Develop menu, Screen Recording (for screenshots), and Accessibility for safari-helper (for native CGEvent click/keyboard tools). The safari_evaluate tool runs arbitrary JavaScript in your real, logged-in Safari, so it has access to authenticated sessions.

Safari MCP + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Safari MCP config there under the "mcpServers" key and restart the client.

Is Safari MCP safe to use with Claude Desktop?

Runs locally on macOS with no remote connections (stdio + localhost only) and no telemetry. The optional Safari extension communicates only with localhost:9224. Requires macOS system permissions: Automation → Safari (granted to the parent process running the MCP client, e.g. VS Code/Terminal), "Allow JavaScript from Apple Events" in Safari's Develop menu, Screen Recording (for screenshots), and Accessibility for safari-helper (for native CGEvent click/keyboard tools). The safari_evaluate tool runs arbitrary JavaScript in your real, logged-in Safari, so it has access to authenticated sessions.

Does Safari MCP work without installing the Safari extension?

Yes. Roughly 80% of functionality works through the AppleScript engine alone. The optional extension adds closed Shadow DOM access, strict-CSP bypass via the MAIN world, deeper framework state manipulation, and smart loading-state detection.

Is it cross-platform?

No. Safari MCP is macOS only, since it drives Safari via AppleScript/WebKit. It requires Node.js 18+ and enabling 'Allow JavaScript from Apple Events' in Safari's Develop menu.

Why does Automation permission need to be granted to my IDE rather than to safari-mcp?

macOS TCC grants Automation permission to the parent process that spawns the MCP server (e.g. VS Code or Terminal), not to safari-mcp itself. If the prompt doesn't appear, run `osascript -e 'tell application "Safari" to get URL of current tab of window 1'` once from a Terminal that already has Automation permission to register it.

View repo Full Safari MCP page