safari-mcp 2.13.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
 
3
- <img src="social-preview.png" alt="Safari MCP Server — 80 native browser automation tools for AI agents on macOS" width="100%">
3
+ <img src="social-preview.png" alt="Safari MCP Server — 96 native browser automation tools for AI agents on macOS" width="100%">
4
4
 
5
5
  <br/>
6
6
 
@@ -24,9 +24,9 @@
24
24
  <a href="https://insiders.vscode.dev/redirect?url=vscode-insiders:mcp/install?%7B%22safari-mcp%22%3A%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22safari-mcp%22%5D%7D%7D"><img src="https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?logo=visual-studio-code&logoColor=white" alt="Install in VS Code Insiders"></a>
25
25
  <a href="cursor://anysphere.cursor-deeplink/mcp/install?name=safari-mcp&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22safari-mcp%22%5D%7D"><img src="https://img.shields.io/badge/Cursor-Install_Server-f97316?logo=cursor&logoColor=white" alt="Install in Cursor"></a>
26
26
 
27
- **80 tools** · **No Chrome/Puppeteer/Playwright needed** · **~5ms per command** · **60% less CPU than Chrome**
27
+ **96 tools** · **No Chrome/Puppeteer/Playwright needed** · **~5ms per command** · **60% less CPU than Chrome**
28
28
 
