safari-mcp 2.16.2 → 2.16.3
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 +10 -8
- package/extension/background.js +637 -145
- package/extension/command-content.js +195 -0
- package/extension/manifest.json +24 -17
- package/index.js +210 -48
- package/ownership-state.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -568,7 +568,7 @@ Safari MCP runs locally on your Mac with minimal attack surface:
|
|
|
568
568
|
| Network | **No remote connections** — all communication is local (stdio + localhost) |
|
|
569
569
|
| Permissions | macOS system permissions required (Screen Recording for screenshots) |
|
|
570
570
|
| Data | No telemetry, no analytics, no data sent anywhere |
|
|
571
|
-
| Extension | Communicates only with `localhost:9224
|
|
571
|
+
| Extension | Communicates only with the local profile bridges (`localhost:9224/9228/9232/9236`), validated by Safari |
|
|
572
572
|
| Code | Fully open source (MIT) — audit every line |
|
|
573
573
|
|
|
574
574
|
---
|
|
@@ -698,23 +698,25 @@ The extension requires a one-time build with Xcode (free, included with macOS).
|
|
|
698
698
|
git clone https://github.com/achiya-automation/safari-mcp.git
|
|
699
699
|
cd safari-mcp
|
|
700
700
|
|
|
701
|
-
# 2. Build
|
|
701
|
+
# 2. Build a clean, Apple Development-signed app
|
|
702
|
+
# If needed, first choose your Team in Xcode → Signing & Capabilities.
|
|
702
703
|
xcodebuild -project "xcode/Safari MCP/Safari MCP.xcodeproj" \
|
|
703
|
-
-scheme "Safari MCP (macOS)" -configuration Release
|
|
704
|
+
-scheme "Safari MCP (macOS)" -configuration Release \
|
|
705
|
+
-allowProvisioningUpdates clean build
|
|
704
706
|
|
|
705
|
-
# 3.
|
|
706
|
-
# (xcodebuild without a signing identity produces a bundle Safari silently rejects)
|
|
707
|
+
# 3. Locate the signed app
|
|
707
708
|
APP_PATH=$(find ~/Library/Developer/Xcode/DerivedData/Safari_MCP-*/Build/Products/Release -name "Safari MCP.app" -maxdepth 2 | head -1)
|
|
708
|
-
codesign --sign - --force --deep "$APP_PATH"
|
|
709
709
|
|
|
710
710
|
# 4. Re-sign safari-helper with the Apple Events entitlement
|
|
711
711
|
# (helps macOS surface the TCC Automation prompt reliably)
|
|
712
712
|
codesign --sign - --force --entitlements safari-helper.entitlements safari-helper
|
|
713
713
|
|
|
714
|
-
#
|
|
714
|
+
# 5. Open the app (needed once so Safari registers the extension)
|
|
715
715
|
open "$APP_PATH"
|
|
716
716
|
```
|
|
717
717
|
|
|
718
|
+
> **Do not ad-hoc re-sign `Safari MCP.app` with `codesign --deep --sign -`.** That replaces the Apple Development identity on the wrapper and embedded extension; current Safari can then silently disable or mark the extension as removed. If a previous build was ad-hoc signed, run the `clean build` command above again.
|
|
719
|
+
|
|
718
720
|
Alternatively, open `xcode/Safari MCP/Safari MCP.xcodeproj` directly in Xcode, select your Apple ID under Signing & Capabilities, and click Run. A free personal Apple Developer account is sufficient for local use.
|
|
719
721
|
|
|
720
722
|
Then in Safari:
|
|
@@ -722,7 +724,7 @@ Then in Safari:
|
|
|
722
724
|
2. Safari → Develop → **Allow Unsigned Extensions** (required each Safari restart)
|
|
723
725
|
3. Safari → Settings → Extensions → enable **Safari MCP Bridge**
|
|
724
726
|
|
|
725
|
-
The extension connects automatically to the
|
|
727
|
+
The extension connects automatically to the first local bridge whose declared Safari profile matches its own. The default bridge ports are `9224`, `9228`, `9232`, and `9236`; a single-profile setup normally uses `9224`.
|
|
726
728
|
|
|
727
729
|
> **Note:** "Allow Unsigned Extensions" resets every time Safari restarts. You'll need to re-enable it in the Develop menu after each restart. The extension itself stays installed.
|
|
728
730
|
|