← Back to directory
S

Safari MCP

Community
Drive the real Safari you are already logged into.
Category
Browser #20 of 32
Stars
★ 219 Very popular
Transport
stdio (local process)
Runtime
Node.js 18+
Credentials
No credential needed
License
MIT
Last commit
Tools
97
50FMRS · D

Safari MCP is a community-maintained MIT-licensed server for stable Safari on macOS, offering 97 browser-automation tools over stdio. Its strengths are real-session reuse, background operation, and broad storage, network, console, extraction, and WebKit-validation coverage; its main limitations are macOS-only support and the need for several system permissions.

Strongest · Documentation 13/20 Weakest · Security and permissions 6/20

Reliability
8/20
Security and permissions
6/20
Maintenance
12/20
Documentation
13/20
Setup experience
11/20
Why each score
Reliability 8/20
The manifest and stdio Node runtime make the basic startup path plausible, and the tool taxonomy is extensive. However, only the README and manifest are provided, with no verifiable source, tests, or CI coverage; the stated counts of 80, 97, and 96 tools also conflict, so initialization, tool behavior, and error handling cannot be confirmed.
Security and permissions 6/20
The documentation discloses local stdio/localhost communication and required macOS permissions, and presents no telemetry or remote connection. However, the server can execute arbitrary JavaScript, read and write cookies/storage/clipboard, upload files, inject native events, and operate real authenticated sessions. Fine-grained permissions, dangerous-operation confirmation, and clear data boundaries are not evidenced, so the score is limited.
Maintenance 12/20
The repository is not archived and reports version 2.14.0, an MIT license, 15 open issues, and multiple releases per week. These claims are primarily README or metadata evidence; there is no verifiable commit or release history, dependency update policy, or security-response channel, so full marks are not justified.
Documentation 13/20
The README includes installation, multiple client configurations, categorized tools, permissions, architecture, extension setup, and troubleshooting, while disclosing the macOS limitation and extension dependency. However, tool counts and capability claims conflict, per-tool parameters and failure boundaries are incomplete, cost and data-flow evidence is limited, and key claims lack test evidence, warranting deductions.
Setup experience 11/20
The npx command and examples for many clients make the basic configuration clear. However, it is macOS-only and requires Node, Safari developer settings, Automation permission, and additional permissions for screenshots and native input. The optional extension requires Xcode, signing, and repeated enabling of unsigned extensions, making setup fragile.

Static review · not runListed 2026-07-30

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesWrites / deletes local filesRuns commands or codeUses the networkControls a browser

Best for

  • AI coding agents running on macOS with Safari
  • Automation that must reuse real Safari logins, cookies, and sessions
  • Users who want background browser operation with lower additional CPU usage
  • Developers validating Safari, WebKit, or iOS pages

Not for

  • Non-macOS environments
  • Tasks requiring Chrome-specific debugging, Lighthouse, or performance tracing
  • Clean, isolated WebDriver sessions without the user's browser state
  • Users unwilling to grant Safari automation, screen-recording, or accessibility permissions

Required permissions

  • Safari: Allow JavaScript from Apple Events
  • macOS Automation access to Safari for the parent app running the MCP server
  • Screen Recording for screenshots
  • Accessibility for safari_native_* tools and safari_save_pdf

Risks and side effects

  • The tools can operate the real logged-in Safari and may access accounts, cookies, clipboard contents, and page data
  • safari_evaluate and related script tools can execute arbitrary JavaScript in the current page
  • Exported or imported storage may contain session information
  • Native input tools can produce real click, keyboard, and hover events in a non-frontmost Safari window
  • Automation of financial, social, or other sensitive sites should be reviewed before execution

Setup

Before you start

Runtime:Node.js 18+

Other optional settings (3)
SAFARI_MCP_HTTP optional Set to 1 to run as a shared HTTP daemon instead of one stdio process per client, allowing multiple agent sessions; optional.
SAFARI_MCP_HTTP_PORT optional Port the HTTP daemon listens on (example: 9225); only relevant when SAFARI_MCP_HTTP is enabled; optional.
SAFARI_PROFILE optional Optional profile isolation; if left unset, sessions bind to your ordinary Safari windows, cookies and logins.

