Safari Model Context Protocol Server for Agentic Web Debugging
Apple has integrated a Model Context Protocol server into Safari Technology Preview 247, enabling AI agents to inspect and control a live browser window directly. This allows agentic coders to query the Document Object Model, evaluate JavaScript, and capture screenshots autonomously.
Impact: High
Why it matters
You can now delegate Safari-specific layout, performance, and accessibility debugging directly to Claude Code or Codex without manual back-and-forth.
TL;DR
- 01Safari remote automation can now be orchestrated over standard Model Context Protocol clients.
- 02Your AI agent can autonomously inspect computed styles, verify accessibility attributes, and grab screenshots.
- 03Execution is 100% local, protecting personal browsing sessions and AutoFill data.
Key facts
- Supported Clients
- Claude Code, Codex, and generic MCP clients
- Host
- Local machine only (safaridriver)
Setup and Remote Automation
To leverage the Safari MCP server, first install the latest Safari Technology Preview. Open the browser, navigate to Safari Settings > Advanced and enable Show features for web developers. Then, navigate to the newly visible Developer tab in settings and toggle Enable remote automation and external agents.
CLI Configuration
You can easily hook this server up to your terminal assistants. For Claude Code, run:
claude mcp add safari-mcp-stp -- "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --mcpFor Codex, use the matching commands to register the safaridriver binary globally inside your configuration.
Supported Tools
Once connected, the agent gains access to powerful actions. These include executing custom JavaScript payloads, capturing full-page PNG screenshots, toggling responsive CSS media emulations, adjusting viewport scales, and analyzing granular network request timing headers.
Try it in 2 minutes
claude mcp add safari-mcp-stp -- "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --mcpbash
✓ When to use
- Debugging layout shifts, broken elements, and visual CSS glitches specifically inside Safari.
- Automating performance evaluations or accessibility audits directly from your terminal.
✕ When NOT to use
- When developing on non-macOS environments (Windows/Linux) where Safari is unavailable.
- When testing strictly server-side logic that does not interface with a client browser.
What to do today
- Install Safari Technology Preview 247 or newer.
- Enable Developer features and Remote Automation in Safari Settings.
- Add the safaridriver command to your Claude Code or Codex MCP configurations.
Sources