# Safari DevTools MCP [Health: Active]

**Category:** 📂 Browser Automation  
**Repository:** https://github.com/HayoDev/safari-devtools-mcp  
**GitHub Stars:** 3  
**npm Downloads (last month):** 259  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/safari-devtools-mcp

## Description
MCP server for Safari DevTools — browser debugging and automation for AI coding agents

## Tools
Capabilities this server exposes over MCP:

- **list_console_messages** — List console messages with filtering by level (log, warn, error)
- **get_console_message** — Get a detailed message including stack trace and arguments
- **clear_console** — Clear all captured console messages
- **list_network_requests** — Monitor network requests — Fetch, XHR, and resource loads
- **get_network_request** — Get full request/response details with headers and body
- **clear_network** — Clear all captured network requests
- **evaluate_script** — Execute JavaScript in the browser context and return results
- **take_screenshot** — Capture a PNG screenshot of the page or a specific element
- **take_snapshot** — Accessibility-tree snapshot of the DOM with stable UIDs for element targeting
- **get_page_content** — Get the page title, URL, and visible text content
- **get_html_source** — Get the full HTML source of the page
- **extract_links** — Extract all links with their text, href, and rel attributes
- **extract_meta** — Extract meta tags (og:, twitter:, description, etc.)
- **list_pages** — List all open Safari tabs across windows
- **select_page** — Switch to a specific tab
- **new_page** — Open a new tab and navigate to a URL
- **close_page** — Close a tab
- **navigate_page** — Navigate to a URL, go back, forward, or reload
- **wait_for** — Wait for specific text to appear on the page
- **resize_page** — Resize the browser window
- **handle_dialog** — Accept or dismiss browser dialogs (alert, confirm, prompt)
- **scroll** — Scroll the page in any direction by a given amount
- **scroll_to_element** — Scroll an element into view by its UID
- **get_computed_style** — Get computed CSS styles for any element by UID
- **get_cookies** — Get browser cookies, optionally filtered by name or domain
- **set_cookie** — Set a cookie with name, value, and optional attributes
- **delete_cookie** — Delete a cookie by name, or delete all cookies
- **get_storage** — Read from localStorage or sessionStorage
- **set_storage** — Write a key-value pair to localStorage or sessionStorage
- **delete_storage** — Delete a key or clear all entries from localStorage/sessionStorage
- **click** — Click an element by UID from a snapshot
- **click_at** — Click at specific x/y coordinates
- **right_click** — Right-click (context menu) on an element
- **select_option** — Select an option from a dropdown by value or label
- **hover** — Hover over an element
- **fill** — Type into an input field or select from a dropdown
- **fill_form** — Fill multiple form fields at once
- **type_text** — Type text into the currently focused element
- **drag** — Drag and drop between elements or coordinates
- **press_key** — Press a key or combination (e.g., `Meta+A`, `Enter`)
- **upload_file** — Upload a file through a file input
- **inspect_viewport_meta** — Parse the viewport meta tag and validate against iOS best practices (width, zoom, viewport-fit)
- **get_safe_area_insets** — Read CSS safe-area-inset values and check whether the page handles notched devices correctly
- **check_ios_web_app_readiness** — Audit the page for Add to Home Screen / PWA readiness (apple-touch-icon, manifest, splash screens, status bar)
- **check_webkit_compatibility** — Check page CSS against the live Safari session via CSS.supports()

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "safari-devtools-mcp": {
    "command": "npx",
    "args": ["-y","safari-devtools-mcp"]
  }
}
```

## Documentation

## What the Safari DevTools MCP MCP server does

Safari DevTools MCP MCP server gives an AI coding agent access to a live Safari session on macOS. It covers browser debugging, page inspection, navigation, screenshots, and state management through MCP tools. The server is intended for Safari-specific development work, including investigating console errors, examining requests, checking rendered content, and testing behavior in a real WebKit browser.

The project exposes 45 tools. Debugging tools list and inspect console messages, capture Fetch, XHR, and resource requests, execute JavaScript, and clear collected console or network data. Page inspection tools return visible text, HTML, links, metadata, accessibility-tree snapshots, and computed CSS values. Navigation tools manage tabs, URLs, reloads, history, waits, scrolling, dialogs, and browser window size.

## How it works

The server uses WebDriver for browser capabilities that are not available through scripting alone. Accessibility-tree snapshots provide stable element UIDs for targeting elements after page updates. WebDriver-based inspection also supports request and response details, including headers, bodies, and timing, as well as element-level screenshots.

AppleScript handles Safari tab management across windows. Agents can list open pages, select a tab, open a new one, navigate, or close a tab. The server also includes session recovery that detects inactive SafariDriver sessions and reconnects transparently.

Clients that support MCP prompts can use the included workflows. These cover general Safari usage, accessibility debugging, Safari-specific WebKit issues, and performance analysis involving navigation timing, Core Web Vitals, and resource waterfalls.

## Setup and configuration

Safari DevTools MCP MCP server requires macOS, Safari with remote automation enabled, and Node.js 18 or later. Node.js 22 or newer is recommended. In Safari settings, enable the web developer features, turn on Allow Remote Automation in the Develop menu, and authorize SafariDriver with `sudo safaridriver --enable`.

The standard configuration runs the package through `npx`:

```json
{
  "mcpServers": {
    "safari-devtools": {
      "command": "npx",
      "args": ["-y", "safari-devtools-mcp@latest"]
    }
  }
}
```

The package can also be built from source with `npm install && npm run build`, then started with Node against the generated entry point. Add `--slim` to the package arguments when shorter tool descriptions are useful for context-limited models or long conversations.

## Tools and capabilities

- Inspect console logs by severity and retrieve stack traces and arguments.
- Monitor network requests and inspect complete request and response data.
- Run JavaScript in the browser and capture full-page or element screenshots.
- Read accessibility snapshots, visible page text, HTML, links, metadata, and computed styles.
- Manage Safari tabs, navigation, scrolling, waits, dialogs, and window size.
- Read, write, and delete cookies, localStorage, and sessionStorage.

## Limitations and notes

Safari DevTools MCP MCP server is restricted to macOS because Safari and SafariDriver are Apple-only. It requires a Safari session with remote automation enabled. Browser content, console output, and network traffic are exposed to the MCP client, so sensitive sites and credential entry should be avoided while a session is active.

_Full upstream README: https://allmcps.com/mcp/safari-devtools-mcp/readme_