Requires macOS, Node.js 18+, Safari's “Show features for web developers,” and Safari's “Allow JavaScript from Apple Events.” Run npx safari-mcp, or install with npm install -g safari-mcp or Homebrew. Add the supplied stdio configuration to an MCP client. The extension is optional; building it requires cloning the repository, installing Xcode, building and signing the project, then enabling Safari MCP Bridge in Safari. “Allow Unsigned Extensions” may need to be re-enabled after each Safari restart.

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

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "safari": {
      "command": "npx",
      "args": [
        "safari-mcp"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add safari -- npx safari-mcp

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After running `npx safari-mcp`, the client's tool list should show safari_-prefixed tools such as safari_navigate and safari_snapshot; run safari_doctor to check the macOS permission chain, or have the agent call safari_list_tabs — returning your real tabs proves the connection works.

Troubleshooting

  1. For AppleScript errors, enable Safari's Allow JavaScript from Apple Events
  2. For Apple Events authorization errors, grant Safari Automation access to the IDE or Terminal launching MCP
  3. For empty screenshots, grant Screen Recording to Terminal or VS Code
  4. If a tab is not found, call safari_list_tabs to refresh tab indexes
  5. If safari_native_* reports success but the page does not react, add and enable safari-helper under Accessibility
  6. If permissions disappear after npm update, rerun the source-provided osascript permission-trigger command
  7. For modern SPAs, closed Shadow DOM, or strict CSP sites, verify that the optional extension is installed and connected

Things to try

Once connected, you can ask your AI assistant things like:

  • Open https://github.com in Safari and tell me the page title and main content
  • Take a screenshot of the current page and use safari_snapshot to list all interactive elements
  • Fill the search box on example.com with a query, submit the form, and read back the results page
  • List all open Safari tabs with their titles and URLs

Tools 97

safari_navigate writes
Navigate to a URL.
safari_go_back writes
Go back in history.
safari_go_forward writes
Go forward in history.
safari_reload writes
Reload the page, optionally with a hard reload.
safari_read_page read-only
Read the page title, URL, and text content.
safari_get_source read-only
Get the full HTML source.
safari_navigate_and_read writes
Navigate and read the page.
safari_click writes
Click by CSS selector, visible text, or coordinates.
Show 89 more tools
safari_double_click writes
Double-click an element.
safari_right_click writes
Right-click an element.
safari_hover writes
Hover over an element.
safari_click_and_wait writes
Click and wait for navigation.
safari_click_and_read writes
Click and return the updated page.
safari_fill writes
Fill an input with React, Vue, and Angular compatibility.
safari_clear_field writes
Clear an input field.
safari_select_option writes
Select a dropdown option.
safari_fill_form writes
Batch-fill multiple fields.
safari_fill_and_submit writes
Fill and submit a form.
safari_type_text writes
Type real keystrokes.
safari_press_key writes
Press a key with optional modifiers.
safari_react_select_set writes
Set a react-select v5 value through React fiber.
safari_react_select_list_options read-only
List react-select v5 dropdown options.
safari_replace_editor writes
Replace all content in a code editor.
safari_verify_state read-only
Verify an editor's framework-level state.
safari_screenshot read-only
Capture a viewport or full-page PNG.
safari_screenshot_element read-only
Capture a specific element.
safari_save_pdf writes
Export the page as a PDF.
safari_scroll writes
Scroll up or down by pixels.
safari_scroll_to writes
Scroll to an exact position.
safari_scroll_to_element writes
Smoothly scroll to an element.
safari_list_tabs read-only
List all tabs.
safari_new_tab writes
Open a new background tab.
safari_close_tab writes
Close a tab.
safari_switch_tab writes
Switch tabs by index.
safari_wait_for_new_tab read-only
Wait for a new tab and switch to it.
safari_wait_for read-only
Wait for an element, text, or URL change.
safari_wait read-only
Wait for a specified number of milliseconds.
safari_evaluate writes
Execute JavaScript and return the result.
safari_eval_file writes
Execute JavaScript from a file.
safari_get_element read-only
Get an element's tag, rectangle, attributes, and visibility.
safari_query_all read-only
Find all matching elements.
safari_get_computed_style read-only
Get computed CSS styles.
safari_detect_forms read-only
Automatically detect forms and field selectors.
safari_accessibility_snapshot read-only
Get the full accessibility tree.
safari_snapshot read-only
Get an accessibility tree with reference IDs for interactive elements.
safari_drag writes
Drag between elements or coordinates.
safari_upload_file writes
Upload a file through JavaScript DataTransfer.
safari_paste_image writes
Paste an image into an editor.
safari_handle_dialog writes
Handle alert, confirm, and prompt dialogs.
safari_resize writes
Resize the browser window.
safari_emulate writes
Emulate iPhone, iPad, Pixel, or Galaxy devices.
safari_reset_emulation writes
Reset to desktop mode.
safari_get_cookies read-only
Get all cookies.
safari_set_cookie writes
Set a cookie with all options.
safari_delete_cookies destructive
Delete one or all cookies.
safari_local_storage read-only
Read localStorage.
safari_set_local_storage writes
Write localStorage.
safari_delete_local_storage destructive
Delete or clear localStorage.
safari_session_storage read-only
Read sessionStorage.
safari_set_session_storage writes
Write sessionStorage.
safari_delete_session_storage destructive
Delete or clear sessionStorage.
safari_export_storage read-only
Export all storage as JSON.
safari_import_storage writes
Import storage state from JSON.
safari_clipboard_read read-only
Read clipboard text.
safari_clipboard_write writes
Write text to the clipboard.
safari_network read-only
Make quick network requests through the Performance API.
safari_start_network_capture writes
Start capturing fetch and XHR requests.
safari_network_details read-only
Get headers and timing for captured requests.
safari_clear_network destructive
Clear captured requests.
safari_mock_route writes
Mock network responses and intercept fetch or XHR.
safari_clear_mocks destructive
Remove all network mocks.
safari_start_console writes
Start capturing console messages.
safari_get_console read-only
Get captured console messages.
safari_clear_console destructive
Clear console messages.
safari_console_filter read-only
Filter console messages by level.
safari_performance_metrics read-only
Get navigation timing, Web Vitals, and memory metrics.
safari_throttle_network writes
Simulate slow networks or offline mode.
safari_extract_tables read-only
Extract tables as structured JSON.
safari_extract_meta read-only
Extract OG, Twitter, JSON-LD, and canonical metadata.
safari_extract_images read-only
Extract images with dimensions and loading information.
safari_extract_links read-only
Extract links with rel, external, and nofollow information.
safari_override_geolocation writes
Override browser geolocation.
safari_list_indexed_dbs read-only
List IndexedDB databases.
safari_get_indexed_db read-only
Read IndexedDB records.
safari_css_coverage read-only
Find unused CSS rules.
safari_analyze_page read-only
Analyze the full page in one call.
safari_doctor read-only
Diagnose the macOS permission and daemon chain.
safari_reload_extension writes
Hot-reload the Safari MCP Bridge extension.
safari_run_script writes
Run multiple actions in one call.
safari_native_click writes
Send an OS-level mouse click.
safari_native_hover writes
Send an OS-level cursor hover.
safari_native_type writes
Insert text through the real paste pipeline.
safari_native_keyboard writes
Send OS-level keypresses to Safari.
safari_inspect_viewport read-only
Validate the iOS Safari viewport meta tag.
safari_safe_area_insets read-only
Read safe-area insets and viewport-fit usage.
safari_check_pwa read-only
Audit iOS Add to Home Screen and PWA readiness.
safari_webkit_compat read-only
Check Safari WebKit compatibility with CSS.supports.

Use cases

Automating browsing and page reading
Acting on already authenticated Gmail, GitHub, Slack, and other websites
Filling React, Vue, and Angular forms and code editors
Capturing screenshots, exporting PDFs, and extracting tables or metadata
Testing network behavior, console output, storage, performance, and WebKit compatibility

Supported clients

Claude Code
Claude Desktop
Cursor
WindsurfPartial support
VS CodePartial support
ClinePartial support
ContinuePartial support
GoosePartial support
LM StudioPartial support
ZedPartial support

Listed from the project's documentation, not tested by this site.

Overview

Safari MCP is a macOS Safari browser-automation MCP server with 97 tools delivered through AppleScript and an optional Safari extension. It uses native WebKit, reuses the current Safari login state, cookies, and sessions, and can operate in the background. The Node.js npm package runs over stdio.

Similar servers

Source revision 2712d78ffbee Data synced 2026-10-19 Read the FMRS scoring method