productivity

safari-mcp

achiya-automation

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

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

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 66 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.8 out of 5—verify behavior in your own environment before production use.

Use Cases

Extended AI Capabilities

Add new capabilities to Claude beyond text generation

Example

Access external data sources, execute code, interact with tools and services

Transform Claude from chatbot to action-taking agent

Context Enhancement

Provide Claude with access to relevant context and data

Example

Load project documentation, access knowledge bases, query databases

Get more accurate, context-aware responses

Workflow Automation

Automate multi-step workflows combining AI and external tools

Example

Research → Summarize → Create document → Send notification

Complete complex tasks end-to-end without manual steps

Implementation Guide

Prerequisites

  • Claude Desktop 0.7.0+ or Cursor IDE with MCP support
  • Basic understanding of MCP architecture and capabilities
  • Access credentials for integrated services (if required)
  • Willingness to experiment and iterate on configuration

Time Estimate

15-60 minutes depending on server complexity

Installation Steps

  1. 1.Install MCP server: npm install -g [package-name] or via GitHub
  2. 2.Add server configuration to ~/.claude/mcp.json
  3. 3.Provide required credentials and configuration
  4. 4.Restart Claude Desktop to load new server
  5. 5.Test basic functionality with simple prompts
  6. 6.Explore capabilities and experiment with use cases
  7. 7.Document successful patterns for reuse

Troubleshooting

  • MCP server not loading: Check config syntax, verify installation
  • Connection errors: Check network, firewall, credentials
  • Feature not working: Read server docs, check required parameters
  • Performance issues: Monitor resource usage, check for network latency
  • Conflicts with other servers: Check port assignments, namespace collisions

Best Practices

✓ Do

  • +Read server documentation thoroughly before setup
  • +Start with simple use cases to validate functionality
  • +Test in non-production environment first
  • +Monitor resource usage and performance
  • +Keep servers updated for bug fixes and new features
  • +Document configuration for team members
  • +Use environment variables for sensitive configuration

✗ Don't

  • Don't grant overly permissive access to MCP servers
  • Don't skip reading security considerations in docs
  • Don't expose sensitive data without proper controls
  • Don't run untrusted MCP servers without code review
  • Don't ignore error messages—investigate root cause

💡 Pro Tips

  • Combine multiple MCP servers for powerful workflows
  • Create custom MCP servers for your specific needs
  • Share successful configurations with team
  • Use MCP inspector for debugging
  • Join MCP community for tips and troubleshooting

Technical Details

Architecture

Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.

Protocols

  • Model Context Protocol (MCP)
  • JSON-RPC 2.0
  • stdio or HTTP transport

Compatibility

  • Claude Desktop
  • Cursor IDE
  • Custom MCP clients

When to Use This

✓ Use When

Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.

✗ Avoid When

Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.

Integration

  • Tool composition: Chain multiple MCP tools in workflows
  • Context augmentation: Provide AI with relevant external data
  • Action delegation: Let AI execute tasks on external systems
  • Bidirectional sync: Keep AI context and external systems in sync

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.

List & Promote Your MCP Server

Share your MCP server with the developer community

GET_STARTED →
MCP server reviews

Ratings

4.866 reviews
  • Ganesh Mohane· Dec 24, 2024

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

  • Fatima Dixit· Dec 24, 2024

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

  • Hiroshi Verma· Dec 4, 2024

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

  • Chen Anderson· Nov 27, 2024

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

  • Yusuf Sanchez· Nov 23, 2024

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

  • Tariq Gill· Nov 19, 2024

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

  • Rahul Santra· Nov 15, 2024

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

  • Fatima Kapoor· Nov 15, 2024

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

  • Liam Malhotra· Nov 15, 2024

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

  • Fatima Gill· Nov 3, 2024

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

showing 1-10 of 66

1 / 7