Skip to main content
Glama

safari-mcp

MCP server that lets Claude (or any MCP client) drive your real Safari (logged-in tabs included) via AppleScript.

Tools: tabs, navigate, select_tab, close_tab, read_page, click, type_text, scroll, javascript, screenshot. read_page numbers interactive elements; pass the number as ref to click/type_text.

Setup (once)

  1. Safari > Settings > Advanced > "Show features for web developers".

  2. Safari > Develop > "Allow JavaScript from Apple Events".

  3. System Settings > Privacy & Security > Screen Recording: allow the terminal running Claude Code (for screenshot).

  4. First call triggers an Automation prompt ("control Safari"): allow.

Related MCP server: claudeForSafari

Install

macOS only. Needs uv.

Claude Code plugin (runs the locked uv project shipped in the plugin):

/plugin marketplace add stefanogarzon/safari-mcp
/plugin install safari-mcp@safari-mcp

Claude Code without the plugin:

claude mcp add -s user safari -- uvx safari-mcp

Other MCP clients (Claude Desktop, Cursor, VS Code):

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

Develop

uv sync
uv run pytest      # tests
uv run ruff check . && uv run pyright src

Release

Bump version in pyproject.toml, server.json and .claude-plugin/plugin.json, then push a tag vX.Y.Z. The Release workflow tests, publishes to PyPI (trusted publishing) and to the MCP registry.

Limits

Security: page text goes back to the model, and javascript runs arbitrary code in your logged-in tabs. A malicious page can try prompt injection; review actions on sensitive sites.

Clicks and typing are synthetic DOM events (rare sites ignore them). No console/network capture. For automated tests of our own sites use Playwright WebKit instead.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables visual web access and browser automation through Safari, with tools for navigation, screenshots, element interaction, and tab management.
      17
      19 npm
      BSD 3-Clause
    • A
      license
      A
      quality
      B
      maintenance
      Safari Web Extension + Node.js MCP bridge giving Claude Desktop full control over Safari — navigate, read pages, click elements, fill forms, and manage tabs. No Playwright or WebDriver dependency.
      4
      13
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server that drives the user's real signed-in Chrome on macOS via AppleScript (Apple Events). 32 tools covering tab/window control, navigation, DOM extraction, form interaction, and arbitrary JS execution. Same engine as the familiar Claude Code skill in the repository.
      1
      MIT