
Safari DevTools MCP
io.github.HayoDevPublished by GitHub account HayoDevv1.8.1Updated Oct 24, 2026
MCP server for Safari DevTools — browser debugging and automation for AI coding agents
Overview
Lets a coding agent control and inspect a live Safari browser on macOS for debugging, automation, and testing.
- What you can do
- Exposes about 45 tools that drive Safari through SafariDriver and AppleScript. It captures console logs and network requests, evaluates JavaScript, takes accessibility-tree snapshots and element screenshots, and inspects computed CSS. It also automates clicks, typing, forms, drag-and-drop, keyboard shortcuts, tab management, and cookie or localStorage handling, plus iOS Safari and WebKit compatibility checks.
- When to use it
- Useful for developers debugging or testing web pages in Safari, especially when Chrome DevTools tooling is already familiar and an equivalent Safari workflow is wanted. Also suited to accessibility audits, performance analysis, and iOS Safari or PWA readiness checks.
- Requirements
- macOS with Safari and SafariDriver; Node.js 18 or newer (22+ recommended), run via npx. Safari must have developer features and Allow Remote Automation enabled, and SafariDriver authorized with sudo safaridriver --enable. A visible browser window is required; no headless mode.
Installation
In SourceWeft
- Open Safari DevTools MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Safari DevTools MCP
[npm version] [npm downloads] [license] [node]
safari-devtools-mcp lets your coding agent (such as Claude, Cursor, Copilot or Gemini) control and inspect a live Safari browser on macOS. It acts as a Model-Context-Protocol (MCP) server, giving your AI coding assistant access to Safari DevTools for debugging, automation, and testing.
Chrome developers get powerful AI debugging through chrome-devtools-mcp by Google. Safari developers should have something equivalent — this project brings that same experience to Safari, with matching tool names and parameter schemas so you can swap between browsers with minimal friction.
Changelog | Contributing
Note: This server exposes browser content (page data, console logs, network traffic) to MCP clients. Avoid browsing sensitive websites or entering credentials while a session is active.
Why safari-devtools-mcp?
This project uses WebDriver for capabilities that scripting alone cannot provide:
- Network request/response body capture — intercepts fetch and XHR calls with full headers, payloads, and timing
- DOM snapshots via accessibility tree — stable element UIDs that survive page re-renders, not brittle CSS selectors
- CSS computed style inspection — read any computed property from any element
- Cookie and storage management — read, write, and delete cookies, localStorage, and sessionStorage
- Element-level screenshots — capture individual elements, not just the full viewport
- Session auto-recovery — detects dead SafariDriver sessions and reconnects transparently
Key features
- Browser debugging: Capture console logs, inspect network requests, and evaluate JavaScript — with stack traces and full request/response details.
- Reliable automation: Click, type, fill forms, drag and drop, and press keyboard shortcuts using accessibility-tree snapshots with stable UIDs.
- Native macOS integration: Tab management via AppleScript for listing, switching, and controlling Safari tabs across windows
Requirements
- macOS (Safari and SafariDriver are Apple-exclusive)
- Node.js 18+ (22+ recommended)
- Safari with remote automation enabled
Safari setup
- Open Safari > Settings > Advanced > check "Show features for web developers"
- Develop menu > check "Allow Remote Automation"
- Authorize SafariDriver:
Getting started
Standard MCP config:
Claude Code
Or add to your project's .mcp.json using the standard config above.
Claude Desktop
Add the standard config to ~/Library/Application Support/Claude/claude_desktop_config.json.
Cursor
Add the standard config to your Cursor MCP settings.
VS Code
Add the standard config to .vscode/mcp.json.
Copilot CLI
Gemini CLI
Or add the standard config to your ~/.gemini/settings.json.
Gemini Code Assist
Add the standard config to your .gemini/settings.json in the project root.
JetBrains AI Assistant & Junie
Add the standard config to your .junie/mcp.json in the project root.
Raycast
Open "Install MCP Server" in Raycast and fill in:
- Command:
npx - Arguments:
-y safari-devtools-mcp@latest
Or copy the standard config JSON above before opening the command — Raycast will auto-fill the form.
Visual Studio
Add the standard config to your .vs/mcp.json in the solution root.
Warp
Add the standard config to your Warp MCP settings file at ~/.warp/mcp.json.
From source
Then point your MCP client to the built entry point:
Your first prompt
Navigate to https://example.com, take a snapshot, and list any console errors.
Slim mode
Use --slim to reduce token usage with shorter tool descriptions. Useful when working with context-limited models or long conversations:
Prompts (skills)
The server exposes guided debugging workflows as MCP prompts. Clients that support prompts (e.g. Claude Desktop, Claude Code) can invoke them by name:
Tools (45)
Debugging
Page content
Navigation
Scroll
CSS inspection
Cookies & storage
Input automation
iOS Safari validation
Architecture
Known limitations
- Single session: Safari only allows one WebDriver session at a time. Running multiple instances is not supported.
- macOS only: Safari and SafariDriver are Apple-exclusive — this server does not work on Linux or Windows.
- No headless mode: Safari does not support headless operation. A visible browser window is required.
- Console pre-injection gap: Console messages logged before the capture script is injected are not captured.
- Network pre-injection gap: Network requests made before injection are backfilled via the Performance API with limited detail (timing and size, but no headers or status codes).
- PNG only: Safari WebDriver only supports PNG screenshots — no JPEG or WebP. Full-page capture is not available.
- AppleScript permissions: Tab management features require macOS Accessibility permissions for
osascript.
Credits
- chrome-devtools-mcp by Google/ChromeDevTools — the inspiration and interface standard this project mirrors. Tool names and schemas are intentionally compatible so you can switch between Chrome and Safari seamlessly.
- safari-mcp-server — prior art for Safari MCP integration that we studied during development.
License
Source: README.md at commit 9bc2afb
Tools
0Version history
1- v1.8.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts