Safari MCP logo

Safari MCP

by achiya-automation

Automates a user's logged-in Safari on macOS through 98 MCP tools for navigation, interaction, forms, screenshots, and page inspection.

Install Safari MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "achiya-automation-safari-mcp": {
      "command": "npx",
      "args": [
        "safari-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

achiya-automation/safari-mcp connects AI agents to the user's existing Safari session on macOS through native browser automation, preserving Safari's logins, cookies, and sessions. It runs as a local stdio MCP process with `npx safari-mcp` and provides 98 tools covering navigation, page reading, clicks, form controls, screenshots, PDFs, scrolling, and framework-specific editors. Reach for it when an agent needs to operate a real, already-authenticated Safari browser without installing Chrome, Puppeteer, Playwright, or WebDriver. Safari must allow JavaScript from Apple Events, and the server requires Node.js 20+.

Use cases

  • Automate tasks in already-authenticated Safari sessions
  • Inspect and interact with React, Vue, Angular, or Svelte forms
  • Verify web application state after clicks and navigation
  • Capture screenshots or export authenticated pages as PDFs
  • Drive multiple agents through a shared Safari process

Key features

  • Native Safari automation on macOS
  • 98 MCP tools for browser control
  • Navigation, page inspection, and accessibility snapshots
  • Framework-compatible form and editor interaction
  • Viewport, element, and full-page screenshots
  • PDF export and scrolling controls

Tools80

What Safari MCP lets your agent do. Expand a tool for its parameters.

Self-reported~1.1k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

21/21 checks healthy over the last 78d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · safari-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars225Stargazers on the source repository.
npm downloads4.5kPackage downloads in the last 30 days.
Last commit1d agoMost recent push to the default branch.
Tools exposed80Callable tools this server registers over MCP.
Directory activity5 viewsConfig copies, upvotes, and views on AllMCPs.

How Safari MCP works

What achiya-automation/safari-mcp does

achiya-automation/safari-mcp gives MCP-compatible AI agents control of a real Safari browser on macOS. It is designed for sessions where Safari is already signed in, so browser state such as cookies, logins, and active sessions remains available to automation. The server uses Safari's native WebKit environment rather than launching Chromium or requiring a separate browser automation stack.

The package exposes 98 tools across browser navigation, page inspection, interaction, forms, screenshots, network and storage operations, and accessibility workflows. It can operate Safari in the background, making it suitable for coding agents that need to inspect or update web applications while the user continues working.

How it works

Install or invoke the package as a local stdio process. The MCP client starts npx safari-mcp, and the server translates tool calls into actions in Safari. A typical interaction starts by obtaining page state with safari_snapshot, then targeting elements using a snapshot reference, CSS selector, visible text, or screen coordinates. After an action, taking another snapshot or reading the page lets the agent verify the result.

The server supports ordinary page loads as well as client-side application flows. For example, safari_click_and_read combines a click with returning the updated page, while safari_navigate_and_read combines navigation and page extraction. Multiple agents can instead connect through a shared HTTP daemon by starting the package with SAFARI_MCP_HTTP=1 and an optional SAFARI_MCP_HTTP_PORT.

Setup and configuration

Safari MCP requires macOS with Safari and Node.js 20 or newer. In Safari, enable Show features for web developers under Settings → Advanced, then enable Allow JavaScript from Apple Events under Settings → Developer.

The simplest installation is:

Terminal
npx safari-mcp

A global npm installation is also supported:

Terminal
npm install -g safari-mcp

The server can be configured in MCP clients with the command npx and the argument safari-mcp. The package also supports installation through Homebrew or from the Git repository. VS Code and Cursor provide one-click installation links in the project configuration.

Tools and capabilities

Available operations include:

  • Navigate, reload, and move through browser history with safari_navigate, safari_reload, safari_go_back, and safari_go_forward.
  • Inspect page titles, URLs, text, HTML, and accessibility state with safari_read_page, safari_get_source, and safari_snapshot.
  • Click, double-click, right-click, hover, scroll, and target elements by selectors, text, coordinates, or snapshot references.
  • Fill, clear, and submit forms, select dropdown values, type keystrokes, and press modified keys.
  • Set and inspect React Select v5 controls, replace content in Monaco, CodeMirror, Ace, and ProseMirror editors, and verify framework-level editor state.
  • Capture viewport or full-page PNG screenshots, capture individual elements, and export pages as PDF files.

Framework-aware form operations include native setter behavior for React, Vue, Angular, and Svelte applications. Specialized tools can avoid menu interaction for React Select v5 and help detect stale editor DOM before submission.

Limitations and notes

The server is macOS-only and depends on Safari's Apple Events JavaScript permission. It drives the real Safari profile rather than an isolated browser session, so agents operate with the cookies, logins, and sessions available in that browser. Concurrent agents using one Safari instance can contend for the active tab; the shared HTTP mode is provided for running several agents against one browser process.

Safari MCP does not require Chrome, Puppeteer, Playwright, or WebDriver. Its MCP configuration uses local stdio by default, while HTTP mode requires setting SAFARI_MCP_HTTP=1 and can use SAFARI_MCP_HTTP_PORT to choose the daemon port.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Safari MCP

achiya-automation/safari-mcp is an MCP server that connects AI agents to a user's real Safari browser on macOS. Its main tools cover navigation, page reading, clicks, form filling, keyboard input, screenshots, PDFs, scrolling, accessibility snapshots, and state verification while retaining Safari's available logins, cookies, and sessions.

Run `npx safari-mcp` to start it without a global install. You can also use `npm install -g safari-mcp`, install it with Homebrew, or clone the repository and run `npm install`. Configure the MCP client to launch `npx` with `safari-mcp` as its argument.

It requires macOS, Safari, Node.js 20 or newer, and two Safari settings. Enable “Show features for web developers” under Advanced and “Allow JavaScript from Apple Events” under Developer.

Yes, Cursor is supported through a one-click installation link or a `.cursor/mcp.json` entry that runs `npx safari-mcp`. The same local stdio command can be configured manually in Cursor.

Yes, multiple agents can use one Safari instance through the shared HTTP daemon mode. Start it with `SAFARI_MCP_HTTP=1`, optionally set `SAFARI_MCP_HTTP_PORT`, and use the shared process to reduce contention between separate client processes.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSafari MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/achiya-automation-safari-mcp?style=directory)](https://allmcps.com/mcp/achiya-automation-safari-mcp)
HTML Embed
<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>