Skip to main content
Glama
README.md
<div align="center">

# Daylight

**See and stop your AI agent in Safari.**

<a href="media/demo.mp4"><img src="media/demo.gif" width="800" alt="Daylight demo: a blue arrow fills a settings form in Safari while a status pill shows each step and the agent's reason. A click on Delete workspace turns the arrow red and waits; the person presses Stop and it never happens. Resume pressed on the page brings a macOS dialog, and the agent goes on only after Resume is chosen there."></a>

<sub>25-second demo (<a href="media/demo.mp4">MP4</a> with an AI voiceover; the GIF is silent), recorded on <a href="demo/index.html">demo/index.html</a>, a made-up settings page, with the risky-click wait set to 1.6 s.</sub>

<a href="https://github.com/mdandcoder/daylight-mcp/releases/latest/download/daylight.mcpb"><img src="https://img.shields.io/badge/Claude_Desktop-Download-1d1d1f?style=flat-square" alt="Download for Claude Desktop"></a> <a href="https://cursor.com/install-mcp?name=daylight&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImRheWxpZ2h0LW1jcCJdfQ%3D%3D"><img src="https://img.shields.io/badge/Cursor-Add_to_Cursor-1d1d1f?style=flat-square" alt="Add to Cursor"></a> <a href="https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522daylight%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522daylight-mcp%2522%255D%257D"><img src="https://img.shields.io/badge/VS_Code-Install-1d1d1f?style=flat-square" alt="Install in VS Code"></a>

<sub>One click adds Daylight to your app. Safari needs <a href="#set-up-safari-once">two settings</a> turned on once.</sub>

