Daylight
Enables AI agents to control the user's Safari browser on macOS, including navigation, clicking, typing, key presses, screenshots, and tab management, with a visual overlay and Stop/Resume safety controls.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Daylight Book the cheapest flight to NYC in Safari and let me confirm before paying."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Daylight
See and stop your AI agent in Safari.
25-second demo (MP4 with an AI voiceover; the GIF is silent), recorded on demo/index.html, a made-up settings page, with the risky-click wait set to 1.6 s.
One click adds Daylight to your app. Safari needs two settings turned on once.
Install · Safety notes · Settings · All 98 Tools · How it works · Changelog
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 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.
Related MCP server: byob
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.DAYLIGHT_VISUAL=0removes the Stop hold, together with the overlay and the risky-click wait.Never set
DAYLIGHT_TEST_RESUMEorDAYLIGHT_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 inwhy.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 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
Safari → Settings → Advanced: turn on Show features for web developers.
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 and open it. Claude Desktop shows an install dialog: choose Install.
Claude Code
claude mcp add daylight -- npx -y daylight-mcpThis adds it to the current project. Put --scope user before -- to use it in every project.
Codex CLI
codex mcp add daylight -- npx -y daylight-mcpOr add it to ~/.codex/config.toml:
[mcp_servers.daylight]
command = "npx"
args = ["-y", "daylight-mcp"]
startup_timeout_sec = 30 # the first start downloads the packageCursor
Add to Cursor in one click. Or add it to ~/.cursor/mcp.json (every project) or .cursor/mcp.json (one project):
{
"mcpServers": {
"daylight": {
"command": "npx",
"args": ["-y", "daylight-mcp"]
}
}
}VS Code (GitHub Copilot)
Install in VS Code 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:
{
"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) |
|
Screen Recording | System Settings → Privacy & Security → Screen & System Audio Recording |
|
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 |
| 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. |
|
| 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. |
| unset (English built-ins only) | Extra words or phrases that make a click risky, separated by |
| unset (English built-ins only) | Extra words that mark a secret field, separated by |
| on |
|
| on |
|
| off |
|
| off |
|
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=valueper variable, before--, as inclaude mcp add daylight --env DAYLIGHT_AGENT_NAME=Claude -- npx -y daylight-mcp. Codex also reads a[mcp_servers.daylight.env]table inconfig.toml, with lines such asDAYLIGHT_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 |
| off |
|
|
| Port of that daemon. |
|
| Ends an HTTP session after this many idle minutes. |
| off |
|
|
| Tabs one session may keep open. Opening one more closes its oldest. |
| off |
|
| all |
|
| unset | Downscales screenshots to this width in pixels. |
|
| Interval of the WebKit memory check. |
|
| WebKit memory above which the oldest agent tab is closed. |
| off |
|
| off |
|
safari-mcp's README 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 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 lists them all.
Navigation (4)
Tool | Description |
| Navigate to URL (auto HTTPS, wait for load) |
| Go back in history |
| Go forward in history |
| Reload page (optional hard reload) |
Page Reading (3)
Tool | Description |
| Get title, URL, and text content |
| Get full HTML source |
| Navigate + read in one call |
Click & Interaction (6)
Tool | Description |
| Click by CSS selector, visible text, ref, or coordinates |
| Double-click (select word, etc.) |
| Right-click (context menu) |
| Hover over element |
| Click + wait for navigation |
| Click, then return the updated page in the same call |
Form Input (11)
Tool | Description |
| Fill input (React/Vue/Angular compatible) |
| Clear input field |
| Select dropdown option |
| Batch fill multiple fields |
| Fill form + submit in one call |
| Type real keystrokes (JS-based, no System Events) |
| Press key with modifiers |
| Set a react-select v5 value via React fiber, bypassing the menu UI |
| List a react-select v5 dropdown's options without opening it |
| Replace all content in a code editor (Monaco, CodeMirror, Ace, ProseMirror) |
| Verify an editor's framework-level state matches what is expected, to catch stale DOM before Submit |
Screenshots & PDF (3)
Tool | Description |
| Screenshot as PNG (viewport or full page) |
| Screenshot a specific element |
| Export page as PDF |
Scroll (3)
Tool | Description |
| Scroll up/down by pixels |
| Scroll to exact position |
| Smooth scroll to element |
Tab Management (5)
Tool | Description |
| List all tabs (index, title, URL) |
| Open a new tab in the front Safari window, shown there without activating Safari (unless |
| Close tab |
| Act in another of this session's tabs, by index, without bringing it forward |
| Wait for a new tab (e.g. OAuth popup) and switch to it |
Wait (2)
Tool | Description |
| Wait for element, text, or URL change |
| Wait for specified milliseconds |
JavaScript (3)
Tool | Description |
| Execute arbitrary JavaScript, return result |
| Execute JavaScript read from a file path (avoids huge inline scripts) |
| safari-mcp's frame list, which needs its extension; in Daylight it only answers that it cannot list frames |
Element Inspection (4)
Tool | Description |
| Element details (tag, rect, attrs, visibility) |
| Find all matching elements |
| Computed CSS styles |
| Auto-detect all forms with field selectors |
Accessibility (2)
Tool | Description |
| Full a11y tree: roles, ARIA, focusable elements |
| Accessibility tree with ref IDs for every interactive element, the preferred way to see page state |
Drag & Drop (1)
Tool | Description |
| Drag between elements or coordinates |
File Operations (2)
Tool | Description |
| Upload file via JS DataTransfer (no file dialog) |
| Paste image into editor (clipboard untouched) |
Dialog & Window (2)
Tool | Description |
| Handle alert/confirm/prompt |
| Resize browser window |
Device Emulation (2)
Tool | Description |
| Emulate device (iPhone, iPad, Pixel, Galaxy) |
| Reset to desktop |
Cookies & Storage (11)
Tool | Description |
| Get all cookies |
| Set cookie with all options |
| Delete one or all cookies |
| Read localStorage |
| Write localStorage |
| Delete/clear localStorage |
| Read sessionStorage |
| Write sessionStorage |
| Delete/clear sessionStorage |
| Export all storage as JSON (backup/restore sessions) |
| Import storage state from JSON |
Clipboard (2)
Tool | Description |
| Read clipboard text |
| Write text to clipboard |
Network (6)
Tool | Description |
| Quick network requests via Performance API |
| Start detailed capture (fetch + XHR) |
| Get captured requests with headers/timing |
| Clear captured requests |
| Mock network responses (intercept fetch/XHR) |
| Remove all network mocks |
Console (4)
Tool | Description |
| Start capturing console messages |
| Get all captured messages |
| Clear captured messages |
| Filter by level (log/warn/error) |
Performance (2)
Tool | Description |
| Navigation timing, Web Vitals, memory |
| Simulate slow-3g/fast-3g/4g/offline |
Data Extraction (4)
Tool | Description |
| Tables as structured JSON |
| All meta: OG, Twitter, JSON-LD, canonical |
| Images with dimensions and loading info |
| Links with rel, external/nofollow detection |
Advanced (7)
Tool | Description |
| Override browser geolocation |
| List IndexedDB databases |
| Read IndexedDB records |
| Find unused CSS rules |
| Full page analysis in one call |
| Diagnose the macOS permission and helper chain (Apple Events, Accessibility, Screen Recording, codesign) with a fix for each failure |
| safari-mcp's extension reload; in Daylight it only reports that the extension is not in use |
Automation (1)
Tool | Description |
| Run multiple actions in a single call (batch) |
Native Input (4)
Tool | Description |
| Trusted click ( |
| OS-level cursor hover for real |
| Real text input: fields through the accessibility tree, rich editors as key events, clipboard untouched |
| 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 |
| Validate the |
| Read live safe-area-inset values + viewport-fit / |
| Audit iOS "Add to Home Screen" / PWA readiness (apple-touch-icon, manifest, theme-color, splash) |
| Check page CSS against this Safari via |
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 overlayFor 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).
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_tabdoes 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
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.swiftRebuild 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.
Credits
Daylight is a fork of 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, which also keeps safari-mcp's own history.
License
MIT. See 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.
Available Tools
98 toolssafari_accessibility_snapshotB
Get the accessibility tree of the page (roles, ARIA labels, focusable elements, form states). Essential for a11y auditing.
Inputs: receipt, maxDepth, selector.
safari_analyze_pageA
Full page analysis in ONE call: title, URL, meta tags, OG, headings, link stats, image stats, forms, and text preview. Perfect for SEO/audit.
Inputs: no named parameters.
safari_check_pwaA
Audit the page for iOS 'Add to Home Screen' / PWA readiness: apple-mobile-web-app-capable, apple-touch-icon (incl. 180x180), theme-color, status-bar style, web app manifest, splash screens. Returns a pass/total checklist.
Inputs: no named parameters.
safari_clear_consoleA
Clear all captured console messages
Inputs: no named parameters.
safari_clear_fieldC
Clear an input field
Inputs: selector (required), why, receipt.
safari_clear_mocksA
Remove all network route mocks (restore real network behavior)
Inputs: no named parameters.
safari_clear_networkA
Clear all captured network requests
Inputs: no named parameters.
safari_clickA
Click element. Use ref (from snapshot), selector, text, or x/y. Works on React/Airtable/virtual DOM apps via full PointerEvent+MouseEvent sequence + React Fiber fallback. Pure JS — never touches user's mouse. When using ref, always take a FRESH safari_snapshot first — refs expire after each new snapshot.
Inputs: x, y, ref, why, +3 more.
safari_click_and_readA
Click an element then return the updated page — saves 1 full round-trip vs separate click+read_page. Handles both React Router navigation and full page loads.
Inputs: x, y, why, text, +4 more.
safari_click_and_waitA
Click an element AND wait for the result (page load or element). Use instead of click + wait_for separately.
Inputs: why, text, timeout, waitFor, +1 more.
safari_clipboard_readA
Read the current clipboard content (text)
Inputs: no named parameters.
safari_clipboard_writeB
Write text to the system clipboard
Inputs: text (required).
safari_close_tabC
Close the current tab.
Inputs: url, receipt.
safari_console_filterA
Get console messages filtered by level (must call safari_start_console first)
Inputs: level (required).
safari_css_coverageA
Analyze CSS coverage: find unused CSS rules across all stylesheets. Shows coverage percentage per stylesheet.
Inputs: no named parameters.
safari_delete_cookiesA
Delete a specific cookie or all cookies for the current page
Inputs: all, name.
safari_delete_local_storageA
Delete a localStorage key, or clear all localStorage (omit key to clear all)
Inputs: key.
safari_delete_session_storageA
Delete a sessionStorage key, or clear all sessionStorage (omit key to clear all)
Inputs: key.
safari_detect_formsA
Auto-detect all forms on the page with their fields, types, selectors, and submit buttons. Great for automated form filling.
Inputs: no named parameters.
safari_doctorA
Diagnose the macOS permission + daemon chain in one shot: Safari running, Apple Events/Automation, native helper daemon, Accessibility (native clicks), Screen Recording, and the helper's codesign identity. Returns a pass/fail checklist with the exact System Settings fix per failure (grant them to the app your MCP client runs in, never to the helper; under launchd, to node, and to daylight-helper too if a check still fails), then one line saying that the extension bridge is off in Daylight. Run this FIRST when clicks/screenshots/startup 'don't work even with permissions granted'.
Inputs: no named parameters.
safari_double_clickB
Double-click an element by CSS selector or x/y coordinates (e.g. to select a word in text)
Inputs: x, y, why, receipt, +1 more.
safari_dragB
Drag an element to another element or position. Use CSS selectors or x/y coordinates.
Inputs: why, sourceX, sourceY, targetX, +3 more.
safari_emulateA
Emulate a mobile device: sizes the Safari window to the device's CSS viewport and overrides navigator.userAgent/platform/maxTouchPoints (iOS/iPadOS 27 values) in the current page — JavaScript only: the HTTP User-Agent header is unchanged and a reload or navigation clears it. Devices: iphone-18-pro, iphone-18-pro-max, iphone-air, iphone-17, iphone-17e, iphone-16, iphone-14, iphone-14-pro-max, ipad, ipad-air-11, ipad-air-13, ipad-pro-11, ipad-pro-13, ipad-pro, pixel-7, galaxy-s24. Or pass width/height (and userAgent).
Inputs: width, device, height, userAgent.
safari_eval_fileA
Execute JavaScript read from a FILE path (avoids passing huge scripts inline / manual copy). Same engine as safari_evaluate: AppleScript (the extension bridge is off in Daylight). Use to upload binary via a generated .js containing base64.
Inputs: path (required), receipt.
safari_evaluateA
Execute JavaScript in the current page (a returned Promise is awaited — fetch/timers work in background tabs; requestAnimationFrame never fires there). Runs through AppleScript (the extension bridge is off in Daylight), which works where CSP blocks injected scripts (e.g. Google Search Console, LinkedIn). For reading data, prefer safari_read_page or safari_snapshot. For interactions, prefer safari_click/fill with refs.
Inputs: script (required), frame, receipt.
safari_export_storageA
Export all storage state (cookies + localStorage + sessionStorage) as JSON — useful for saving and restoring login sessions
Inputs: no named parameters.
safari_extract_imagesA
Extract all images with src, alt, dimensions, loading strategy, viewport visibility
Inputs: limit.
safari_extract_linksA
Extract all links with href, text, rel, target, external/nofollow detection
Inputs: limit, filter.
safari_extract_metaA
Extract all meta tags: title, description, canonical, OG tags, Twitter cards, JSON-LD, alternate languages, RSS feeds
Inputs: no named parameters.
safari_extract_tablesA
Extract HTML tables as structured JSON (headers + rows). Perfect for scraping data tables.
Inputs: limit, selector.
safari_fillA
Fill/replace value in an input, textarea, select, OR contenteditable (rich text). Handles React controlled inputs, ProseMirror, Draft.js, and Google Closure editors automatically. Use for SETTING a value (replaces existing). For code editors (Monaco/CodeMirror/Ace), use safari_replace_editor instead. For character-by-character typing in search boxes, use safari_type_text. IMPORTANT: When using ref, always take a FRESH safari_snapshot first — refs expire after each new snapshot (prefix changes: 5_xx → 6_xx).
Inputs: value (required), ref, why, receipt, +1 more.
safari_fill_and_submitB
Fill a form AND submit it in one operation. Finds submit button automatically if not specified.
Inputs: fields (required), why, submitSelector.
safari_fill_formB
Fill multiple form fields at once
Inputs: fields (required), why, receipt.
safari_get_computed_styleA
Get computed CSS styles for an element. Optionally filter specific properties.
Inputs: selector (required), properties.
safari_get_consoleA
Get captured console messages (must call safari_start_console first)
Inputs: no named parameters.
safari_get_cookiesA
Get cookies for the current page
Inputs: no named parameters.
safari_get_elementB
Get detailed info about an element (tag, text, rect, attributes, visibility)
Inputs: selector (required), receipt.
safari_get_indexed_dbB
Read records from an IndexedDB database store
Inputs: dbName (required), storeName (required), limit.
safari_get_sourceC
Get HTML source of current page
Inputs: maxLength.
safari_go_backC
Go back in browser history
Inputs: receipt.
safari_go_forwardC
Go forward in browser history
Inputs: receipt.
safari_handle_dialogB
Set up handler for the next alert/confirm/prompt dialog
Inputs: text, action, receipt.
safari_hoverC
Hover over element. Use ref, selector, or x/y
Inputs: x, y, ref, why, +2 more.
safari_import_storageB
Import storage state from JSON (as exported by safari_export_storage) — restores cookies, localStorage, sessionStorage
Inputs: state (required).
safari_inspect_viewportA
Validate the page's against iOS Safari best practices: width=device-width, initial-scale, disabled-zoom (WCAG 1.4.4), viewport-fit=cover. Returns parsed attributes + severity-tagged issues (error/warning/info).
Inputs: no named parameters.
safari_list_framesA
Kept from safari-mcp, where its Safari extension lists the documents in a tab (the main page and each iframe). Daylight's extension bridge is off, so this tool only answers that it cannot list frames: AppleScript reaches only the main document.
Inputs: receipt.
safari_list_indexed_dbsA
List all IndexedDB databases on the current page
Inputs: no named parameters.
safari_list_tabsA
List every tab in this session's Safari window (titles + URLs, including the user's own tabs — verbose and rarely needed).
Inputs: no named parameters.
safari_local_storageA
Get localStorage data for the current page
Inputs: key.
safari_mock_routeA
Intercept network requests matching a URL pattern and return a mock response. Works with both fetch and XHR. Useful for testing API error states, offline behavior, or replacing API responses.
Inputs: response (required), urlPattern (required).
safari_native_clickA
Real click performed by WebKit through the macOS accessibility tree — mousedown/mouseup/click arrive with isTrusted: true, so WAF/bot-gated and isTrusted-checking handlers accept it (G2, Cloudflare, Google editors). Runs in the background: Safari is never activated, no window is raised and the mouse does not move. Use when regular safari_click has no effect or is rejected. Use ref (from snapshot), selector, text, or x/y. When using ref, always take a FRESH safari_snapshot first. Needs an unlocked screen.
Inputs: x, y, ref, why, +4 more.
safari_native_hoverA
OS-level mouse hover via macOS CGEvent — moves the real cursor to an element to trigger native :hover / mouseenter handlers. Use for obfuscated UIs where JS-dispatched mouseenter isn't enough, like Discord server sidebars (tooltips only appear on real hover) or portal-rendered tooltips. After hover, call safari_wait_for or safari_evaluate to read the tooltip. Dwells for dwellMs to let tooltips render, then restores the original cursor position by default. Requires Safari window to be visible.
Inputs: x, y, ref, why, +5 more.
safari_native_keyboardA
OS-level keyboard event via macOS CGEvent — sends a real keypress (with optional modifiers) to the Safari window WITHOUT activating Safari or stealing focus. Use when safari_press_key's JS path doesn't reach React trust-gated handlers (Discord ProseMirror Enter, Slack send, virtualized editors). Keys: enter, return, tab, escape, space, delete, backspace, up/down/left/right, home, end, pageup, pagedown, f1-f6, a-z, 0-9 and common punctuation. Modifiers: cmd, shift, alt, ctrl. Produces isTrusted:true events. Never activates Safari — runs entirely in the background.
Inputs: key (required), why, receipt, modifiers.
safari_native_typeA
Insert text as real input, in the background (Safari is never activated, the clipboard is untouched). Inputs and textareas get it through the macOS accessibility tree (isTrusted beforeinput/input, any language); rich editors (contenteditable) and cross-origin frames get key events that carry the text, posted to Safari (the agent's window must be Safari's front window; the field is read back, and text that did not arrive is reported). Unlike safari_fill which manipulates DOM directly (breaking React/ProseMirror state), this is real input — ProseMirror/Slate/Draft.js process it natively and update their internal model. After native_type, pressing Enter (via safari_native_keyboard) will actually submit the form because the framework state matches the DOM. No focus stealing. Use for Discord, Slack, and any editor where safari_fill works visually but the content isn't 'really there' when you try to submit.
Inputs: value (required), ref, why, receipt, +1 more.
safari_networkA
Quick network overview via Performance API (no setup needed). Shows URLs and timing for resources loaded by the page. For detailed request/response info (headers, status codes, POST bodies), use safari_start_network_capture + safari_network_details instead.
Inputs: limit.
safari_network_detailsA
Get captured network requests with full details (must call safari_start_network_capture first)
Inputs: limit, filter, receipt.
safari_new_tabA
Open a new tab in the front Safari window, optionally with a URL, without activating Safari (never steals focus). Unless DAYLIGHT_SHOW_TAB=0 or DAYLIGHT_VISUAL=0 it is shown as that window's current tab, so the user can watch. Returns {tabIndex, safeUrl, windowId}. It becomes this session's current tab: later calls act in it until you switch or close tabs.
Inputs: url.
safari_override_geolocationB
Override the browser's geolocation API to return custom coordinates
Inputs: latitude (required), longitude (required), accuracy.
safari_paste_imageA
Paste an image from a local file into the focused element via JS DataTransfer (no clipboard, no focus steal). Works on Medium, dev.to, HackerNoon, TOI, etc.
Inputs: filePath (required), receipt.
safari_performance_metricsA
Get detailed performance metrics: navigation timing, Web Vitals (FCP, LCP, CLS), resource breakdown, memory usage
Inputs: no named parameters.
safari_press_keyB
Press a keyboard key (enter, tab, escape, arrows, etc). Supports modifiers (cmd, shift, alt, ctrl).
Inputs: key (required), why, receipt, modifiers.
safari_query_allA
Find all elements matching a CSS selector (returns tag, text, href, value). x/y are relative to each element's own frame viewport — for matches inside an iframe, click by selector or snapshot ref, not by these coordinates
Inputs: selector (required), limit, receipt.
safari_react_select_list_optionsA
List available options of a react-select v5 dropdown without opening the menu. Returns JSON {ok, total, options:[{label,value}…]}. Useful when safari_react_select_set returns 'option not found' and you need to see exact labels (e.g. 'Email Routing Rules' vs 'Email Routing'). Either ref or selector required.
Inputs: ref, selector.
safari_react_select_setA
Set a value in a react-select v5 dropdown by walking React fiber to find the Select component and invoking onChange directly — bypasses the menu UI entirely. Use when safari_click on the chevron or option keeps failing (Cloudflare custom token forms after a few rows, portal-rendered selects that intercept synthetic events). Returns JSON {ok, selected} on success, or {ok:false, error, available:[…]} listing up to 30 option labels on miss. Match is by label, value, or case-insensitive label. Either ref or selector required. NOTE: For Permissions-levels combos that are disabled until a Permission is selected, set the Permissions value first — the level combo becomes enabled and its props.options populate.
Inputs: value (required), ref, why, selector.
safari_read_pageA
Read page text content (title, URL, body text). Use for reading article text or page content. For interacting with elements, prefer safari_snapshot (gives ref IDs). Use selector to read specific element. Use maxLength to limit output.
Inputs: receipt, selector, maxLength.
safari_reloadC
Reload the current page
Inputs: hard, receipt.
safari_reload_extensionA
Kept from safari-mcp, where it reloads its Safari extension. Daylight does not use that extension (its bridge is off), so this tool only reports that the extension is not in use.
Inputs: no named parameters.
safari_replace_editorA
Replace ALL content in a code editor (Monaco, CodeMirror, Ace, ProseMirror). Use ONLY for code editors — Airtable automations, GitHub gists, CodePen, n8n code nodes, etc. NOT for rich text editors like Medium/LinkedIn (use safari_fill for those). Detects ProseMirror/Draft.js/CodeMirror/Monaco/Ace and uses their native API.
Inputs: text (required), why, receipt.
safari_reset_emulationA
Reset device emulation: restores the window size from before safari_emulate and removes its navigator overrides (no reload)
Inputs: no named parameters.
safari_resizeC
Resize the Safari window
Inputs: width (required), height (required).
safari_right_clickB
Right-click (context menu) an element by CSS selector or x/y coordinates
Inputs: x, y, why, receipt, +1 more.
safari_run_scriptA
Batch Safari actions in one MCP session, run in order. Each step is {action, args}, args as the matching tool takes them. Actions: navigate, navigateAndRead, reload, goBack, goForward, newTab, switchTab and closeTab (by tab index: {index}), listTabs, click, doubleClick, rightClick, clickAndWait, hover, fill, fillForm, fillAndSubmit, clearField, typeText, pressKey, selectOption, scroll, scrollTo, scrollToElement, readPage, getPageSource, screenshot, screenshotElement, evaluate, waitFor, waitForTime, getElementInfo, querySelectorAll, verifyState, extractTables, extractMeta, extractImages, extractLinks, analyzePage, detectForms, getAccessibilityTree, getPerformanceMetrics, getLocalStorage, setLocalStorage, deleteLocalStorage, getSessionStorage, setSessionStorage, deleteSessionStorage, getCookies, setCookie, deleteCookies, reactSelectSet, reactSelectListOptions, nativeClick, nativeHover, nativeType, nativeKeyboard, replaceEditorContent, uploadFile, mockNetworkRoute. A step refused by a tab-safety check, or a switchTab that fails, stops the batch.
Inputs: steps (required).
safari_safe_area_insetsA
Read the live CSS safe-area-inset values (top/right/bottom/left) as the page sees them, whether viewport-fit=cover is set, and whether env(safe-area-inset-*) is used in any stylesheet. For notch / Dynamic Island layout debugging.
Inputs: no named parameters.
safari_save_pdfA
Save the current page as a PDF file. Uses screencapture + PDF rendering (no Safari UI interaction needed).
Inputs: path (required).
safari_screenshotA
Take a visual screenshot (base64 JPEG). EXPENSIVE — use safari_snapshot instead for most tasks. Only use screenshot when you need to verify visual layout, styling, images, or colors that snapshot can't show. Pass maxWidth (e.g. 1024) for layout checks — far fewer tokens.
Inputs: receipt, fullPage, maxWidth.
safari_screenshot_elementB
Take a screenshot of a specific element (by CSS selector). Returns a base64 image.
Inputs: selector (required), receipt.
safari_scrollC
Scroll the page up or down by a specified amount
Inputs: amount, receipt, direction.
safari_scroll_toC
Scroll to a specific position on the page
Inputs: x, y, receipt.
safari_scroll_to_elementA
Scroll to element by CSS selector OR text. For virtual DOM (Airtable) use text — scrolls down until text appears in DOM.
Inputs: why, text, block, receipt, +2 more.
safari_select_optionA
Select an option in a native dropdown. Sets .value and dispatches change event. Pass ref (from safari_snapshot) for a select inside an iframe or shadow DOM — a plain selector only reaches the top document. For custom dropdowns (React/LinkedIn), use safari_click on the dropdown trigger, then safari_click on the option instead.
Inputs: value (required), ref, why, receipt, +1 more.
safari_session_storageA
Get sessionStorage data for the current page
Inputs: key.
safari_set_cookieC
Set a cookie on the current page
Inputs: name (required), value (required), path, domain, +3 more.
safari_set_local_storageB
Set a value in localStorage
Inputs: key (required), value (required).
safari_set_session_storageB
Set a value in sessionStorage
Inputs: key (required), value (required).
safari_snapshotA
PREFERRED way to see page state. Returns accessibility tree with ref IDs for every interactive element. Use refs with click/fill/type instead of CSS selectors. Workflow: snapshot → see refs → click({ref:'0_5'}). PREFER THIS over safari_screenshot (cheaper, structured text vs heavy image) and over safari_read_page (includes interactive refs). Use safari_screenshot only when you need to see visual layout/styling.
Inputs: diff, receipt, selector.
safari_start_consoleA
Start capturing console messages (log, warn, error, info). Call once per page.
Inputs: no named parameters.
safari_start_network_captureA
Start capturing detailed network requests (fetch + XHR) with headers, status, timing. Call once per page. Intercepts fetch/XHR — captures requests AFTER this call only. For quick overview of already-loaded resources, use safari_network instead.
Inputs: no named parameters.
safari_switch_tabA
Switch the MCP session's logical target without focusing Safari. Pass the index of one of this session's tabs in its Safari window.
Inputs: url, index, receipt.
safari_throttle_networkA
Simulate slow network conditions. Profiles: slow-3g, fast-3g, 4g, offline. Or custom latency/speed. Call with no args to reset.
Inputs: latency, profile, downloadKbps.
safari_type_textA
Type text character-by-character with realistic key events. Best for: search boxes (triggers autocomplete), chat inputs, and fields that react to each keystroke. For rich text editors (Medium, HackerNoon, LinkedIn), use safari_fill instead — it uses framework-native APIs. For code editors (Monaco/CodeMirror), use safari_replace_editor. When using ref, always take a FRESH safari_snapshot first — refs expire after each new snapshot.
Inputs: text (required), ref, why, receipt, +1 more.
safari_upload_fileA
Upload a file to a element via JavaScript DataTransfer — NO file dialog, NO UI interaction. IMPORTANT: Do NOT click the file input before calling this tool — just provide the selector and file path. If a file dialog is already open, this tool will close it first. NOTE: 'verified 0 files' may appear even on success if the site uses a custom upload handler — check visually with safari_snapshot. For an IMAGE going into a composer/editor that should show a thumbnail, pass verifyPreview:true — some sites (Google Business Profile) accept the file handle and flip their UI to 'attached' while ingesting nothing, and the post then publishes with no image.
Inputs: filePath (required), selector (required), why, receipt, +2 more.
safari_verify_stateA
Verify the framework-level state of an editor/input matches the expected value. Returns JSON {match, mode, actual, expected, hint?}. Modern editors (ProseMirror, Lexical, Closure, React-controlled inputs) maintain state separately from the DOM — .value or .textContent may show new text while the internal store still holds old data, so a Submit click sends stale data. Call this AFTER safari_fill and BEFORE clicking Submit on critical forms (Featured.com, LinkedIn share, Medium, Reddit).
Inputs: expected (required), selector (required), receipt.
safari_waitA
Wait for a fixed time in milliseconds. Use only when you need a brief pause between actions. PREFER safari_wait_for (waits for element/text to appear) — it's smarter and doesn't waste time.
Inputs: ms (required).
safari_wait_forC
Wait for an element or text to appear on the page
Inputs: text, receipt, timeout, selector.
safari_wait_for_new_tabA
Wait for a new tab to appear (e.g. after OAuth login click opens popup). Automatically switches to the new tab.
Inputs: timeout, urlContains.
safari_webkit_compatA
Check every CSS property used on the page against THIS Safari via CSS.supports() — reports unsupported properties, properties that need a -webkit- prefix, and known Safari rendering quirks (e.g. position:sticky inside overflow ancestors). Tested in the live engine, so no false positives.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 98 tools
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.
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.
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.
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
Related MCP Connectors
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
Browz hosted MCP (free public beta): let an AI app drive your own Browz browser profiles from anywhere. Connect https://mcp.gobrowz.com/mcp and sign in with your Browz account (OAuth) or an agent token. Each call is relayed to the Browz app on your computer, which must be online with Remote control on and have a hardware security chip (Mac Secure Enclave or TPM 2.0). 17 tools: profiles, tabs, navigate, snapshot, act, wait, screenshot. Cookies, downloads and stored sign-ins stay on your computer.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server that lets AI agents drive your real Chromium browser with your existing signed-in sessions, providing visible, local, and inspectable automation for tasks like navigation, clicking, typing, and form filling.252Apache 2.0
- AlicenseNot gradedqualityAmaintenanceA local MCP server that lets AI coding tools drive the user's own already-logged-in Chrome — clicking, typing, reading pages, taking screenshots, and inspecting cookies, network, and console through the extension rather than a debug port. All communication stays on the machine, with agent-opened tabs grouped and kept out of focus.1 npmISC
- AlicenseNot gradedqualityAmaintenanceA local MCP server that lets AI coding tools drive the user's actual, already-logged-in Chrome browser — snapshotting pages, clicking, typing, navigating, reading content, taking screenshots, and inspecting cookies, network traffic, and console output. Browser automation happens through a Chrome extension using Native Messaging, so no remote-debugging port is exposed and all communication stays on the local machine.1 npmISC
- AlicenseNot gradedqualityAmaintenanceA local MCP server that lets AI coding assistants drive the user's real, already-logged-in Chrome through a companion extension, with tools for navigation, snapshots, clicking, typing, reading page content, screenshots, tabs, network inspection, and cookies. It works without a remote-debugging port, so sessions and bot-detection state of the everyday browser are preserved while everything stays on the user's machine.1 npmISC