Safari Technology Preview 247: Introducing the Safari MCP Server

Safari MCP Server Enables AI-Driven Browser Debugging

Apple has introduced the Safari MCP server in Safari Technology Preview 247, providing a Model Context Protocol (MCP) implementation that connects AI agents directly to a Safari browser window. This allows agents to autonomously access the DOM, network requests, screenshots, and console output, reducing the manual "debugging dance" of switching between the browser, developer tools, and code editors.

Core Capabilities and Use Cases

The Safari MCP server allows AI agents to emulate user experiences and perform technical audits without manual developer intervention. Key applications include:

Automated Debugging and Compatibility

Agents can open sites in Safari, inspect computed styles, and check layouts to identify Safari-specific rendering bugs. This streamlines cross-browser testing by allowing an agent to compare Safari's rendering against expected results without the developer needing to switch windows.

Performance and Accessibility Audits

  • Performance Analysis: Agents can execute JavaScript on the page to extract navigation timing and resource load times, pinpointing specific bottlenecks.
  • Accessibility Testing: Agents can automatically scan for missing labels, improper ARIA attributes, and poor color contrast to ensure compliance with accessibility standards.

State Verification

Agents can verify complex user flows by querying elements via selectors, checking form states, and confirming interactions within a checkout flow or other multi-step processes.

Available Toolset

The Safari MCP server exposes a comprehensive set of tools to MCP-compatible clients:

Tool Description
browser_console_messages Returns buffered console logs for the current or specified tab
browser_dialogs Lists and responds to browser dialogs (accept, dismiss, or input text)
evaluate_javascript Executes JavaScript code within the page and returns the result
get_network_request Retrieves full details (headers, body, timing) for a single network request
list_network_requests Lists network request summaries (URL, method, status, timing)
page_interactions Performs sequential DOM interactions (click, type, scroll, hover, keyPress)
screenshot Captures a PNG screenshot of the current page
set_viewport_size Adjusts the browser viewport size in CSS pixels
navigate_to_url Navigates to a URL and returns the loaded page content
get_page_content Extracts text content in formats like Markdown, HTML, or JSON

Additional management tools include create_tab, close_tab, list_tabs, switch_tab, page_info, set_emulated_media, and wait_for_navigation.

Installation and Configuration

To use the Safari MCP server, users must install Safari Technology Preview and enable the following settings:

  1. Safari Settings > Advanced $\rightarrow$ "Show features for web developers"
  2. Safari Settings > Developer $\rightarrow$ "Enable remote automation and external agents"

Client Setup

Depending on the agent client, use the following configuration commands:

  • Claude: 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" --mcp
  • Generic JSON Config:
{
  "safari-mcp-stp": {
    "command": "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver",
    "args": ["--mcp"]
  }
}

Privacy and Security

The Safari MCP server runs locally on the user's machine and does not make independent network calls. It does not have access to personal Safari data such as AutoFill or general browser activity. Data captured (screenshots, logs, page content) is sent directly to the agent client; Apple does not receive this data. Users are advised to only use agents they trust, as the agent has direct access to the browser session.

Community Perspectives and Alternatives

Industry discussion highlights that this is part of a broader trend toward browser-integrated AI agents. Some developers have already adopted similar workflows using other tools:

  • Cross-Browser MCPs: Some developers use the official MCP servers for Chrome and Firefox alongside Safari to maintain a comprehensive compatibility suite.
  • -Alternative Drivers: Some users prefer Playwright-CLI or direct communication with Chrome via the Chrome DevTools Protocol (CDP) for speed and automation.
  • Existing Infrastructure: It was noted that safaridriver has existed for years as a W3C WebDriver implementation, but the MCP integration provides a more native interface for LLM-based agents.

Sources

Related

  • Project
  • Project
  • Project
  • Project
  • Project