[Install](#install) · [Safety notes](#safety-notes) · [Settings](#settings) · [All 98 Tools](#tools-98) · [How it works](#how-it-works) · [Changelog](CHANGELOG.md)

</div>

Daylight is an MCP server that lets an AI agent use your own Safari on macOS, signed in as you, and shows you every step on the page. Before each click, field or key press, an arrow glides to the target and a status pill says what the agent is doing and why. A Stop button, in the page and in the menu bar, holds the agent until you press Resume.

Daylight is a fork of [safari-mcp](https://github.com/achiya-automation/safari-mcp) and keeps all 98 tools of safari-mcp 2.24.2. It works with any MCP client that can start a local (stdio) server.

## What you see

- **An arrow on every target.** Before each click, field or key press, a blue arrow glides there with a label such as "Click: Save changes".
- **A status pill.** It shows the agent's name, the numbered step and the reason the agent gave (`why`), then ✓ or ✗.
- **Risky clicks wait.** A Send, Pay or Delete style click turns the arrow red and waits half a second, while Stop still works.
- **Stop holds everything.** Press Stop in the pill, Esc, or **■ Stop agent** in the menu bar. Every later page action is held until you resume.
- **Resume is a deliberate step.** Choose **▶ Resume agent** in the menu bar item's menu, or press Resume in the pill: when the agent next acts, a macOS dialog asks you to confirm (its default is "Keep stopped"). A Resume pressed before the server has read your Stop, such as a second click made to be sure, needs the dialog too.
- **Out of the way.** The overlay stays out of the page's text, snapshots, screenshots and clicks. Secret fields show only their length.

<p align="center"><img src="media/poster.png" width="800" alt="The pill reads: Agent, Click: Delete workspace, may be irreversible, to clean up, next to a Stop button with the pointer on it. A red arrow on the Delete workspace button, labelled ⚠ Click: Delete workspace, waits before it clicks."></p>

## Safety notes

- **Daylight drives your real, logged-in Safari**, with your cookies and extensions. The agent can do anything you can do on the sites you are signed into, including sending, buying and deleting.
- **Stop holds the next action.** It cannot undo an action already taken.
- **Risky-click detection is a heuristic.** It looks for English words, such as send, pay and delete, in the name of the button. It misses buttons in other languages: add their words with [`DAYLIGHT_RISKY_WORDS`](#settings).
- **`DAYLIGHT_VISUAL=0` removes the Stop hold**, together with the overlay and the risky-click wait.
- **Never set `DAYLIGHT_TEST_RESUME` or `DAYLIGHT_TEST_UI`.** They exist for tests. Both give page code a handle on the overlay, and the first lets it release a Stop.
- **The HTTP daemon has no authentication.** With `SAFARI_MCP_HTTP=1`, any program on your Mac that can reach its loopback port can use every tool.
- **The page can read what the overlay is told**, such as the agent's `why`, the selectors and what is typed into an ordinary field. Agents must never put passwords, codes, card numbers or other private data in `why`.
- **Not a sandbox.** The overlay and its Stop button run inside the page, beside the page's own scripts, and a hostile page can hide, break or fake them. Such a page's fake Resume click brings the dialog, but it can still make a Stop the server has not read go unseen. On a page you do not trust, use the menu bar Stop.

[SECURITY.md](SECURITY.md#what-a-hostile-page-can-still-do) lists exactly what a page can and cannot do.

## Install

### Requirements

- macOS 13 or later, with Safari. Daylight runs only on macOS.
- Node.js 20 or later. The Claude Desktop download needs none: it runs on the Node.js that comes with Claude Desktop.

### Set up Safari once

1. Safari → Settings → Advanced: turn on **Show features for web developers**.
2. Safari → Settings → Developer: turn on **Allow JavaScript from Apple Events**.

Both are required: Daylight drives pages with JavaScript sent through Apple Events, and it has no fallback without it.

### Add Daylight to your MCP client

**Claude Desktop**

[Download daylight.mcpb](https://github.com/mdandcoder/daylight-mcp/releases/latest/download/daylight.mcpb) and open it. Claude Desktop shows an install dialog: choose **Install**.

**Claude Code**

```bash
claude mcp add daylight -- npx -y daylight-mcp
```

This adds it to the current project. Put `--scope user` before `--` to use it in every project.

**Codex CLI**

```bash
codex mcp add daylight -- npx -y daylight-mcp
```

Or add it to `~/.codex/config.toml`:

```toml
[mcp_servers.daylight]
command = "npx"
args = ["-y", "daylight-mcp"]
startup_timeout_sec = 30  # the first start downloads the package
```

**Cursor**

[Add to Cursor](https://cursor.com/install-mcp?name=daylight&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImRheWxpZ2h0LW1jcCJdfQ%3D%3D) in one click. Or add it to `~/.cursor/mcp.json` (every project) or `.cursor/mcp.json` (one project):

```json
{
  "mcpServers": {
    "daylight": {
      "command": "npx",
      "args": ["-y", "daylight-mcp"]
    }
  }
}
```

**VS Code** (GitHub Copilot)

[Install in VS Code](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522daylight%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522daylight-mcp%2522%255D%257D) in one click. Or run **MCP: Add Server** from the Command Palette, choose **Command (stdio)**, enter `npx -y daylight-mcp` and name it `daylight`. Choose **Global > Copilot Global** to use it in every workspace. Or write it by hand in `~/.copilot/mcp-config.json` (every workspace) or in `.mcp.json` at the workspace root:

```json
{
  "mcpServers": {
    "daylight": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "daylight-mcp"],
      "tools": ["*"]
    }
  }
}
```

The older editor-managed `.vscode/mcp.json` uses a top-level `"servers"` key in place of `"mcpServers"`, and no `"tools"`.

**Other clients**: run `npx` with the arguments `-y daylight-mcp`.

**From a clone**: run `npm install` in the repository, then use `node` with the absolute path of its `index.js` (for example `node /absolute/path/to/daylight/index.js`) in place of `npx -y daylight-mcp`.

### First run

The first time Daylight acts, macOS asks whether the app your MCP client runs in (Terminal, your editor or the agent app) may control Safari. Choose **Allow**. If you chose Don't Allow, turn it on in System Settings → Privacy & Security → Automation.

Some tools need two more permissions, also for that app:

| Permission | Where | Needed for |
|---|---|---|
| Accessibility | System Settings → Privacy & Security → Accessibility (named Device Control and Data Access on macOS 27) | `safari_native_click`, `safari_native_hover`, `safari_native_type`, `safari_native_keyboard`, `safari_save_pdf` |
| Screen Recording | System Settings → Privacy & Security → Screen & System Audio Recording | `safari_screenshot`, `safari_screenshot_element`, `safari_save_pdf` |

macOS checks these permissions, and Automation, for the app your MCP client runs in, which started node, which started Daylight's helper: grant them to that app, never to `daylight-helper`. When the server runs under launchd, with no app above it, grant them to node, the program the job runs, and if a screenshot or native input still fails, to `daylight-helper` too. Ask the agent to run the `safari_doctor` tool: it shows which check fails and names the program to grant.

### No Safari extension

Daylight does not use safari-mcp's Safari extension, and you don't need to install it. Every page action goes through AppleScript and Daylight's native helper, the path the overlay and its Stop check take too. The extension could act on pages the overlay could not reach, so Daylight keeps it switched off, and there is nothing to pair. You go without what only the extension could do: closed shadow roots, cross-origin frames (`safari_list_frames` and `safari_evaluate`'s `frame` are refused), some strict-CSP pages, deeper framework state, loading detection, tab receipts (a tool call that passes one is refused) and named Safari profiles. With `SAFARI_PROFILE` set, Daylight exits at startup and says why. Its tabs open in the front Safari window.

## Settings

Set these environment variables in your MCP client's configuration.

| Variable | Default | What it does |
|---|---|---|
| `DAYLIGHT_AGENT_NAME` | unset (the pill shows "Agent") | Name shown in the status pill, the menu bar item and its menu, and the Resume dialog. Cut to 24 characters. Give each server its own, to tell their menu bar items apart. |
| `DAYLIGHT_RISK_MS` | `500` | Extra wait in milliseconds before a risky click, while Stop still works. Clamped to 0–10000; a value that is not a number gives 500. |
| `DAYLIGHT_RISKY_WORDS` | unset (English built-ins only) | Extra words or phrases that make a click risky, separated by `\|` or `,`. They match as whole words, ignoring case and accents. At most 50, each cut to 40 characters. |
| `DAYLIGHT_SECRET_WORDS` | unset (English built-ins only) | Extra words that mark a secret field, separated by `\|` or `,`. What is typed into such a field reaches the page only as its length. At most 50, each cut to 40 characters. |
| `DAYLIGHT_VISUAL` | on | `0` turns the overlay off entirely, and with it the Stop hold (the menu bar item too) and the risky-click wait. New tabs then stay in the background. |
| `DAYLIGHT_SHOW_TAB` | on | `0` keeps the agent's new tab in the background. By default `safari_new_tab` makes it the current tab of its window, without activating Safari. |
| `DAYLIGHT_NO_HELPER` | off | `1` never starts the native helper. Scripts then run through a plain `osascript` process (slower), with no native tools and no menu bar item. See [Settings that weaken Stop](SECURITY.md#settings-that-weaken-stop). |
| `DAYLIGHT_SILENT_INSTALL` | off | `1` (or a CI environment) suppresses the postinstall message. The helper is still re-signed. |

For buttons in German, for example:

```
DAYLIGHT_RISKY_WORDS="senden|kaufen|bezahlen|bestellen|löschen|entfernen|bestätigen|veröffentlichen|kündigen|überweisen"
```

To pass a variable:

- **Claude Code** and **Codex CLI**: one `--env KEY=value` per variable, before `--`, as in `claude mcp add daylight --env DAYLIGHT_AGENT_NAME=Claude -- npx -y daylight-mcp`. Codex also reads a `[mcp_servers.daylight.env]` table in `config.toml`, with lines such as `DAYLIGHT_AGENT_NAME = "Codex"`.
- **Cursor and VS Code**: an `"env"` object in the server entry, such as `"env": { "DAYLIGHT_AGENT_NAME": "Cursor" }`. Values are strings.

These safari-mcp settings still work in Daylight:

| Variable | Default | What it does |
|---|---|---|
| `SAFARI_MCP_HTTP` | off | `1` runs one shared MCP HTTP daemon on loopback instead of one process per client. Start it with `SAFARI_MCP_HTTP=1 npx -y daylight-mcp` and point each client at `http://127.0.0.1:9225/mcp`. Each session has its own Stop; see [HTTP daemon mode](SECURITY.md#http-daemon-mode) for the menu bar item. |
| `SAFARI_MCP_HTTP_PORT` | `9225` | Port of that daemon. |
| `SAFARI_MCP_SESSION_IDLE_MIN` | `0` (never) | Ends an HTTP session after this many idle minutes. |
| `SAFARI_MCP_ALLOW_USER_TABS` | off | `1` lets `safari_switch_tab` adopt a tab you opened yourself. |
| `MCP_MAX_TABS` | `6` | Tabs one session may keep open. Opening one more closes its oldest. |
| `SAFARI_MCP_RAISE_ON_NAVIGATE` | off | `1` lets navigation bring Safari to the front. |
| `SAFARI_MCP_TOOLS` | all | `core`, or a comma-separated list of tool names to register. |
| `SAFARI_MCP_SCREENSHOT_MAX_WIDTH` | unset | Downscales screenshots to this width in pixels. |
| `MCP_MEMORY_CHECK_MS` | `60000` | Interval of the WebKit memory check. |
| `MCP_WEBKIT_LIMIT_MB` | `3000` | WebKit memory above which the oldest agent tab is closed. |
| `SAFARI_MCP_QUIET` | off | `1` suppresses the startup banner on stderr. |
| `SAFARI_MCP_SILENT_INSTALL` | off | `1` works like `DAYLIGHT_SILENT_INSTALL`. |

[safari-mcp's README](https://github.com/achiya-automation/safari-mcp/blob/v2.24.2/README.md#environment-variables) describes them in more detail. The bridge ports (`SAFARI_MCP_BRIDGE_PORT`, `SAFARI_MCP_BRIDGE_WS_PORT`) and the extension and profile settings (`SAFARI_MCP_WS_ORIGINS`, `SAFARI_MCP_KEEPALIVE_TAB`, `SAFARI_MCP_NO_AUTO_UPGRADE`, `SAFARI_MCP_THERMAL_*`, `SAFARI_MCP_OPEN_WINDOW_CMD`) have no effect. `MCP_DEBUG` logs wrapped scripts to stderr.

## Tools (98)

All 98 have the same names and arguments as in safari-mcp 2.24.2, whose [README](https://github.com/achiya-automation/safari-mcp/blob/v2.24.2/README.md#tools-98) documents them in full. The tools that click, hover, type, select, press keys, scroll to an element, upload or drag show the arrow and take an optional `why`, a short purpose shown in the pill. Every tool except those that only read is held by Stop. [Which tools Stop holds](SECURITY.md#which-tools-stop-holds) lists them all.

<details>
<summary><b>The full tool list, by category</b></summary>

### 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 (6)
| Tool | Description |
|------|-------------|
| `safari_click` | Click by CSS selector, visible text, ref, 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 |
| `safari_click_and_read` | Click, then return the updated page in the same call |

### Form Input (11)
| 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 |
| `safari_react_select_set` | Set a react-select v5 value via React fiber, bypassing the menu UI |
| `safari_react_select_list_options` | List a react-select v5 dropdown's options without opening it |
| `safari_replace_editor` | Replace all content in a code editor (Monaco, CodeMirror, Ace, ProseMirror) |
| `safari_verify_state` | Verify an editor's framework-level state matches what is expected, to catch stale DOM before Submit |

### 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 (5)
| Tool | Description |
|------|-------------|
| `safari_list_tabs` | List all tabs (index, title, URL) |
| `safari_new_tab` | Open a new tab in the front Safari window, shown there without activating Safari (unless `DAYLIGHT_SHOW_TAB=0` or `DAYLIGHT_VISUAL=0`) |
| `safari_close_tab` | Close tab |
| `safari_switch_tab` | Act in another of this session's tabs, by index, without bringing it forward |
| `safari_wait_for_new_tab` | Wait for a new tab (e.g. OAuth popup) and switch to it |

### Wait (2)
| Tool | Description |
|------|-------------|
| `safari_wait_for` | Wait for element, text, or URL change |
| `safari_wait` | Wait for specified milliseconds |

### JavaScript (3)
| Tool | Description |
|------|-------------|
| `safari_evaluate` | Execute arbitrary JavaScript, return result |
| `safari_eval_file` | Execute JavaScript read from a file path (avoids huge inline scripts) |
| `safari_list_frames` | safari-mcp's frame list, which needs its extension; in Daylight it only answers that it cannot list frames |

### 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 (2)
| Tool | Description |
|------|-------------|
| `safari_accessibility_snapshot` | Full a11y tree: roles, ARIA, focusable elements |
| `safari_snapshot` | Accessibility tree with ref IDs for every interactive element, the preferred way to see page state |

### 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 (clipboard untouched) |

### 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 (11)
| 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 | Description |
|------|-------------|
| `safari_clipboard_read` | Read clipboard text |
| `safari_clipboard_write` | Write text to clipboard |

### Network (6)
| Tool | Description |
|------|-------------|
| `safari_network` | Quick network requests via Performance API |
| `safari_start_network_capture` | Start detailed capture (fetch + XHR) |
| `safari_network_details` | Get captured requests with headers/timing |
| `safari_clear_network` | Clear captured requests |
| `safari_mock_route` | Mock network responses (intercept fetch/XHR) |
| `safari_clear_mocks` | Remove all network mocks |

### Console (4)
| Tool | Description |
|------|-------------|
| `safari_start_console` | Start capturing console messages |
| `safari_get_console` | Get all captured messages |
| `safari_clear_console` | Clear captured messages |
| `safari_console_filter` | Filter by level (log/warn/error) |

### Performance (2)
| Tool | Description |
|------|-------------|
| `safari_performance_metrics` | Navigation timing, Web Vitals, memory |
| `safari_throttle_network` | Simulate slow-3g/fast-3g/4g/offline |

### Data Extraction (4)
| Tool | Description |
|------|-------------|
| `safari_extract_tables` | Tables as structured JSON |
| `safari_extract_meta` | All meta: OG, Twitter, JSON-LD, canonical |
| `safari_extract_images` | Images with dimensions and loading info |
| `safari_extract_links` | Links with rel, external/nofollow detection |

### Advanced (7)
| Tool | Description |
|------|-------------|
| `safari_override_geolocation` | Override browser geolocation |
| `safari_list_indexed_dbs` | List IndexedDB databases |
| `safari_get_indexed_db` | Read IndexedDB records |
| `safari_css_coverage` | Find unused CSS rules |
| `safari_analyze_page` | Full page analysis in one call |
| `safari_doctor` | Diagnose the macOS permission and helper chain (Apple Events, Accessibility, Screen Recording, codesign) with a fix for each failure |
| `safari_reload_extension` | safari-mcp's extension reload; in Daylight it only reports that the extension is not in use |

### Automation (1)
| Tool | Description |
|------|-------------|
| `safari_run_script` | Run multiple actions in a single call (batch) |

### Native Input (4)
| Tool | Description |
|------|-------------|
| `safari_native_click` | Trusted click (`isTrusted: true`) through macOS Accessibility, for pages that ignore synthetic clicks |
| `safari_native_hover` | OS-level cursor hover for real `:hover` / `mouseenter` (tooltips, hover menus) |
| `safari_native_type` | Real text input: fields through the accessibility tree, rich editors as key events, clipboard untouched |
| `safari_native_keyboard` | OS-level key press with modifiers, posted to Safari without activating it (the agent's window must be Safari's front window) |

### iOS & WebKit Validation (4)
| Tool | Description |
|------|-------------|
| `safari_inspect_viewport` | Validate the `<meta name=viewport>` tag for iOS Safari (device-width, zoom/WCAG, viewport-fit) |
| `safari_safe_area_insets` | Read live safe-area-inset values + viewport-fit / `env()` usage (notch / Dynamic Island) |
| `safari_check_pwa` | Audit iOS "Add to Home Screen" / PWA readiness (apple-touch-icon, manifest, theme-color, splash) |
| `safari_webkit_compat` | Check page CSS against this Safari via `CSS.supports()`: unsupported properties, missing `-webkit-` prefixes, known quirks |

</details>

## How it works

```
MCP client ──stdio──▶ daylight-mcp (Node.js)
                        │  visual-cursor.mjs: check Stop → draw the arrow → wait → check Stop → act → ✓ / ✗
                        ▼
                      daylight-helper (Swift), or osascript
                        │  Apple Events: do JavaScript, native input
                        ▼
                      the agent's tab in your Safari, with the overlay
```

For each tool call, Daylight runs JavaScript in the agent's Safari tab through AppleScript's `do JavaScript`, sent by a long-running Swift helper, `daylight-helper`, which also posts native input. The overlay, `visual-cursor.mjs`, takes the same path, in the order shown above; the arrow glides to its target in 80 to 260 ms.

Corner brackets lock onto a click target, a ring marks the click, a box marks a field, keys show as keycaps, and a thin blue frame marks the page. After ✓ or ✗ the pill shows "Thinking…".

The overlay lives in a closed shadow root in the page's top layer, above modal dialogs. It is hidden from assistive technology and takes no clicks except on its Stop button. It works with a strict Content Security Policy or Trusted Types, on right-to-left pages and inside shadow roots, but it runs in the page's own JavaScript world (see [Safety notes](#safety-notes)).

Stop is kept by the page and by the server, which refuses every later page action once it has read a Stop. The menu bar item is a second helper process, `daylight-helper --stop-button`. It ends with the server, and its Stop with it.

Everything stays on your Mac: no telemetry, no update check, and no network connections of Daylight's own except on loopback, for the optional HTTP daemon.

## Limitations

- macOS 13 or later and Safari only. Safari Technology Preview is a separate app and is not supported.
- Keep the agent's Safari window visible to watch it work. The overlay draws inside the page, and Safari pauses animation in hidden tabs and windows. `safari_switch_tab` does not bring a tab to the front of its window, so after a switch the agent may work in a tab you cannot see. Use the menu bar Stop there.
- Each running Daylight server has its own menu bar item, for that server's agents (in HTTP daemon mode, all of its sessions).
- Native keys, and typing into rich editors, need the agent's window to be Safari's front window; otherwise they are refused, never sent somewhere else.

## Development

```bash
npm install                  # dev dependencies; also re-signs the helper
npm test                     # unit tests
npm run lint                 # ESLint (CI fails only on no-undef)
sh e2e/run.sh                # end-to-end tests in your real Safari, see e2e/README.md
sh scripts/build-helper.sh   # rebuild daylight-helper after changing daylight-helper.swift
```

Rebuild the committed universal `daylight-helper` only with `scripts/build-helper.sh`: a bare `swiftc` build runs only on Macs like the one that built it. More in [CONTRIBUTING.md](CONTRIBUTING.md).

## Credits

Daylight is a fork of [safari-mcp](https://github.com/achiya-automation/safari-mcp) by Achiya Cohen (MIT), based on safari-mcp 2.24.2. The tools, the AppleScript engine, the tab-safety model and the native helper come from safari-mcp. Daylight adds the overlay, Stop and Resume, and the changes listed in [CHANGELOG.md](CHANGELOG.md), which also keeps safari-mcp's own history.

## License

MIT. See [LICENSE](LICENSE), which keeps safari-mcp's copyright notice next to Daylight's.

---

Safari is a trademark of Apple Inc., registered in the U.S. and other countries and regions. macOS, AppleScript and Xcode are trademarks of Apple Inc. Daylight is not affiliated with or endorsed by Apple.

TDQS

B3.3/5.0

Scored across 98 tools

Disambiguation3/5

Descriptions do a lot of work explaining when to prefer snapshot over screenshot, native_click over click, fill over type_text, etc., but the sheer volume creates real overlap clusters: safari_read_page / safari_snapshot / safari_screenshot / safari_get_source / safari_analyze_page, and the many click variants (click, native_click, click_and_wait, click_and_read, double_click) require reading long prose to distinguish. An agent can usually pick correctly, but only by parsing rationale text rather than tool names, and several tools (safari_list_frames, safari_reload_extension) exist only to report they do nothing, which confuses selection.

Naming Consistency4/5

Nearly everything is snake_case with a uniform safari_ prefix, and most names are verb_noun (safari_set_cookie, safari_extract_tables, safari_query_all). Deviations exist: noun-only getters like safari_local_storage, safari_session_storage, safari_network, and setup/teardown pairs that don't follow the get/set symmetry (safari_start_console vs safari_get_console). Minor, but noticeable across 98 tools.

Tool Count2/5

98 tools is far past a workable surface for one agent to reason over, and the set includes near-duplicate convenience wrappers (click_and_read, click_and_wait, navigate_and_read, fill_and_submit) plus two tools whose documented behavior is to say they are unavailable. The domain is genuinely large (native input, emulation, storage, network, a11y, CSS audits), so not all of it is bloat, but the count is still a clear mismatch.

Completeness4/5

Coverage of the browser-automation lifecycle is unusually deep: navigation, tabs, snapshots, typing, uploads, drag, dialogs, storage import/export, network mocking/capture, emulation, and diagnostics. Notable gaps remain: no working iframe targeting (safari_list_frames is a documented no-op and there is no frame switch), no download handling, and no cookie/storage listing across origins.

Maintenance

ActivityNo data
ResponsivenessNo recent community issues