safari-ios-webinspector-mcp
Provides iOS device-level integration for web inspection and automation, discovering attached iPhones, enriching trusted devices with UDIDs and iOS versions, and managing the iOS WebKit bridge for Safari and Chrome sessions.
Inspects and automates Safari on iPhone, including page discovery, DOM snapshotting, runtime evaluation, and Safari/Web Inspector UI fallback for crash detection, reload attempts, and screenshots.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@safari-ios-webinspector-mcpList the open Safari pages on my iPhone."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Safari iOS Web Inspector MCP
A TypeScript MCP server for inspecting iPhone Safari and Chrome WebKit sessions from macOS.
Implemented
environment checks for macOS, Xcode,
libimobiledevice,ios_webkit_debug_proxyandsafaridriverdevice and page discovery
iOS WebKit bridge lifecycle management
managed Safari sessions through Apple
safaridrivermanaged sessions through the raw WebKit
Automationdomainruntime evaluation, DOM snapshots and page actions where the selected backend exposes them
console and network event buffering on compatible inspector sessions
crash-state checks, reload attempts, screenshots and debug-bundle export
Related MCP server: MCP Safari Server
Limits
Existing Safari tabs can be discovered, but the tested iOS WebKit transport does not expose page-domain control for them. Those sessions report
transportMode: broker_onlyinstead of accepting automation commands.safaridriverand the rawAutomationbackend create separate automation contexts; they do not adopt an already-open normal Safari tab.Console and network streaming are not available on either managed backend.
The server does not reset, restore, pair, update or otherwise control the iPhone outside the browser session.
The test suite contains 29 tests covering the protocol modes, managed sessions, DOM tools, UI fallback, recovery and debug bundles.
Install
npm install
npm run buildRun locally:
npm run devUse as an MCP server after building:
[mcp_servers.safari-ios-webinspector]
command = "node"
args = ["/absolute/path/to/dist/src/index.js"]Docs
Shakeout
Run a live-device shakeout against the connected iPhone:
npm run shakeoutCapture a raw broker trace against a healthy page:
npm run trace:brokerProbe the raw iPhone Automation shim directly:
npm run probe:automation -- --udid <DEVICE_UDID>Provenance and privacy
Device identifiers, local paths, captured pages, debug bundles, and customer or
application-specific material are not included. Research notes link to the
upstream code and documentation used during protocol investigation. Tests use
synthetic device data and example.com URLs.
License
MIT. See LICENSE. Third-party packages remain under their respective
licenses as declared in package-lock.json and their distributions.
This server cannot be deployed
Maintenance
Related MCP Connectors
remote debug iOS/Android/Unity/Godot/Flutter/RN/Web on real-device.ui-tree/screenshots/taps,tests.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Build, run, and inspect iOS apps in disposable hosted Simulators from cloud coding agents.
Automate cloud Chrome—navigate, click, type, screenshot, run code, record screen video
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables debugging and automation of native Electron applications on macOS through DOM inspection, UI automation, global hotkeys, and Chrome DevTools Protocol integration.22-
- AlicenseAqualityDmaintenanceEnables programmatic control of Safari browser on macOS for web automation, testing, and debugging via the Model Context Protocol.166 npm4MIT
- AlicenseAqualityDmaintenanceLets your coding agent control and inspect a live Safari browser on macOS. Provides access to Safari DevTools for debugging, automation, and testing.4943 npm2MIT
- AlicenseBqualityBmaintenanceLocal, multi-session MCP server driving real Chrome, Chromium, WebKit, and Safari engines, with attach-to-running-Chrome support, no API keys or cloud required.10MIT