29
- [Quick Start](#quick-start) · [All 80 Tools](#tools-80) · [Examples](examples/) · [Why Safari MCP?](#safari-mcp-vs-alternatives) · [Architecture](#architecture) · [Changelog](CHANGELOG.md)
29
+ [Quick Start](#quick-start) · [All 96 Tools](#tools-96) · [Examples](examples/) · [Why Safari MCP?](#safari-mcp-vs-alternatives) · [Architecture](#architecture) · [Changelog](CHANGELOG.md)
30
30
 
31
31
  ![Safari MCP Demo](https://github.com/achiya-automation/safari-mcp/raw/main/assets/safari-mcp-promo.gif)
32
32
 
@@ -44,15 +44,17 @@ Your AI agent needs to browse. So it either:
44
44
 
45
45
  Your AI drives the **Safari you're already logged into** — Gmail, GitHub, Ahrefs, Slack, banking.
46
46
 
47
- Native WebKit. ~60% less CPU. Background operation. 80 tools. One `npx` command. macOS only.
47
+ Native WebKit. ~60% less CPU. Background operation. 96 tools. One `npx` command. macOS only.
48
48
 
49
49
  > 📰 **Featured on freeCodeCamp:** [How to Connect Your AI Coding Agent to a Browser on macOS](https://www.freecodecamp.org/news/how-to-connect-your-ai-coding-agent-to-a-browser-on-macos/) · [HackerNoon: Reverse-Engineering React, Shadow DOM, and CSP](https://hackernoon.com/i-had-to-reverse-engineer-react-shadow-dom-and-csp-to-automate-safari-without-chrome)
50
50
 
51
+ > 🍎 **Apple shipped an official Safari MCP** (Safari Technology Preview 247, July 2026). It's built on `safaridriver` for isolated debugging sessions. safari-mcp drives the **real Safari you're already logged into** — on stable Safari, with 96 tools. See the full comparison below.
52
+
51
53
  ---
52
54
 
53
55
  ## Highlights
54
56
 
55
- - **80 tools** — navigation, clicks, forms, screenshots, network, storage, accessibility, and more
57
+ - **96 tools** — navigation, clicks, forms, screenshots, network, storage, accessibility, and more
56
58
  - **Zero heat** — native WebKit on Apple Silicon, ~60% less CPU than Chrome
57
59
  - **Your real browser** — keeps all logins, cookies, sessions (Gmail, GitHub, Ahrefs, etc.)
58
60
  - **Background operation** — Safari stays in the background, no window stealing
@@ -302,7 +304,7 @@ The recommended pattern for AI agents using Safari MCP:
302
304
 
303
305
  ---
304
306
 
305
- ## Tools (80)
307
+ ## Tools (96)
306
308
 
307
309
  <details>
308
310
  <summary><b>Click to expand the full tool list — organized by category</b></summary>
@@ -322,7 +324,7 @@ The recommended pattern for AI agents using Safari MCP:
322
324
  | `safari_get_source` | Get full HTML source |
323
325
  | `safari_navigate_and_read` | Navigate + read in one call |
324
326
 
325
- ### Click & Interaction (5)
327
+ ### Click & Interaction (6)
326
328
  | Tool | Description |
327
329
  |------|-------------|
328
330
  | `safari_click` | Click by CSS selector, visible text, or coordinates |
@@ -330,8 +332,9 @@ The recommended pattern for AI agents using Safari MCP:
330
332
  | `safari_right_click` | Right-click (context menu) |
331
333
  | `safari_hover` | Hover over element |
332
334
  | `safari_click_and_wait` | Click + wait for navigation |
335
+ | `safari_click_and_read` | Click then return the updated page — saves a round-trip (React Router + full loads) |
333
336
 
334
- ### Form Input (7)
337
+ ### Form Input (11)
335
338
  | Tool | Description |
336
339
  |------|-------------|
337
340
  | `safari_fill` | Fill input (React/Vue/Angular compatible) |
@@ -341,6 +344,10 @@ The recommended pattern for AI agents using Safari MCP:
341
344
  | `safari_fill_and_submit` | Fill form + submit in one call |
342
345
  | `safari_type_text` | Type real keystrokes (JS-based, no System Events) |
343
346
  | `safari_press_key` | Press key with modifiers |
347
+ | `safari_react_select_set` | Set a react-select v5 value via React fiber — bypasses the menu UI |
348
+ | `safari_react_select_list_options` | List a react-select v5 dropdown's options without opening it |
349
+ | `safari_replace_editor` | Replace all content in a code editor (Monaco, CodeMirror, Ace, ProseMirror) |
350
+ | `safari_verify_state` | Verify an editor's framework-level state matches expected — catch stale DOM before Submit |
344
351
 
345
352
  ### Screenshots & PDF (3)
346
353
  | Tool | Description |
@@ -356,13 +363,14 @@ The recommended pattern for AI agents using Safari MCP:
356
363
  | `safari_scroll_to` | Scroll to exact position |
357
364
  | `safari_scroll_to_element` | Smooth scroll to element |
358
365
 
359
- ### Tab Management (4)
366
+ ### Tab Management (5)
360
367
  | Tool | Description |
361
368
  |------|-------------|
362
369
  | `safari_list_tabs` | List all tabs (index, title, URL) |
363
370
  | `safari_new_tab` | Open new tab (background, no focus steal) |
364
371
  | `safari_close_tab` | Close tab |
365
372
  | `safari_switch_tab` | Switch to tab by index |
373
+ | `safari_wait_for_new_tab` | Wait for a new tab (e.g. OAuth popup) and auto-switch to it |
366
374
 
367
375
  ### Wait (2)
368
376
  | Tool | Description |
@@ -383,10 +391,11 @@ The recommended pattern for AI agents using Safari MCP:
383
391
  | `safari_get_computed_style` | Computed CSS styles |
384
392
  | `safari_detect_forms` | Auto-detect all forms with field selectors |
385
393
 
386
- ### Accessibility (1)
394
+ ### Accessibility (2)
387
395
  | Tool | Description |
388
396
  |------|-------------|
389
397
  | `safari_accessibility_snapshot` | Full a11y tree: roles, ARIA, focusable elements |
398
+ | `safari_snapshot` | Accessibility tree with ref IDs for every interactive element — preferred way to see page state |
390
399
 
391
400
  ### Drag & Drop (1)
392
401
  | Tool | Description |
@@ -411,7 +420,7 @@ The recommended pattern for AI agents using Safari MCP:
411
420
  | `safari_emulate` | Emulate device (iPhone, iPad, Pixel, Galaxy) |
412
421
  | `safari_reset_emulation` | Reset to desktop |
413
422
 
414
- ### Cookies & Storage (10)
423
+ ### Cookies & Storage (11)
415
424
  | Tool | Description |
416
425
  |------|-------------|
417
426
  | `safari_get_cookies` | Get all cookies |
@@ -464,7 +473,7 @@ The recommended pattern for AI agents using Safari MCP:
464
473
  | `safari_extract_images` | Images with dimensions and loading info |
465
474
  | `safari_extract_links` | Links with rel, external/nofollow detection |
466
475
 
467
- ### Advanced (5)
476
+ ### Advanced (7)
468
477
  | Tool | Description |
469
478
  |------|-------------|
470
479
  | `safari_override_geolocation` | Override browser geolocation |
@@ -472,12 +481,30 @@ The recommended pattern for AI agents using Safari MCP:
472
481
  | `safari_get_indexed_db` | Read IndexedDB records |
473
482
  | `safari_css_coverage` | Find unused CSS rules |
474
483
  | `safari_analyze_page` | Full page analysis in one call |
484
+ | `safari_doctor` | Diagnose the macOS permission + daemon chain (Apple Events, Accessibility, Screen Recording, codesign) with per-failure fixes |
485
+ | `safari_reload_extension` | Hot-reload the Safari MCP Bridge extension without a manual toggle |
475
486
 
476
487
  ### Automation (1)
477
488
  | Tool | Description |
478
489
  |------|-------------|
479
490
  | `safari_run_script` | Run multiple actions in a single call (batch) |
480
491
 
492
+ ### Native Input — CGEvent (4)
493
+ | Tool | Description |
494
+ |------|-------------|
495
+ | `safari_native_click` | OS-level mouse click (CGEvent, `isTrusted: true`) — bypasses WAF/bot detection when `safari_click` is blocked (405/403) |
496
+ | `safari_native_hover` | OS-level cursor hover — triggers real `:hover`/`mouseenter` for tooltips and obfuscated UIs |
497
+ | `safari_native_type` | Insert text via the real paste pipeline — ProseMirror/Slate/Draft.js process it natively so Submit sends real data |
498
+ | `safari_native_keyboard` | OS-level keypress + modifiers to Safari, no focus steal — reaches React trust-gated handlers (Discord/Slack send) |
499
+
500
+ ### iOS & WebKit Validation (4)
501
+ | Tool | Description |
502
+ |------|-------------|
503
+ | `safari_inspect_viewport` | Validate the `<meta name=viewport>` tag for iOS Safari (device-width, zoom/WCAG, viewport-fit) |
504
+ | `safari_safe_area_insets` | Read live safe-area-inset values + viewport-fit / `env()` usage (notch / Dynamic Island) |
505
+ | `safari_check_pwa` | Audit iOS "Add to Home Screen" / PWA readiness (apple-touch-icon, manifest, theme-color, splash) |
506
+ | `safari_webkit_compat` | Check page CSS against this Safari via `CSS.supports()` — unsupported props, missing `-webkit-` prefixes, known quirks |
507
+
481
508
  </details>
482
509
 
483
510
  ---
@@ -504,7 +531,7 @@ Safari MCP runs locally on your Mac with minimal attack surface:
504
531
  | Your logins | ✅ Yes | ✅ Yes | ❌ No |
505
532
  | macOS native | ✅ WebKit | ❌ Chromium | ❌ Chromium/WebKit |
506
533
  | Browser dependencies | None | Chrome + debug port | Playwright runtime |
507
- | Tools | 80 | ~30 | ~25 |
534
+ | Tools | 96 | ~30 | ~25 |
508
535
  | File upload | JS (no dialog) | CDP | Playwright API |
509
536
  | Image paste | JS (no clipboard) | CDP | Playwright API |
510
537
  | Focus steal | ❌ Background | ❌ Background | ❌ Headless |
@@ -514,13 +541,31 @@ Safari MCP runs locally on your Mac with minimal attack surface:
514
541
 
515
542
  > **Tip:** Use Safari MCP for daily browsing tasks (95% of work) and Chrome DevTools MCP only for Lighthouse/Performance audits.
516
543
 
544
+ ### vs Apple's Official Safari MCP (safaridriver)
545
+
546
+ In Safari Technology Preview 247 (July 2026), Apple shipped an **official** Safari MCP server built on `safaridriver`. That's great validation for the category — and it's built for a different job. Apple's server drives an **isolated WebDriver automation session** for debugging; safari-mcp drives the **real Safari you're already logged into**.
547
+
548
+ | | 🦁 safari-mcp *(this repo)* | Apple `safaridriver --mcp` |
549
+ |---|:---:|:---:|
550
+ | **Your real logins / cookies** | ✅ Your actual Safari | ⚠️ Isolated automation session — no access to AutoFill or browsing activity |
551
+ | **Runs on** | ✅ Stable Safari, every Mac | ❌ Safari Technology Preview 247 only |
552
+ | **Background (no focus steal)** | ✅ Yes | ❌ Dedicated window with a "controlled by automation" banner |
553
+ | **Tools** | **96** | ~17 |
554
+ | **Storage** (cookies, localStorage, IndexedDB) | ✅ 10 tools | ❌ |
555
+ | **Network mocking + throttling** | ✅ Yes | ❌ Read-only network inspection |
556
+ | **Device emulation** (iPhone, iPad) | ✅ Yes | ⚠️ Viewport + media type only |
557
+ | **Setup** | `npx safari-mcp` | Enable "remote automation and external agents" in STP |
558
+ | **Official Apple support** | ❌ Community (MIT) | ✅ Apple, WebDriver-standard |
559
+
560
+ > **When Apple's server is the right pick:** you specifically want a clean-room, WebDriver-standard session for compatibility debugging and you already run STP. **For everything else — daily automation on the browser you're already signed into, on stable Safari — safari-mcp is built for exactly that.**
561
+
517
562
  ### Why Safari MCP and Not the Other Safari MCP Projects?
518
563
 
519
564
  There are several "safari-mcp" projects floating around. Here's how they compare:
520
565
 
521
566
  | Feature | **🦁 safari-mcp** *(this repo)* | [lxman/safari-mcp-server](https://github.com/lxman/safari-mcp-server) | [Epistates/MCPSafari](https://github.com/Epistates/MCPSafari) | [HayoDev/safari-devtools-mcp](https://github.com/HayoDev/safari-devtools-mcp) |
522
567
  |---------|:------------------------------:|:----------------------:|:------------:|:----------------------:|
523
- | **Tools** | **80** | ~10 | 23 | ~15 |
568
+ | **Tools** | **96** | ~10 | 23 | ~15 |
524
569
  | **Install** | `npx safari-mcp` | Manual | Binary | `npx` |
525
570
  | **Engine** | **Dual** (Extension + AppleScript) | WebDriver | Extension only | DevTools Protocol |
526
571
  | **Keeps your real Safari logins** | ✅ Yes | ⚠️ Limited | ✅ Yes | ❌ Debug session |
@@ -787,7 +832,7 @@ If Safari MCP saves you from Chrome overhead, **a star helps others discover it:
787
832
 
788
833
  [![Star this repo](https://img.shields.io/github/stars/achiya-automation/safari-mcp?style=social)](https://github.com/achiya-automation/safari-mcp)
789
834
 
790
- [Share on Twitter/X](https://twitter.com/intent/tweet?text=Safari%20MCP%20%E2%80%94%20Stop%20running%20Chrome%20just%20so%20your%20AI%20agent%20can%20browse.%2080%20tools%2C%20native%20Safari%2C%2060%25%20less%20CPU.&url=https%3A%2F%2Fgithub.com%2Fachiya-automation%2Fsafari-mcp) · [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Fachiya-automation%2Fsafari-mcp) · [Write about it](https://dev.to/)
835
+ [Share on Twitter/X](https://twitter.com/intent/tweet?text=Safari%20MCP%20%E2%80%94%20Stop%20running%20Chrome%20just%20so%20your%20AI%20agent%20can%20browse.%2096%20tools%2C%20native%20Safari%2C%2060%25%20less%20CPU.&url=https%3A%2F%2Fgithub.com%2Fachiya-automation%2Fsafari-mcp) · [Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fgithub.com%2Fachiya-automation%2Fsafari-mcp) · [Write about it](https://dev.to/)
791
836
 
792
837
  [![Star History Chart](https://api.star-history.com/svg?repos=achiya-automation/safari-mcp&type=Date)](https://star-history.com/#achiya-automation/safari-mcp&Date)
793
838
 
package/glama.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://glama.ai/mcp/schemas/server.json",
3
3
  "name": "Safari MCP Server",
4
- "description": "Native Safari browser automation for AI agents. 80+ tools via AppleScript — zero overhead, keeps logins, runs silently in background.",
4
+ "description": "Native Safari browser automation for AI agents. 96 tools via AppleScript — zero overhead, keeps logins, runs silently in background.",
5
5
  "repository": "https://github.com/achiya-automation/safari-mcp",
6
6
  "homepage": "https://github.com/achiya-automation/safari-mcp",
7
7
  "author": "achiya-automation",