Apple's Safari Technology Preview 247 introduces an MCP server that connects AI coding agents directly to a Safari browser window. Your agent can now see how code actually renders — capture screenshots, inspect the DOM, monitor network requests, and verify layouts — all from the terminal.
On July 1, 2026, Apple's WebKit team shipped Safari Technology Preview 247 with a surprising addition: the Safari MCP server — a Model Context Protocol server that exposes a full Safari browser window to AI coding agents. It gives your agent the ability to visually verify how code renders in Safari, turning the familiar "write code, check browser, repeat" debugging loop into a single conversational workflow.
Any MCP-compatible client — Claude Code, Codex CLI, VS Code via GitHub Copilot, Cursor, Zed, or Claude Desktop — can connect to the Safari MCP server. Once connected, your agent gains access to 17 browser tools: screenshot capture, DOM navigation, JavaScript evaluation, network request monitoring, console log access, viewport resizing, media emulation, and more.
This is a major shift. Previously, AI coding agents had no direct visual feedback — they could read your code but couldn't see what it produced in a browser. The Safari MCP server closes that loop, and it's one of the most practical additions to the AI coding assistant ecosystem in 2026.
If you build for the web, you know the debugging dance. You spot a layout bug in the browser. You open Safari's Web Inspector to hunt it down. You click through the Styles panel, find the broken CSS, switch to your editor, fix it, reload, and check again. If the fix didn't work — and it often doesn't on the first try — you repeat the whole cycle.
With AI coding agents, this cycle got a little better: you could take a screenshot, describe the problem, and let the agent suggest a fix. But that still meant manual screenshotting, manual prompting, and manual verification. The loop went: Browser → Screenshot → Prompt → Agent → Code → Browser again.
The Safari MCP server collapses this into a single call. Your agent can:
The result: fewer context switches, faster bug squashing, and a debugging workflow that feels like pairing with a developer who actually has Safari open.
The Safari MCP server exposes a comprehensive set of browser tools. Here's every tool and what it does:
Return buffered console logs for the current or specified tab. Your agent can read JavaScript errors, warnings, and debug output automatically.
List and respond to browser dialogs — accept, dismiss, or input text for JavaScript prompts. Useful for testing alert/confirm/prompt flows.
Close a browser tab by its handle. Clean up after tests without manual tab management.
Create a new browser tab, optionally loading a URL. Your agent can open multiple pages for comparison testing.
Execute JavaScript code within the page and return the result. Query page state, measure performance, or run assertions — all remotely.
Get full detail for a single recorded network request — headers, body, and timing information. Debug API calls and resource loading.
Extract text content of a page in various formats: markdown, HTML, JSON. Your agent can read the full rendered page as structured data.
List network request summaries with URL, method, status code, and timing. Spot slow resources, failing API calls, or unexpected redirects.
List all open browser tabs with their handles and URLs. Manage multi-tab test scenarios.
Navigate to a URL and return the loaded page's content. The fundamental browsing tool — your agent opens a page, reads its content, and analyzes it.
Get info about the current page: URL, title, and loading state. Quick status check before deeper inspection.
Perform DOM interactions in sequence: click, type, scroll, hover, keyPress. Automate multi-step user flows without writing Playwright scripts.
Capture a screenshot of the current page as a PNG. The crown jewel — your agent literally sees what the user sees. Layout bugs, misaligned elements, visual regressions — all detectable.
Emulate a CSS media type like print or speech. Test responsive behaviors and print stylesheets programmatically.
Set the browser viewport size in CSS pixels. Test responsive designs at any breakpoint — mobile, tablet, desktop — from a single command.
Switch to a different browser tab by its handle. Your agent can open a reference page, switch back to the test page, compare screenshots.
Wait for the current page to finish loading; returns final URL and title. Essential after form submissions or SPA route changes.
You'll need macOS with Safari Technology Preview 247 or later installed.
Download it from developer.apple.com/safari/technology-preview/. Once installed:
Simplest setup — one command from your terminal:
claude mcp add safari-mcp-stp -- "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --mcp
This registers the Safari MCP server with Claude Code under the name safari-mcp-stp.
You can name it anything — even just safari. Once added, Claude automatically
discovers and uses the browser tools when you ask it to check something in Safari.
Same command pattern, different client:
codex mcp add safari-mcp-stp -- "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --mcp
For other MCP-compatible editors, add the server configuration to your project's
mcp.json or editor-specific MCP settings file:
{
"safari-mcp-stp": {
"command": "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver",
"args": ["--mcp"]
}
}
For VS Code: add to .vscode/mcp.json.
For Cursor: add to .cursor/mcp.json under mcpServers.
For Zed: add to ~/.config/zed/mcp.json.
The most compelling use case: your agent finds visual layout bugs automatically. Instead of describing what you see to the agent, the agent opens Safari, takes a screenshot, and identifies the problem:
"Look at my site in Safari and find any rendering issues on the flight booking page"
The agent navigates to the page, takes a screenshot, examines the rendered output, checks console logs for errors, and returns a structured bug report — with specific CSS fixes. This is the workflow Apple demonstrated in their announcement: the agent found two distinct bugs (one layout, one JavaScript) and proposed fixes for both.
Combined with a browser compatibility data tool like the MDN MCP server, you can create a powerful cross-browser testing pipeline:
This workflow catches Safari-specific CSS bugs before they reach production — especially
important because Safari's CSS engine differs in subtle ways from Chromium-based browsers.
Features like subgrid, :has(), and container queries have had
Safari-specific implementation quirks that visual testing catches immediately.
The Safari MCP server lets your agent evaluate JavaScript to extract real performance data:
// Your agent can extract navigation timing data
const perfData = performance.getEntriesByType('navigation')[0];
console.log(`DOM Content Loaded: ${perfData.domContentLoadedEventEnd}ms`);
console.log(`Load: ${perfData.loadEventEnd}ms`);
console.log(`First Byte: ${perfData.responseStart - perfData.requestStart}ms`);
The agent can also list network requests to find slow resources, identify render-blocking scripts, and check the performance of Safari-specific CSS properties. This is particularly valuable for testing on real Apple hardware — Safari's performance profile differs significantly from Chrome or Firefox on the same machine due to different rendering engines and memory management.
Your agent can check for common accessibility issues directly in Safari:
Instead of running a separate accessibility audit tool, you ask your agent: "How accessible is my site in Safari?" — and it runs through the checks automatically.
Complex user flows — checkout, registration, multi-step forms — benefit enormously from agent-driven testing. Your agent can:
page_interactionsThis catches Safari-specific issues that unit tests miss: sticky headers that don't scroll, viewport-dependent layout shifts, and form validation UI that renders differently in WebKit.
With the MDN MCP server and the Safari MCP server now available, it's worth understanding how they differ — and how they complement each other:
| Aspect | Safari MCP Server | MDN MCP Server |
|---|---|---|
| What it does | Connects to a live Safari browser for visual testing | Connects to MDN documentation for reference data |
| Key outputs | Screenshots, DOM state, network logs, console output | Documentation text, browser compatibility tables, Baseline status |
| Setup | Local installation — runs Safari TP on your machine | Remote HTTP — no local install needed |
| Platform | macOS only (Safari requirement) | Cross-platform (works anywhere with internet) |
| Best for | Visual regression, layout testing, Safari-specific debugging | Checking browser support, finding API docs, Baseline status |
| Privacy | Fully local — no network calls | Anonymized query data collected (experimental phase) |
In practice, I use both together. The MDN server tells me whether a feature has Baseline support across browsers. The Safari server tells me whether it actually renders correctly in Safari. They're not competing — they're complementary.
Apple designed the Safari MCP server with privacy in mind. It runs entirely on your local machine and makes no network calls of its own. It does not have access to your personal Safari data — AutoFill, browsing history, saved passwords, or other tabs. When it captures page content, screenshots, or console logs, that data flows directly to your AI agent — not to Apple.
What happens to that data after it reaches your agent depends on the agent and model you're
using. As with any tool that gives an agent browser access, only use agents you trust. The
safaridriver --mcp process is a standard macOS component with no additional
network permissions beyond what your agent already has.
The Safari MCP server is available now in Safari Technology Preview 247. The setup takes about three minutes:
claude mcp add safari-mcp-stp -- "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --mcpThe agent takes it from there. No complex prompts, no manual screenshotting, no window hopping. Just a conversational debugging workflow that finally gives your AI the visual feedback it's been missing.
For a deeper exploration of the MCP ecosystem and how it's transforming web development, check out the MDN MCP server guide — together, these two tools cover documentation and visual testing in one unified workflow.
claude mcp add safari-mcp-stp -- "/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver" --mcp. For other agents, configure via mcp.json with the same command path.Planning a web project and want to discuss the right tools and testing approach? Get in touch — free initial consultation.