Skip to content
    • MCP directoryEvery server, linked to the publisher.
    • GitHub registryCurated MCP servers and skills on GitHub.
    • Agent skillsSKILL.md packs for Claude and Codex.
    • CategoriesBrowse by what the server does.
    • NewServers added in the last day.
    • TrendingClimbing on GitHub this week.
    • LeaderboardsMost starred and most installed.
    • ToolsSearch by the tool name an agent calls.
    • Config checkerFree browser tool to validate MCP install JSON.
    • MCP AppsServers that render UI in the chat.
    PlugMCP directorySubmit a server
    • HostYour own endpoint with keys and logs.
    • VoiceServers tuned for phone agents.
    • BrowserTools from the tab you have open.
    • DocsConnect, publish, and install.
    • Learn MCPPlain guides to MCP, MCP Apps and building a server.
    • StatusGateway and directory health.
    PlugMCP productSee pricing
    • BlogInstall guides and notes.
    • What is MCPThe protocol in plain words.
    • What is WebMCPTools that live in a web page.
    • Best for CursorServers that work well in Cursor.
    • Best for ClaudeServers that work well in Claude.
    • Compare directoriesPlugMCP next to the others.
    • ClubPeople building with MCP.
    • Work with usWe build servers for teams.
    • AboutWho runs PlugMCP.
  • Pricing
Sign inSign up

Plug any tool into any agent. MCP servers for people who do not write servers. Gateway for volume, n8n for apps.

Product

  • Browse
  • Install
  • Host your own
  • MCP for MCPs
  • Pricing
  • Voice mode
  • Browser

Directory

  • MCP directory
  • MCP Apps
  • Tools
  • Agent skills
  • Categories
  • New
  • Voice
  • Submit a server

Developers

  • Docs
  • Blog
  • GitHub registry
  • Club
  • Work with us
  • Learn MCP
  • What is MCP
  • What is WebMCP
  • Status

Company

  • About
  • Contact
  • Support
  • Terms
  • Privacy
  • Refunds
  • DPA
StatusPrivacyTermsRefunds© 2026 PlugMCP
Skip to content
    • MCP directoryEvery server, linked to the publisher.
    • GitHub registryCurated MCP servers and skills on GitHub.
    • Agent skillsSKILL.md packs for Claude and Codex.
    • CategoriesBrowse by what the server does.
    • NewServers added in the last day.
    • TrendingClimbing on GitHub this week.
    • LeaderboardsMost starred and most installed.
    • ToolsSearch by the tool name an agent calls.
    • Config checkerFree browser tool to validate MCP install JSON.
    • MCP AppsServers that render UI in the chat.
    PlugMCP directorySubmit a server
    • HostYour own endpoint with keys and logs.
    • VoiceServers tuned for phone agents.
    • BrowserTools from the tab you have open.
    • DocsConnect, publish, and install.
    • Learn MCPPlain guides to MCP, MCP Apps and building a server.
    • StatusGateway and directory health.
    PlugMCP productSee pricing
    • BlogInstall guides and notes.
    • What is MCPThe protocol in plain words.
    • What is WebMCPTools that live in a web page.
    • Best for CursorServers that work well in Cursor.
    • Best for ClaudeServers that work well in Claude.
    • Compare directoriesPlugMCP next to the others.
    • ClubPeople building with MCP.
    • Work with usWe build servers for teams.
    • AboutWho runs PlugMCP.
  • Pricing
Sign inSign up

Power your agent

Add this server

The publisher's own command. Not a PlugMCP endpoint.

Add to CursorAdd to VS CodeRun on PlugMCP

Host a copy with our keys and logs.

Local command
npx -y [email protected]

Claude Code has no install link for a local command. Copy the command below and run it in a terminal.

shClaude Code
1claude mcp add io.github.achiya-automation-safari-mcp -- npx -y safari-mcp@2.24.2

Run in a terminal.

jsonClaude Desktop
1{2  "mcpServers": {3    "io.github.achiya-automation-safari-mcp": {4      "command": "npx",5      "args": [6        "-y",7        "[email protected]"8      ]9    }10  }11}

claude_desktop_config.json

Local · npmPublisher installStep-by-step: add this in Claude

Check the JSON shape in your browser with the MCP configuration checker. Prefills only this listing's public metadata — it does not test the connection.

Remote URL or a command on your machine? How the two installs differ

Build on PlugMCP

Build a hosted URL for this kind of server

This listing runs on your computer. Build a hosted server with similar tools on PlugMCP.

Open builder

Server facts

Local
Transport
stdio
Version
2.24.2
License

From the publisher

Documentation

Key features

  1. 01. 98 tools — navigation, clicks, forms, screenshots, network, storage, accessibility, and more
  2. 02. Zero heat — native WebKit on Apple Silicon, ~60% less CPU than Chrome
  3. Your real browser — keeps all logins, cookies, sessions (Gmail, GitHub, Ahrefs, etc.)

Plug any tool into any agent. MCP servers for people who do not write servers. Gateway for volume, n8n for apps.

Product

  • Browse
  • Install
  • Host your own
  • MCP for MCPs
  • Pricing
  • Voice mode
  • Browser

Directory

  • MCP directory
  • MCP Apps
  • Tools
  • Agent skills
  • Categories
  • New
  • Voice
  • Submit a server

Developers

  • Docs
  • Blog
  • GitHub registry
  • Club
  • Work with us
  • Learn MCP
  • What is MCP
  • What is WebMCP
  • Status

Company

  • About
  • Contact
  • Support
  • Terms
  • Privacy
  • Refunds
  • DPA
