# safari-mcp

An MCP server that lets your AI agent drive the real Safari on macOS: 98 tools, no Chrome, no Playwright, no headless.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 224
- Author: achiya-automation
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/achiya-automation/safari-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/safari-mcp

## What it does

The server talks to Safari over Apple Events and runs native WebKit commands. Your agent opens tabs, clicks, fills forms, takes screenshots, reads network traffic and storage — inside the browser you are already logged into. Cookies and sessions stay yours, and Safari keeps running in the background without stealing the window.

There are 98 tools behind a single persistent `osascript` process, so a command lands in roughly 5 ms. No Puppeteer, Playwright or WebDriver in the dependency tree. Form filling on React, Vue, Angular and Svelte goes through native setters, which is why framework inputs actually receive the value.

Install is one command, `npx safari-mcp`, but two Safari settings have to be on first: “Show features for web developers” under Advanced and “Allow JavaScript from Apple Events” under Developer. Without the second one the server cannot push commands into the page. macOS and Node.js 20+ are required.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add safari-mcp -- npx -y safari-mcp
```

### Codex

**Platform CLI**
```bash
codex mcp add safari-mcp -- npx -y safari-mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "safari-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "safari-mcp"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "safari-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "safari-mcp"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add safari-mcp npx -y safari-mcp
```

## When to use it
- walk a logged-in dashboard and pull data without signing in again
- fill a React form and confirm the submit went through
- capture a screenshot after a chain of clicks
- inspect network requests and grab a specific response
- check whether elements are reachable via the accessibility tree

## Example prompts
- Open my GitHub tab in Safari and list the open pull requests
- Fill the order form on the current page and screenshot the result
- Check the network requests on this tab and show me which responses returned 404

## Similar
- [cli-anything-safari](https://affpapa.org/en/nevibecode/skills/cli-anything-safari.md) — skill · 483 installs
- [use-tinyfish](https://affpapa.org/en/nevibecode/skills/use-tinyfish.md) — skill · 3400 installs
- [autobrowse](https://affpapa.org/en/nevibecode/skills/autobrowse.md) — skill · 2800 installs
- [qiaomu-opencli-browser](https://affpapa.org/en/nevibecode/skills/qiaomu-opencli-browser.md) — skill · 1100 installs
- [web-access-claude-skill](https://affpapa.org/en/nevibecode/skills/web-access-claude-skill.md) — skill · 965 installs
- [pinchtab](https://affpapa.org/en/nevibecode/skills/pinchtab.md) — skill · 892 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
