productivity

safari-mcp

by achiya-automation

Native Safari browser automation for AI agents — 84 tools, zero Chrome overhead.

Native Safari browser automation for AI agents on macOS with 80 tools, using real Safari sessions and 60% less CPU than Chrome-based alternatives.

github stars

16

best for

  • / General purpose MCP workflows

capabilities

  • / safari_navigate
  • / safari_snapshot
  • / safari_click
  • / safari_fill
  • / safari_screenshot
  • / safari_read_page

what it does

Native Safari browser automation for AI agents on macOS with 80 tools, using real Safari sessions and 60% less CPU than Chrome-based alternatives.

about

safari-mcp is a community-built MCP server published by achiya-automation that provides AI assistants with tools and capabilities via the Model Context Protocol. Native Safari browser automation for AI agents — 84 tools, zero Chrome overhead. It is categorized under productivity. This server exposes 20 tools that AI clients can invoke during conversations and coding sessions.

how to install

You can install safari-mcp in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

safari-mcp is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

Safari MCP Server — 80 native browser automation tools for AI agents on macOS
# 🦁 Safari MCP **The only MCP server for Safari — native browser automation for AI agents.** [![npm version](https://img.shields.io/npm/v/safari-mcp)](https://www.npmjs.com/package/safari-mcp) [![npm downloads](https://img.shields.io/npm/dm/safari-mcp)](https://www.npmjs.com/package/safari-mcp) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![macOS](https://img.shields.io/badge/macOS-only-blue)](https://www.apple.com/macos/) [![GitHub stars](https://img.shields.io/github/stars/achiya-automation/safari-mcp?style=social)](https://github.com/achiya-automation/safari-mcp/stargazers) Install in VS Code Install in VS Code Insiders Install in Cursor **80 tools** · **No Chrome/Puppeteer/Playwright needed** · **~5ms per command** · **60% less CPU than Chrome** [Quick Start](#quick-start) · [All 80 Tools](#tools-80) · [Examples](examples/) · [Why Safari MCP?](#safari-mcp-vs-alternatives) · [Architecture](#architecture) · [Changelog](CHANGELOG.md) ![Safari MCP Demo](https://github.com/achiya-automation/safari-mcp/releases/download/v2.1.2/safari-mcp-showcase.gif)
> **TL;DR:** Use your real Safari with all your logins, cookies, and sessions. No headless browsers, no Chrome, no Puppeteer. Just native AppleScript + JavaScript on macOS — 60% less CPU/heat on Apple Silicon. ### 🤔 Why not just use Playwright or Chrome DevTools MCP? | Problem | Safari MCP Solution | |---------|-------------------| | Chrome DevTools MCP heats up your Mac | Native WebKit — ~60% less CPU | | Playwright launches a new browser without your logins | Uses your **real Safari** with all sessions | | Puppeteer requires Chrome + debug port | Just AppleScript — no extra browser | | Headless browsers can't access your authenticated sessions | Gmail, GitHub, Slack — already logged in | | Browser automation steals window focus | Safari stays in background, never interrupts | --- ## Highlights - **80 tools** — navigation, clicks, forms, screenshots, network, storage, accessibility, and more - **Zero heat** — native WebKit on Apple Silicon, ~60% less CPU than Chrome - **Your real browser** — keeps all logins, cookies, sessions (Gmail, GitHub, Ahrefs, etc.) - **Background operation** — Safari stays in the background, no window stealing - **No browser dependencies** — no Puppeteer, no Playwright, no WebDriver, no Chrome - **Persistent process** — reuses a single osascript process (~5ms per command vs ~80ms) - **Framework-compatible** — React, Vue, Angular, Svelte form filling via native setters --- ## Quick Start ### Prerequisites - macOS (any version with Safari) - Node.js 18+ - Safari → Settings → Advanced → **Show features for web developers** ✓ - Safari → Develop → **Allow JavaScript from Apple Events** ✓ ### Install (one command) ```bash npx safari-mcp ``` That's it — no global install needed. Or install permanently: ```bash npm install -g safari-mcp ``` ### Configure your MCP client Add to your client's config file — all clients use the same JSON: ```json { "mcpServers": { "safari": { "command": "npx", "args": ["safari-mcp"] } } } ```
Where does each client store this? | Client | Config file | |--------|------------| | **Claude Code** | `~/.mcp.json` | | **Claude Desktop** | `~/Library/Application Support/Claude/claude_desktop_config.json` | | **Cursor** | `.cursor/mcp.json` in your project | | **Windsurf** | `.windsurf/mcp.json` in your project | | **VS Code + Continue** | `.vscode/mcp.json` in your project |
Alternative: Homebrew ```bash brew install achiya-automation/tap/safari-mcp ```
Alternative: from source ```bash git clone https://github.com/achiya-automation/safari-mcp.git cd safari-mcp && npm install ```
--- ## Usage Workflow The recommended pattern for AI agents using Safari MCP: ``` 1. safari_snapshot → Get page state (accessibility tree) 2. safari_click/fill/... → Interact with elements by ref 3. safari_snapshot → Verify the result ``` **Element targeting** — tools accept multiple targeting strategies: | Strategy | Example | Best for | |----------|---------|----------| | CSS selector | `#login-btn`, `.submit` | Unique elements | | Visible text | `"Sign In"`, `"Submit"` | Buttons, links | | Coordinates | `x: 100, y: 200` | Canvas, custom widgets | | Ref from snapshot | `ref: "e42"` | Any element from accessibility tree | > **Tip:** Start with `safari_snapshot` to get element refs, then use refs for precise targeting. This is faster and more reliable than CSS selectors. --- ## Tools (80) ### Navigation (4) | Tool | Description | |------|-------------| | `safari_navigate` | Navigate to URL (auto HTTPS, wait for load) | | `safari_go_back` | Go back in history | | `safari_go_forward` | Go forward in history | | `safari_reload` | Reload page (optional hard reload) | ### Page Reading (3) | Tool | Description | |------|-------------| | `safari_read_page` | Get title, URL, and text content | | `safari_get_source` | Get full HTML source | | `safari_navigate_and_read` | Navigate + read in one call | ### Click & Interaction (5) | Tool | Description | |------|-------------| | `safari_click` | Click by CSS selector, visible text, or coordinates | | `safari_double_click` | Double-click (select word, etc.) | | `safari_right_click` | Right-click (context menu) | | `safari_hover` | Hover over element | | `safari_click_and_wait` | Click + wait for navigation | ### Form Input (7) | Tool | Description | |------|-------------| | `safari_fill` | Fill input (React/Vue/Angular compatible) | | `safari_clear_field` | Clear input field | | `safari_select_option` | Select dropdown option | | `safari_fill_form` | Batch fill multiple fields | | `safari_fill_and_submit` | Fill form + submit in one call | | `safari_type_text` | Type real keystrokes (JS-based, no System Events) | | `safari_press_key` | Press key with modifiers | ### Screenshots & PDF (3) | Tool | Description | |------|-------------| | `safari_screenshot` | Screenshot as PNG (viewport or full page) | | `safari_screenshot_element` | Screenshot a specific element | | `safari_save_pdf` | Export page as PDF | ### Scroll (3) | Tool | Description | |------|-------------| | `safari_scroll` | Scroll up/down by pixels | | `safari_scroll_to` | Scroll to exact position | | `safari_scroll_to_element` | Smooth scroll to element | ### Tab Management (4) | Tool | Description | |------|-------------| | `safari_list_tabs` | List all tabs (index, title, URL) | | `safari_new_tab` | Open new tab (background, no focus steal) | | `safari_close_tab` | Close tab | | `safari_switch_tab` | Switch to tab by index | ### Wait (2) | Tool | Description | |------|-------------| | `safari_wait_for` | Wait for element, text, or URL change | | `safari_wait` | Wait for specified milliseconds | ### JavaScript (1) | Tool | Description | |------|-------------| | `safari_evaluate` | Execute arbitrary JavaScript, return result | ### Element Inspection (4) | Tool | Description | |------|-------------| | `safari_get_element` | Element details (tag, rect, attrs, visibility) | | `safari_query_all` | Find all matching elements | | `safari_get_computed_style` | Computed CSS styles | | `safari_detect_forms` | Auto-detect all forms with field selectors | ### Accessibility (1) | Tool | Description | |------|-------------| | `safari_accessibility_snapshot` | Full a11y tree: roles, ARIA, focusable elements | ### Drag & Drop (1) | Tool | Description | |------|-------------| | `safari_drag` | Drag between elements or coordinates | ### File Operations (2) | Tool | Description | |------|-------------| | `safari_upload_file` | Upload file via JS DataTransfer (no file dialog!) | | `safari_paste_image` | Paste image into editor (no clipboard touch!) | ### Dialog & Window (2) | Tool | Description | |------|-------------| | `safari_handle_dialog` | Handle alert/confirm/prompt | | `safari_resize` | Resize browser window | ### Device Emulation (2) | Tool | Description | |------|-------------| | `safari_emulate` | Emulate device (iPhone, iPad, Pixel, Galaxy) | | `safari_reset_emulation` | Reset to desktop | ### Cookies & Storage (10) | Tool | Description | |------|-------------| | `safari_get_cookies` | Get all cookies | | `safari_set_cookie` | Set cookie with all options | | `safari_delete_cookies` | Delete one or all cookies | | `safari_local_storage` | Read localStorage | | `safari_set_local_storage` | Write localStorage | | `safari_delete_local_storage` | Delete/clear localStorage | | `safari_session_storage` | Read sessionStorage | | `safari_set_session_storage` | Write sessionStorage | | `safari_delete_session_storage` | Delete/clear sessionStorage | | `safari_export_storage` | Export all storage as JSON (backup/restore sessions) | | `safari_import_storage` | Import storage state from JSON | ### Clipboard (2) | Tool | De ---

FAQ

What is the safari-mcp MCP server?
safari-mcp is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for safari-mcp?
This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
MCP server reviews

Ratings

4.510 reviews
  • Shikha Mishra· Oct 10, 2024

    safari-mcp is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Piyush G· Sep 9, 2024

    We evaluated safari-mcp against two servers with overlapping tools; this profile had the clearer scope statement.

  • Chaitanya Patil· Aug 8, 2024

    Useful MCP listing: safari-mcp is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Sakshi Patil· Jul 7, 2024

    safari-mcp reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Ganesh Mohane· Jun 6, 2024

    I recommend safari-mcp for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Oshnikdeep· May 5, 2024

    Strong directory entry: safari-mcp surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Dhruvi Jain· Apr 4, 2024

    safari-mcp has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Rahul Santra· Mar 3, 2024

    According to our notes, safari-mcp benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Pratham Ware· Feb 2, 2024

    We wired safari-mcp into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Yash Thakker· Jan 1, 2024

    safari-mcp is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.