StatusPrivacyTermsRefunds© 2026 PlugMCP
MIT
Last checked
2026-11-30
Stars
248
Tools
—
Uptime
—
03.
  • 04. Background operation — Safari stays in the background, no window stealing
  • 05. No browser dependencies — no Puppeteer, no Playwright, no WebDriver, no Chrome
  • 06. Persistent process — reuses a single osascript process (~5ms per command vs ~80ms)
  • 🦁 Safari MCP

    The browser for your coding agent.

    Your real Safari, logged in — no Chrome, no heat, no headless.

    Install in VS Code · VS Code Insiders · Install in Cursor

    98 tools · No Chrome/Puppeteer/Playwright needed · ~5ms per command · 60% less CPU than Chrome

    Quick Start · All 98 Tools · Examples · Why Safari MCP? · Architecture · Changelog

    Safari MCP Demo

    ❌ Without Safari MCP

    Your AI agent needs to browse. So it either:

    • Spins up Chromium via Playwright — with no logins, no cookies, no sessions
    • Uses Chrome DevTools MCP — and melts your fan running a second browser
    • Relies on headless scrapers — blocked by Cloudflare, reCAPTCHA, and bot detection

    ✅ With Safari MCP

    Your AI drives the Safari you're already logged into — Gmail, GitHub, Ahrefs, Slack, banking.

    Native WebKit. ~60% less CPU. Background operation. 98 tools. One npx command. macOS only.

    📰 Featured on freeCodeCamp: How to Connect Your AI Coding Agent to a Browser on macOS · HackerNoon: Reverse-Engineering React, Shadow DOM, and CSP

    🍎 Apple ships an official Safari MCP — safaridriver --mcp, first in Safari Technology Preview 247 (July 2026) and in stable Safari since 27.0. It drives an isolated automation session for debugging. safari-mcp drives the real Safari you're already logged into — your cookies and sessions, in the background, with 98 tools. See the full comparison below.


    Highlights

    • 98 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

    In users' own words

    Not solicited testimonials — quotes lifted from the public issue tracker, each linked to the thread it came from.

    "I run multiple Pi sessions/subagents against my normal Safari profile in parallel. Sharing its cookies and logins is intentional." — @maxim, on running concurrent agents against a real browser

    "The server has a deliberate tab-ownership model … the code is careful about this, and for the default case that's the right safety posture." — @turner-moore, on why the guards refuse to touch your tabs

    "Direct local validation from the package: Safari MCP doctor 6/6." — @jrepp, who found and fixed a queue-alignment bug in the focus helper


    Quick Start

    Prerequisites

    • macOS (any version with Safari)
    • Node.js 20+
    • Safari → Settings → Advanced → Show features for web developers ✓
    • Safari → Settings → Developer → Allow JavaScript from Apple Events ✓

    Install (one command)

    npx safari-mcp
    

    That's it — no global install needed. Or install permanently:

    npm install -g safari-mcp
    

    Configure your MCP client

    All clients run Safari MCP the same way — npx safari-mcp. Pick your editor:

    claude mcp add safari -- npx safari-mcp
    

    Or edit ~/.mcp.json:

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

    Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

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

    Restart Claude Desktop after saving.

    One-click: Install in Cursor

    Or edit .cursor/mcp.json in your project:

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

    One-click: Install in VS Code

    Or edit .vscode/mcp.json:

    {
      "servers": {
        "safari": {
          "type": "stdio",
          "command": "npx",
          "args": ["safari-mcp"]
        }
      }
    }
    

    Edit .windsurf/mcp.json in your project (or ~/.codeium/windsurf/mcp_config.json globally):

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

    Open Cline in VS Code → click the MCP icon → Edit MCP Settings → add:

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

    Edit ~/.continue/config.yaml (or .continue/config.yaml in workspace):

    mcpServers:
      - name: safari
        command: npx
        args:
          - safari-mcp
    

    Edit ~/.config/goose/config.yaml:

    extensions:
      safari:
        name: safari
        type: stdio
        cmd: npx
        args:
          - safari-mcp
        enabled: true
    

    Open LM Studio → Settings → MCP Servers → Add Server:

    • Name: safari
    • Command: npx
    • Args: safari-mcp

    Open Zed → Settings → search for "Context Servers" and add:

    {
      "context_servers": {
        "safari": {
          "command": {
            "path": "npx",
            "args": ["safari-mcp"]
          }
        }
      }
    }
    
    brew install achiya-automation/tap/safari-mcp
    
    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:

    StrategyExampleBest for
    CSS selector#login-btn, .submitUnique elements
    Visible text"Sign In", "Submit"Buttons, links
    Coordinatesx: 100, y: 200Canvas, custom widgets
    Ref from snapshotref: "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.


    Running several agents at once

    Multiple agents or subagents driving one Safari at the same time will fight over the active tab — unless you run them against a shared HTTP daemon instead of one process per client:

    SAFARI_MCP_HTTP=1 SAFARI_MCP_HTTP_PORT=9225 npx safari-mcp
    

    Then point every client at it:

    { "mcpServers": { "safari-mcp": { "type": "http", "url": "http://127.0.0.1:9225/mcp" } } }
    

    One daemon, many sessions — and each session gets its own tab state. The server keys activeTabIndex, the ownership flag and a unique tab marker off the MCP session id, so session A physically cannot read or steer session B's tab.

    Two properties make this safe rather than merely tidy:

    • Tab identity is a marker, not an index. Each session stamps a unique id into the page it opens, so ownership survives navigation and survives the user reordering or closing other tabs. An index alone would silently drift onto the wrong tab.

    • It fails closed. If a session's marked tab can't be re-found, every tool refuses instead of falling back to whatever tab is in front — because that tab is usually yours:

      Tab tracking lost — refusing to fall back to "current tab of window"
      (would target the user's active tab). Call safari_new_tab to reopen.
      

    This also drops process count sharply: ~17 node processes for 17 concurrent sessions becomes 1.

    SAFARI_PROFILE stays optional — leave it unset and sessions bind to your ordinary Safari windows, cookies and logins intact. Details in docs/http-transport-design.md.

    Prefer stdio (one process per agent) over a persistent daemon? That works too — isolation then comes from the process boundary itself. One caveat: if your client multiplexes agents through mcporter, mcporter caches a single MCP client for all of them — whichever transport you pick — so the server never sees distinct sessions and per-session isolation can't engage. mcporter-lanes (a pi extension by @maxim, born out of #76) fixes this upstream: each agent session gets its own daemon dir — and therefore its own safari-mcp — with an idle timeout so processes don't pile up.


    Acting on a tab you already have open

    By default the server touches only tabs it opened itself. Point it at one of yours and it refuses:

    Tab safety: refusing "click" — current tab (https://mail.example.com/inbox) was not
    opened by this MCP session. Use safari_new_tab or safari_switch_tab to target your own tab.
    

    That default exists because early versions did click into and close people's tabs. But "read the article I'm looking at" and "fill in the form on my screen" are real, and reopening the page loses the session state that made your tab worth using. Set SAFARI_MCP_ALLOW_USER_TABS=1 and an explicit safari_switch_tab adopts the tab instead of refusing it; from then on the session works in it like one of its own, and says so:

    { "tabIndex": 3, "safeUrl": "https://mail.example.com/inbox", "note": "(user tab, opted-in)" }
    

    What the flag deliberately does not do:

    • It unlocks adoption, not the guards. Only safari_switch_tab adopts, and only the tab you named. An ordinary click or navigate still never lands on whatever tab happens to be in front — the server acts on the tab you pointed it at, not the one you wandered to.
    • safari_close_tab still refuses. Closing is the one action whose cost you cannot undo, so an adopted tab is writable, never disposable. Close it yourself.
    • Adoption is session-local. Nothing is written to the shared ownership file, so it ends with the session rather than leaking to the next process on the machine.

    safari_doctor prints the flag's state, and every operation on an adopted tab logs (user tab, opted-in) — so "why did it touch my tab" has an answer instead of being a mystery. Default off; set it only for agents you want working inside your own browsing session. Designed in #92.


    Environment variables

    VariableDefaultWhat it does
    SAFARI_MCP_HTTPoffRun one shared HTTP daemon instead of a process per client (see above).
    SAFARI_MCP_HTTP_PORT9225Port for that daemon.
    SAFARI_PROFILEunsetBind sessions to a named Safari profile. Unset = your ordinary windows.
    SAFARI_MCP_ALLOW_USER_TABSoffLet safari_switch_tab adopt a tab you already had open, instead of refusing it (see below).
    MCP_MAX_TABS6Tabs one session may keep open. Opening one more closes that session's oldest tab, and safari_new_tab names it in evictedTab (its receipt).
    SAFARI_MCP_RAISE_ON_NAVIGATEoffLet navigation bring Safari to the front, and stop the focus guard from putting your previous app back.
    SAFARI_MCP_SCREENSHOT_MAX_WIDTHunsetDownscale every safari_screenshot to this pixel width (Retina captures are 2× the viewport). Per-call maxWidth overrides it.
    SAFARI_MCP_KEEPALIVE_TABoffKeep one daemon-served page open in the profile window so Safari never parks the extension worker between commands.
    SAFARI_MCP_OPEN_WINDOW_CMDunsetCommand run with the profile name when the profile window is absent (e.g. after a reboot). Must open the window without focusing Safari.

    SAFARI_MCP_RAISE_ON_NAVIGATE=1 is for agents whose whole point is showing you a page — a voice assistant answering "open YouTube", a demo driver. Everything else should leave it off: by default Safari MCP works in the background and hands focus back to whatever app you were using, so an agent can drive a page while you keep typing somewhere else.


    Tools (98)

    Navigation (4)

    ToolDescription
    safari_navigateNavigate to URL (auto HTTPS, wait for load)
    safari_go_backGo back in history
    safari_go_forwardGo forward in history
    safari_reloadReload page (optional hard reload)

    Page Reading (3)

    ToolDescription
    safari_read_pageGet title, URL, and text content
    safari_get_sourceGet full HTML source
    safari_navigate_and_readNavigate + read in one call

    Click & Interaction (6)

    ToolDescription
    safari_clickClick by CSS selector, visible text, or coordinates
    safari_double_clickDouble-click (select word, etc.)
    safari_right_clickRight-click (context menu)
    safari_hoverHover over element
    safari_click_and_waitClick + wait for navigation
    safari_click_and_readClick then return the updated page — saves a round-trip (React Router + full loads)

    Form Input (11)

    ToolDescription
    safari_fillFill input (React/Vue/Angular compatible)
    safari_clear_fieldClear input field
    safari_select_optionSelect dropdown option
    safari_fill_formBatch fill multiple fields
    safari_fill_and_submitFill form + submit in one call
    safari_type_textType real keystrokes (JS-based, no System Events)
    safari_press_keyPress key with modifiers
    safari_react_select_setSet a react-select v5 value via React fiber — bypasses the menu UI
    safari_react_select_list_optionsList a react-select v5 dropdown's options without opening it
    safari_replace_editorReplace all content in a code editor (Monaco, CodeMirror, Ace, ProseMirror)
    safari_verify_stateVerify an editor's framework-level state matches expected — catch stale DOM before Submit

    Screenshots & PDF (3)

    ToolDescription
    safari_screenshotScreenshot as PNG (viewport or full page)
    safari_screenshot_elementScreenshot a specific element
    safari_save_pdfExport page as PDF

    Scroll (3)

    ToolDescription
    safari_scrollScroll up/down by pixels
    safari_scroll_toScroll to exact position
    safari_scroll_to_elementSmooth scroll to element

    Tab Management (5)

    ToolDescription
    safari_list_tabsList all tabs (index, title, URL)
    safari_new_tabOpen new tab (background, no focus steal)
    safari_close_tabClose tab
    safari_switch_tabSwitch to tab by index
    safari_wait_for_new_tabWait for a new tab (e.g. OAuth popup) and auto-switch to it

    Wait (2)

    ToolDescription
    safari_wait_forWait for element, text, or URL change
    safari_waitWait for specified milliseconds

    JavaScript (3)

    ToolDescription
    safari_evaluateExecute arbitrary JavaScript, return result
    safari_eval_fileExecute JavaScript read from a file path (avoids huge inline scripts)
    safari_list_framesList every document in the tab (main page + each iframe) with frameId, URL and text length — pass a frameId to safari_evaluate's frame to run inside a cross-origin iframe

    Element Inspection (4)

    ToolDescription
    safari_get_elementElement details (tag, rect, attrs, visibility)
    safari_query_allFind all matching elements
    safari_get_computed_styleComputed CSS styles
    safari_detect_formsAuto-detect all forms with field selectors

    Accessibility (2)

    ToolDescription
    safari_accessibility_snapshotFull a11y tree: roles, ARIA, focusable elements
    safari_snapshotAccessibility tree with ref IDs for every interactive element — preferred way to see page state

    Drag & Drop (1)

    ToolDescription
    safari_dragDrag between elements or coordinates

    File Operations (2)

    ToolDescription
    safari_upload_fileUpload file via JS DataTransfer (no file dialog!)
    safari_paste_imagePaste image into editor (no clipboard touch!)

    Dialog & Window (2)

    ToolDescription
    safari_handle_dialogHandle alert/confirm/prompt
    safari_resizeResize browser window

    Device Emulation (2)

    ToolDescription
    safari_emulateEmulate device (iPhone, iPad, Pixel, Galaxy)
    safari_reset_emulationReset to desktop

    Cookies & Storage (11)

    ToolDescription
    safari_get_cookiesGet all cookies
    safari_set_cookieSet cookie with all options
    safari_delete_cookiesDelete one or all cookies
    safari_local_storageRead localStorage
    safari_set_local_storageWrite localStorage
    safari_delete_local_storageDelete/clear localStorage
    safari_session_storageRead sessionStorage
    safari_set_session_storageWrite sessionStorage
    safari_delete_session_storageDelete/clear sessionStorage
    safari_export_storageExport all storage as JSON (backup/restore sessions)
    safari_import_storageImport storage state from JSON

    Clipboard (2)

    ToolDescription
    safari_clipboard_readRead clipboard text
    safari_clipboard_writeWrite text to clipboard

    Network (6)

    ToolDescription
    safari_networkQuick network requests via Performance API
    safari_start_network_captureStart detailed capture (fetch + XHR)
    safari_network_detailsGet captured requests with headers/timing
    safari_clear_networkClear captured requests
    safari_mock_routeMock network responses (intercept fetch/XHR)
    safari_clear_mocksRemove all network mocks

    Console (4)

    ToolDescription
    safari_start_consoleStart capturing console messages
    safari_get_consoleGet all captured messages
    safari_clear_consoleClear captured messages
    safari_console_filterFilter by level (log/warn/error)

    Performance (2)

    ToolDescription
    safari_performance_metricsNavigation timing, Web Vitals, memory
    safari_throttle_networkSimulate slow-3g/fast-3g/4g/offline

    Data Extraction (4)

    ToolDescription
    safari_extract_tablesTables as structured JSON
    safari_extract_metaAll meta: OG, Twitter, JSON-LD, canonical
    safari_extract_imagesImages with dimensions and loading info
    safari_extract_linksLinks with rel, external/nofollow detection

    Advanced (7)

    ToolDescription
    safari_override_geolocationOverride browser geolocation
    safari_list_indexed_dbsList IndexedDB databases
    safari_get_indexed_dbRead IndexedDB records
    safari_css_coverageFind unused CSS rules
    safari_analyze_pageFull page analysis in one call
    safari_doctorDiagnose the macOS permission + daemon chain (Apple Events, Accessibility, Screen Recording, codesign) with per-failure fixes
    safari_reload_extensionHot-reload the Safari MCP Bridge extension without a manual toggle

    Automation (1)

    ToolDescription
    safari_run_scriptRun multiple actions in a single call (batch)

    Native Input — CGEvent (4)

    ToolDescription
    safari_native_clickOS-level mouse click (CGEvent, isTrusted: true) — bypasses WAF/bot detection when safari_click is blocked (405/403)
    safari_native_hoverOS-level cursor hover — triggers real :hover/mouseenter for tooltips and obfuscated UIs
    safari_native_typeInsert text via the real paste pipeline — ProseMirror/Slate/Draft.js process it natively so Submit sends real data
    safari_native_keyboardOS-level keypress + modifiers to Safari, no focus steal — reaches React trust-gated handlers (Discord/Slack send)

    iOS & WebKit Validation (4)

    ToolDescription
    safari_inspect_viewportValidate the <meta name=viewport> tag for iOS Safari (device-width, zoom/WCAG, viewport-fit)
    safari_safe_area_insetsRead live safe-area-inset values + viewport-fit / env() usage (notch / Dynamic Island)
    safari_check_pwaAudit iOS "Add to Home Screen" / PWA readiness (apple-touch-icon, manifest, theme-color, splash)
    safari_webkit_compatCheck page CSS against this Safari via CSS.supports() — unsupported props, missing -webkit- prefixes, known quirks

    Security

    Safari MCP runs locally on your Mac with minimal attack surface:

    AspectDetail
    NetworkNo remote connections — all communication is local (stdio + localhost)
    PermissionsmacOS system permissions required (Screen Recording for screenshots)
    DataNo telemetry, no analytics, no data sent anywhere
    ExtensionCommunicates only with the local profile bridges (localhost:9224/9228/9232/9236), validated by Safari
    CodeFully open source (MIT) — audit every line

    Safari MCP vs Alternatives

    FeatureSafari MCPChrome DevTools MCPPlaywright MCP
    CPU/Heat🟢 Minimal🔴 High🟡 Medium
    Your logins✅ Yes✅ Yes❌ No
    macOS native✅ WebKit❌ Chromium❌ Chromium/WebKit
    Browser dependenciesNoneChrome + debug portPlaywright runtime
    Tools98~30~25
    File uploadJS (no dialog)CDPPlaywright API
    Image pasteJS (no clipboard)CDPPlaywright API
    Focus steal❌ Background❌ Background❌ Headless
    Network mocking✅❌✅
    Lighthouse❌✅❌
    Performance trace❌✅❌

    Tip: Use Safari MCP for daily browsing tasks (95% of work) and Chrome DevTools MCP only for Lighthouse/Performance audits.

    vs Apple's Official Safari MCP (safaridriver)

    In July 2026 Apple shipped an official Safari MCP server built on safaridriver — first in Safari Technology Preview 247, and in stable Safari since 27.0. That's great validation for the category — and it's built for a different job. Apple's server drives an isolated WebDriver automation session for debugging; safari-mcp drives the real Safari you're already logged into.

    On macOS 27.0 with Safari 27.0, safaridriver --help lists --mcp and its tools/list answers with 17 entries (verified 2026-09-15); Safari 26.5.2 had no --mcp (verified 2026-07-23). Check your own machine with safaridriver --help | grep mcp.

    Running both? Apple's setup guide registers its server under the name safari-mcp (claude mcp add safari-mcp -- /usr/bin/safaridriver --mcp) — the same name as this package. Give one of them a different name, e.g. claude mcp add safari-webdriver -- /usr/bin/safaridriver --mcp, so your client doesn't overwrite one with the other or leave you guessing which server answered.

    🦁 safari-mcp (this repo)Apple safaridriver --mcp
    Your real logins / cookies✅ Your actual Safari⚠️ Isolated automation session — no access to AutoFill or browsing activity
    Runs on✅ Stable Safari, every Mac⚠️ Safari 27 or later, or Safari Technology Preview 247+
    Background (no focus steal)✅ Yes❌ Dedicated window with a "controlled by automation" banner
    Page sees navigator.webdriver✅ false — an ordinary tab⚠️ true — required of every WebDriver session
    Tools9817
    Storage (cookies, localStorage, IndexedDB)✅ 10 tools❌
    Network mocking + throttling✅ Yes❌ Read-only network inspection
    Device emulation (iPhone, iPad)✅ Yes⚠️ Viewport + media type only
    Setupnpx safari-mcpEnable "Allow remote automation and external agents" in Safari's Developer settings, then point your client at safaridriver --mcp
    Official Apple support❌ Community (MIT)✅ Apple, WebDriver-standard

    About that navigator.webdriver row: the WebDriver standard requires every remote-controlled session to report true, so Apple's server does. safari-mcp evaluates JavaScript in an ordinary tab, so it reads false (checked on Safari 27.0, 2026-09-17). That is the difference if a site refuses WebDriver traffic. It is not an anti-detection feature — nothing else about the browser is disguised, and your real logins are in use, so treat every page as if it knows exactly who you are.

    When Apple's server is the right pick: you specifically want a clean-room, WebDriver-standard session for compatibility debugging on Safari 27 or later. For everything else — daily automation on the browser you're already signed into, in the background — safari-mcp is built for exactly that.

    Why Safari MCP and Not the Other Safari MCP Projects?

    There are several "safari-mcp" projects floating around. Here's how they compare:

    Feature🦁 safari-mcp (this repo)lxman/safari-mcp-serverEpistates/MCPSafariHayoDev/safari-devtools-mcp
    Tools98~1023~15
    Installnpx safari-mcpManualBinarynpx
    EngineDual (Extension + AppleScript)WebDriverExtension onlyDevTools Protocol
    Keeps your real Safari logins✅ Yes⚠️ Limited✅ Yes❌ Debug session
    Background (no focus steal)✅ Yes❌ No⚠️ Sometimes✅ Yes
    Storage tools (cookies, localStorage, IndexedDB)10002
    Data extraction (tables, meta, images, links)4000
    Network mocking✅ Yes❌ No❌ No❌ No
    Device emulation (iPhone, iPad, Pixel)

    TL;DR — if you want the most complete Safari MCP with the smoothest install, the most tools, and active maintenance, this is the one.


    Architecture

    Safari MCP uses a dual-engine architecture — the Extension is preferred for speed and advanced capabilities, with AppleScript as an always-available fallback:

    Claude/Cursor/AI Agent
            ↓ MCP Protocol (stdio)
       Safari MCP Server (Node.js)
            ↓                    ↓
       Extension (HTTP)     AppleScript + Swift daemon
       (~5-20ms/cmd)        (~5ms/cmd, always available)
            ↓                    ↓
       Content Script       do JavaScript in tab N
            ↓                    ↓
       Page DOM ←←←←←←←←←← Page DOM
    

    Key design decisions:

    • Dual engine with automatic fallback — Extension is preferred; if not connected, AppleScript handles everything seamlessly
    • Persistent Swift helper — one long-running process instead of spawning per command (16x faster)
    • Tab-indexed operations — all JS runs on a specific tab by index, never steals visual focus
    • JS-first approach — typing, clicking, file upload all use JavaScript events (no System Events keyboard conflicts)
    • No activate — Safari is never brought to foreground

    Safari Extension (Optional)

    The Safari MCP Extension is optional but recommended. Without it, ~80% of functionality works via AppleScript alone. The extension adds capabilities that AppleScript cannot provide:

    What the Extension Adds

    CapabilityWith ExtensionAppleScript Only
    Closed Shadow DOM (Reddit, Web Components)✅ Full access❌ Invisible
    Strict CSP sites✅ Bypasses via MAIN world❌ Often blocked
    React/Vue/Angular state manipulation✅ Deep (Fiber, ProseMirror)⚠️ Basic
    Loading state detection (spinners, skeletons)✅ Smart detection❌ No
    Dialog handling (alert/confirm)❌✅ Only AppleScript
    Native OS-level click (CGEvent)❌✅ Only AppleScript
    PDF export❌✅ Only AppleScript

    When do you need the extension? If you're automating modern SPAs with closed shadow DOM (e.g., Reddit), sites with strict Content Security Policy, or framework-heavy editors (Draft.js, ProseMirror, Slate).

    Installing the Extension

    The extension requires a one-time build with Xcode (free, included with macOS).

    Note for npm users: The xcode/ directory is not included in the npm package. Clone the GitHub repository to build from source.

    Prerequisites: Xcode (install from App Store — free)

    # 1. Clone the repo (the npm package does not include the Xcode project)
    git clone https://github.com/achiya-automation/safari-mcp.git
    cd safari-mcp
    
    # 2. Build a clean, Apple Development-signed app
    # If needed, first choose your Team in Xcode → Signing & Capabilities.
    xcodebuild -project "xcode/Safari MCP/Safari MCP.xcodeproj" \
      -scheme "Safari MCP (macOS)" -configuration Release \
      -allowProvisioningUpdates clean build
    
    # 3. Locate the signed app
    APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData/Safari_MCP-*/Build/Products/Release -name "Safari MCP.app" -maxdepth 2 | head -1)
    
    # 4. Re-sign safari-helper with the Apple Events entitlement
    # (helps macOS surface the TCC Automation prompt reliably)
    codesign --sign - --force --entitlements safari-helper.entitlements safari-helper
    
    # 5. Open the app (needed once so Safari registers the extension)
    open "$APP_PATH"
    

    Do not ad-hoc re-sign Safari MCP.app with codesign --deep --sign -. That replaces the Apple Development identity on the wrapper and embedded extension; current Safari can then silently disable or mark the extension as removed. If a previous build was ad-hoc signed, run the clean build command above again.

    Alternatively, open xcode/Safari MCP/Safari MCP.xcodeproj directly in Xcode, select your Apple ID under Signing & Capabilities, and click Run. A free personal Apple Developer account is sufficient for local use.

    Then in Safari:

    1. Safari → Settings → Advanced → enable Show features for web developers
    2. Safari → Settings → Developer → Allow unsigned extensions (required each Safari restart)
    3. Safari → Settings → Extensions → enable Safari MCP Bridge

    The extension connects automatically to the first local bridge whose declared Safari profile matches its own. The default bridge ports are 9224, 9228, 9232, and 9236; a single-profile setup normally uses 9224.

    Note: "Allow unsigned extensions" resets every time Safari restarts. You'll need to re-enable it in Safari → Settings → Developer after each restart. The extension itself stays installed.

    Toolbar icon status:

    • ON — connected to MCP server
    • OFF — manually disabled via popup
    • (no badge) — server not running, will auto-reconnect

    macOS Permissions

    Safari MCP needs these one-time permissions:

    PermissionWhereWhy
    JavaScript from Apple EventsSafari → Settings → DeveloperRequired for do JavaScript
    Automation → SafariSystem Settings → Privacy & Security → AutomationRequired for all AppleScript-backed tools
    Screen RecordingSystem Settings → Privacy & Security → Screen & System Audio RecordingRequired for safari_screenshot without the extension, and for safari_save_pdf
    Accessibility (safari-helper)System Settings → Privacy & Security → Accessibility (named Device Control and Data Access on macOS 27)Required for safari_native_click, safari_native_keyboard, safari_native_hover and safari_save_pdf

    Granting Accessibility to safari-helper (required for safari_native_*)

    The safari_native_click, safari_native_keyboard and safari_native_hover tools inject OS-level CGEvent events into Safari without stealing focus. macOS requires the underlying helper binary to be approved in Accessibility before those events can reach a non-frontmost window.

    1. Open System Settings → Privacy & Security → Accessibility (on macOS 27 the pane is named Device Control and Data Access).
    2. Click + (unlock with your password if needed).
    3. Navigate to the helper binary and add it:
      • npm global install: $(npm root -g)/safari-mcp/safari-helper
      • npx / project install: ./node_modules/safari-mcp/safari-helper
      • From source clone: /path/to/safari-mcp/safari-helper
    4. Make sure the toggle next to it is ON.

    The postinstall script re-signs the helper with a stable identifier (com.achiya-automation.safari-mcp) so this permission survives future upgrades — without that step, every npm update would silently revoke approval because the binary's adhoc-signed identifier changes per build.

    If safari_native_click reports success but the page doesn't react (no isTrusted: true click events fire), the helper is most likely missing this approval. The safari_* (non-native_) tools don't need it.

    Granting Automation → Safari (important for IDE users)

    macOS TCC grants Automation permission to the parent process that spawns the MCP server, not to safari-mcp itself. So you need to grant Automation → Safari to the app that runs Claude Code / Cursor / Windsurf — typically Visual Studio Code or Terminal.

    If the permission dialog never appears automatically, run this command once from a Terminal that already has Automation permission:

    osascript -e 'tell application "Safari" to get URL of current tab of window 1'
    

    That call registers the Terminal app in the Automation database and then triggers the prompt for Safari. After you approve it, subsequent MCP calls from any child process chain will work.


    Troubleshooting

    IssueFix
    "AppleScript error"Enable "Allow JavaScript from Apple Events" in Safari → Settings → Developer
    "Not authorized to send Apple events to Safari"Grant Automation → Safari to your IDE (see above)
    "Not authorized" after npm updateUpdating changes the binary's cdhash — macOS silently revokes Automation permission. Re-run the osascript one-liner above to re-grant it
    safari_native_click reports success but page doesn't reactAdd safari-helper to System Settings → Privacy & Security → Accessibility (see Granting Accessibility above). Confirm by attaching a click listener with {capture:true} in the page console — without the grant, no isTrusted: true event fires
    Screenshots emptyGrant Screen & System Audio Recording to Terminal/VS Code — or, when safari-mcp runs as a LaunchAgent, to the node binary itself (a Homebrew node upgrade changes its path, so re-grant after upgrading). safari_doctor names the exact binary
    Extension missing after enabling "Allow unsigned extensions" (macOS 27)Known macOS 27.0 issue (183044008): with the setting on, rebuild the extension app (see Installing the Extension) and it appears
    Tab not foundCall safari_list_tabs to refresh tab indices
    Hebrew keyboard issuesAll typing uses JS events — immune to keyboard layout
    HTTPS blockedsafari_navigate auto-tries HTTPS first, falls back to HTTP
    Safari steals focusEnsure you're on latest version — newTab restores your active tab

    FAQ

    No. Every AppleScript path targets application "Safari" and the native helper looks for the bundle id com.apple.Safari, so STP (com.apple.SafariTechnologyPreview) is a different application that safari-mcp never addresses. Run it against stable Safari.

    Note that Apple's own safaridriver --mcp server is the one that needs STP 247+ (or Safari 27+) — see Safari MCP vs Alternatives. The two are unrelated.

    Not as a supported mode, and it is untested. No tool opens a private window, and Safari disables extensions in Private Browsing unless you turn each one on explicitly, so the extension bridge — and everything in the "With Extension" column of Safari Extension (Optional) — is off there by default.

    If you want an isolated identity, use a separate Safari profile instead: profile windows are a first-class concept here (see Running several agents at once).

    Yes. Tab lookups walk every window rather than assuming window 1, and a tab is pinned by its window's (index, tabCount) pair, because an index on its own is ambiguous once two windows are open. Profile windows are recognised by Safari's ProfileName — Tab Title window naming.

    The reliable handle is still the receipt that safari_new_tab returns: pass it to every later call and the tab is addressed directly, no matter how many windows move around it.

    Any macOS with Safari — the package declares "os": ["darwin"] and no minimum OS, and there is no version gate in the code. Node.js 20+ is the hard requirement ("engines": { "node": ">=20" }).

    Two places where the OS does matter in practice:

    • On macOS 27 the Accessibility pane is renamed Device Control and Data Access — same grant, new name (see macOS Permissions).
    • Safari 26 and 27 changed several web-platform behaviours that specific tools account for; those are handled, not blocked.

    Yes — that is what Running several agents at once covers. Each session owns its own tabs, and ownership is tracked per session rather than by tab index, so one agent cannot act on (or close) a tab another agent owns.

    One process binds the extension bridge port; the others proxy through it and take the port over if that process exits.

    No. safari_new_tab opens a background tab and never steals focus, and the few commands macOS forces an implicit activate on restore your previous frontmost app afterwards — with a guard that leaves focus alone if you were typing in Safari yourself a moment earlier.

    The two exceptions are the deliberately native tools — safari_native_click, safari_native_keyboard, safari_native_hover — which post real OS events and therefore land wherever the frontmost window is. Do not use those while you are working in another Safari tab.

    Your existing extensions keep running normally; safari-mcp drives the same Safari you use, so content blockers and password managers behave exactly as they do for you.

    safari-mcp also ships its own optional extension. Without it roughly 80% of the tools still work over AppleScript alone; with it you additionally get closed shadow DOM, strict-CSP sites, deep framework state and loading-state detection. Dialog handling, native clicks and PDF export go the other way — those are AppleScript-only. The full split is in Safari Extension (Optional).

    Anything that evaluates JavaScript fails — safari_evaluate, safari_read_page, form filling, extraction — while pure AppleScript actions such as opening or switching tabs still work. That is the usual cause of "it opens the tab but reads nothing".

    Turn it on in Safari → Settings → Advanced → Show features for web developers, then Safari → Settings → Developer → Allow JavaScript from Apple Events. Both are listed under Prerequisites. safari_doctor walks the rest of the chain (Automation, native helper, Accessibility, Screen Recording) and names this setting in its fix hint — but its Apple Events check only counts windows, which Automation permission alone satisfies, so it will not fail on this one for you.

    Works With

    Safari MCP works with any MCP-compatible client:

    ClientStatus
    Claude Code✅ Tested daily
    Claude Desktop✅ Tested
    Cursor✅ Tested
    Windsurf✅ Compatible
    VS Code + Continue✅ Compatible

    Contributing

    PRs welcome! See CONTRIBUTING.md for setup instructions.

    The codebase is two files:

    • safari.js — Safari automation layer (AppleScript + JavaScript)
    • index.js — MCP server with tool definitions

    Sponsors

    Safari MCP is free and open source. If it saves you time or CPU cycles, consider supporting its development:

    Your support funds:

    • 🧪 Testing across macOS versions and Safari releases
    • 🛠️ New tools and features
    • 📖 Documentation and examples

    Become the first sponsor!


    Commercial Support

    Need Safari MCP integrated into your product or agent stack? Achiya Automation offers:

    • Priority bug fixes and custom tool development for your use case
    • Integration consulting — wiring Safari MCP into production agent systems (Claude, Cursor, n8n, custom)
    • Private deployment support — multi-user Safari MCP, non-standard macOS environments, CI/CD
    • Training workshops for engineering teams adopting MCP-based automation

    Built by the author of Safari MCP. Start a conversation →


    What agents unlock with Safari MCP

    When an AI agent drives Safari MCP, it gets things a headless browser can't:

    • Real authenticated sessions — Gmail, GitHub, Ahrefs, Slack, banking dashboards are all already logged in
    • Framework-aware form filling — safari_fill_and_submit calls React/Vue/Angular setters natively, no guessing whether input events fired
    • Background operation — the agent works in parallel while you keep using your Mac
    • One MCP call per workflow — safari_run_script batches navigation + clicks + extraction into a single roundtrip

    The pattern holds across models: drive the browser the human already trusts — you inherit logins, cookies, extensions, and the user's exact environment in one step.


    Community

    6,000+ monthly npm downloads — developers are building AI agents on macOS with Safari MCP.

    • GitHub Discussions — ask questions, share use cases
    • Issues — bug reports and feature requests
    • — start contributing

    Ecosystem

    Other macOS MCP servers that complement Safari MCP:

    ProjectWhat it doesWhen to use
    mcp-server-macos-useOS-level macOS automation (accessibility, screen control)System-wide interactions beyond Safari
    chrome-devtools-mcpChrome DevTools ProtocolLighthouse audits, Chrome-specific performance traces

    Using Safari MCP alongside Chrome DevTools MCP? Safari handles 95% of daily browsing (zero overhead), Chrome handles the 5% that needs Lighthouse or Chrome-specific traces.


    Listed On


    License

    MIT — use it however you want.


    Built by Achiya Automation — automation & AI agents for business.

    Directory score

    46/100
    • Listed10 of 10
    • In the official MCP Registry18 of 18
    • Claimed by its maintainer0 of 8
    • Answers with a tool list0 of 12
    • GitHub stars14 of 16
    • Weekly downloads0 of 10

    Related MCP servers

    Browser automation
    • S
      Scrapling🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and trick
    • C
      Chrome DevTools MCPMCP server for Chrome DevTools
    • C
      Chrome DevTools MCPMCP server for Chrome DevTools
    • C
      Chrome DevtoolsChrome DevTools for coding agents
    • C
      Chrome DevtoolsChrome DevTools for coding agents
    • P
      PlaywrightPlaywright MCP server
    • U
      UI TARS DesktopThe Open-Source Multimodal AI Agent Stack: Connecting Cutting-Edge AI Models and Agent Infra
    • P
      PlaywrightPlaywright MCP server
    • O
      ObscuraThe headless browser for AI agents and web scraping
    • C
      CuaScale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
    • E
      Ego LiteThe fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero conf
    • P
      Playwright CliCLI for common Playwright actions. Record and generate Playwright code, inspect selectors and take screenshots.
    Browser automation MCP serversBest Browser automation MCP servers

    Related skills

    View all
    • A
      agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web a
    • P
      playwright-cliAutomate browser interactions, test web pages and work with Playwright tests.
    HomeServersSafari
    S

    Safari

    io.github.achiya-automation·248 stars·

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

    Browser AutomationProductivity
    Add to CursorAdd to VS CodeOpen builderClaim this server
    Add to CursorAdd to VS CodeRun on PlugMCP
    1{2  "mcpServers": {3    "io.github.achiya-automation-safari-mcp": {4      "command": "npx",5      "args": [6        "-y",7        "[email protected]"8      ]9    }10  }11}
    S
    .cursor/mcp.json
    MCP server
    Transport
    stdio
    Status
    Local

    Overview

    About Safari

    98 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.)

    Tools

    Tools

    No tool list yet. Remote servers get one after the first health check.

    FAQ

    Questions

    How do I install Safari?

    Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.

    ✅ Yes
    ❌ No
    ❌ No
    ❌ No
    File upload (no dialog)✅ JS DataTransfer❌ No❌ No❌ No
    Image paste (no clipboard touch)✅ Yes❌ No❌ No❌ No
    PDF export✅ Yes❌ No❌ No❌ No
    Console capture4 tools011
    Performance metrics + Web Vitals✅ Yes❌ No❌ No⚠️ Partial
    Active maintenance✅ Multiple releases/week🟡 Sporadic🟡 Slow🟡 Slow
    LicenseMITMITNone specifiedMIT
    In MCP Registry✅❌❌✅
    In Awesome MCP✅❌❌❌
  • W
    webapp-testingToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser l
  • GitHub
    npm

    Does Safari need an API key?

    No required environment variable is listed on this record.

    What transport does Safari use?

    Safari runs locally over stdio.

    When was Safari last checked?

    Last checked 2026-11-30. 98 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.)

  • Tools0 of 10
  • Tools have descriptions0 of 6
  • License4 of 4
  • Voice ready0 of 3
  • Maintain this server? Claiming it adds 8 points.
    Claim this server