Safari MCP Server

Safari browser automation for AI agents — native macOS, zero Chrome overhead. 96 tools via AppleScript + JavaScript.

Local serverstdioGo

What is the Safari MCP Server?

Safari browser automation for AI agents — native macOS, zero Chrome overhead. 96 tools via AppleScript + JavaScript.

The short version

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

  • 97 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)

What it needs from you

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

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
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)
safari_read_pageGet title, URL, and text content
safari_get_sourceGet full HTML source
safari_navigate_and_readNavigate + read in one call
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)
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
safari_screenshotScreenshot as PNG (viewport or full page)
safari_screenshot_elementScreenshot a specific element
safari_save_pdfExport page as PDF
safari_scrollScroll up/down by pixels
safari_scroll_toScroll to exact position
safari_scroll_to_elementSmooth scroll to element
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
safari_wait_forWait for element, text, or URL change
safari_waitWait for specified milliseconds
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-ori
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
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
safari_dragDrag between elements or coordinates
safari_upload_fileUpload file via JS DataTransfer (no file dialog!)
safari_paste_imagePaste image into editor (no clipboard touch!)
safari_handle_dialogHandle alert/confirm/prompt
safari_resizeResize browser window
safari_emulateEmulate device (iPhone, iPad, Pixel, Galaxy)
safari_reset_emulationReset to desktop
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
safari_clipboard_readRead clipboard text
safari_clipboard_writeWrite text to clipboard
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
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)
safari_performance_metricsNavigation timing, Web Vitals, memory
safari_throttle_networkSimulate slow-3g/fast-3g/4g/offline
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
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
safari_run_scriptRun multiple actions in a single call (batch)
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)
safari_inspect_viewportValidate the 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

How to install the Safari MCP Server

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

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

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

Example prompts to try

  • “Use Safari MCP to Strategy.”
  • “Use Safari MCP to Coordinates.”
  • “Use Safari MCP to Prerequisites.”

Frequently asked questions

Safari browser automation for AI agents — native macOS, zero Chrome overhead. 96 tools via AppleScript + JavaScript. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.