
Apple Ships a Safari MCP Server That Gives AI Agents Direct Browser Access for Debugging
Seventeen tools expose DOM, console logs, network requests, screenshots, and JS execution to any MCP-compatible agent - no window-switching required.
Apple shipped the Safari MCP server in Safari Technology Preview 247 on July 1 - a Model Context Protocol connector that gives AI coding agents direct read access to a live Safari browser window. No more describing bugs to your agent. DOM output, console logs, network requests, and screenshots all flow to the agent automatically, letting it debug and audit your site in Safari without the developer switching windows to relay what they see.
Seventeen Tools Cover the Full Debugging Stack
Apple published the complete tool list in the WebKit blog post. The 17 tools cover every layer of the browser debugging workflow - from tab management to DOM interaction to network inspection to accessibility auditing.
| Tool | What It Does |
|---|---|
| `evaluate_javascript` | Execute JS on the page and return the result |
| `get_page_content` | Extract page text as markdown, HTML, or JSON |
| `screenshot` | Capture a PNG of the current page |
| `list_network_requests` | List URL, method, status, and timing for all requests |
| `get_network_request` | Full headers, body, and timing for a single request |
| `browser_console_messages` | Return buffered console logs for the current tab |
| `page_interactions` | Perform DOM interactions: click, type, scroll, hover, keyPress |
| `set_viewport_size` | Set the viewport width and height in CSS pixels |
| `set_emulated_media` | Emulate a CSS media type (e.g. print) for responsive testing |
| `navigate_to_url` | Navigate to a URL and return the loaded page content |
| `page_info` | Get current URL, title, and loading state |
| `list_tabs` | List all open tabs with handles and URLs |
| `create_tab` | Open a new tab, optionally with a URL |
| `close_tab` | Close a tab by its handle |
| `switch_tab` | Switch to a tab by its handle |
| `browser_dialogs` | Accept, dismiss, or respond to JS prompt dialogs |
| `wait_for_navigation` | Wait for page load and return the final URL and title |
Five Use Cases Apple Calls Out
Web development and cross-browser compatibility are the two obvious ones. Agents can open a site in Safari, inspect computed styles, and compare the layout against what the developer expects - catching Safari-specific rendering differences that only show up in one browser. For developers already using agents like Claude Code or Codex in their AI coding workflow, this closes the loop between writing code and verifying how it renders.
Performance and accessibility audits are two more. Agents can call evaluate_javascript to pull navigation timing and resource load metrics, then pinpoint what's slowing the page down. For accessibility, the agent checks for missing ARIA labels, improper attributes, and poor contrast ratios without the developer running a separate audit tool. The fifth use case is state verification - the agent can query DOM elements, confirm form state, and walk through a checkout flow to validate interactions. For developers who spend half their debugging time relaying browser state to an agent that cannot see the screen, that is probably the most useful shift in the workflow.
Three Steps to Get Started
Setup requires Safari Technology Preview installed, developer settings enabled under Safari Settings > Advanced > Show features for web developers, and remote automation turned on under Safari Settings > Developer > Enable remote automation and external agents. Done. Then one terminal command adds it to Claude Code or Codex:
# Claude Code
claude mcp add safari-mcp-stp -- "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --mcp
# Codex
codex mcp add safari-mcp-stp -- "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --mcpFor other agents, add the following to your mcp.json or config.json and name the server whatever you like:
"safari-mcp-stp": {
"command": "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver",
"args": ["--mcp"]
}On privacy: the Safari MCP server runs entirely on the local machine and makes no network calls of its own. Data captured - page content, screenshots, console logs - goes directly to the agent, not to Apple. Personal Safari data like AutoFill is not accessible to the server at all.
Safari Technology Preview 247 is available now as a free download. Apple has not announced when the Safari MCP server will ship in stable Safari.