Browser Use MCP Server
Lets an assistant drive a browser with Puppeteer: navigate, click, fill forms, read pages, take screenshots.
Drives the Safari you already use on a Mac, with your logins, through AppleScript and an optional extension
By אחיה אוטומציה (individual) TypeScript Local · stdio Browser automation
59 popularity score ★ 239 ↓ 710/wk
Opens the app, which asks before it adds the server.
claude mcp add safari -- npx safari-mcp{
"mcpServers": {
"safari": {
"command": "npx",
"args": [
"safari-mcp"
]
}
}
}{
"mcpServers": {
"safari": {
"command": "npx",
"args": [
"safari-mcp"
]
}
}
}{
"servers": {
"safari": {
"type": "stdio",
"command": "npx",
"args": [
"safari-mcp"
]
}
}
}[mcp_servers.safari]
command = "npx"
args = ["safari-mcp"]gemini mcp add --scope user safari npx -- safari-mcpSAFARI_MCP_ALLOW_USER_TABS |
Optional: Set to 1 to let safari_switch_tab adopt a tab you opened; off by default. |
|---|---|
MCP_MAX_TABS |
Optional: Tabs one session may keep open before its oldest is closed; default 6. |
SAFARI_PROFILE |
Optional: Bind sessions to a named Safari profile; unset uses your ordinary windows. |
SAFARI_MCP_HTTP |
Optional: Set to 1 to run one shared HTTP daemon for several clients instead of stdio. |
SAFARI_MCP_HTTP_PORT |
Optional: Port of that daemon; default 9225. |
SAFARI_MCP_RAISE_ON_NAVIGATE |
Optional: Set to 1 to bring Safari to the front on navigation; off by default. |
SAFARI_MCP_SCREENSHOT_MAX_WIDTH |
Optional: Downscale screenshots to this pixel width. |
MCP_WEBKIT_LIMIT_MB |
Optional: WebKit memory in MB above which the oldest server tabs are closed; default 3000 (in the code, not the README). |
SAFARI_MCP_NO_AUTO_UPGRADE |
Optional: Set to 1 to stop the server reloading an outdated extension worker (in the code, not the README). |
Safari MCP is a local Node.js server that controls the desktop Safari browser on macOS. Instead of starting a separate Chromium or a headless engine, it works in your ordinary Safari windows, so pages open with the cookies and signed-in sessions you already have. It talks to Safari through AppleScript plus a long-running Swift helper, and, when you build and enable it, a Safari extension that reaches closed Shadow DOM, pages with strict Content Security Policy and deeper React or Vue state. Without the extension its makers estimate about 80% of the tools still work.
The 98 tools cover navigation, page reading, clicking and form filling (including react-select widgets and code editors such as Monaco), screenshots and PDF export, tab handling, running JavaScript, an accessibility snapshot with element refs, cookies and local, session and IndexedDB storage, network capture and mocking, console capture, device emulation, data extraction and a few iOS Safari checks. Four native_ tools send OS-level mouse and keyboard events for sites that ignore script-made clicks.
By default a session only acts on tabs it opened itself and refuses to touch yours; SAFARI_MCP_ALLOW_USER_TABS=1 lets safari_switch_tab adopt a tab you name, and safari_close_tab still refuses those. Each session keeps at most 6 tabs (MCP_MAX_TABS) and closes its oldest one when it opens another. The code at v2.22.17 also watches total WebKit memory: past 3000 MB (MCP_WEBKIT_LIMIT_MB, a setting the README does not list) it closes up to two of the oldest tabs the server opened, and logs a warning at 70% of that figure. Several agents can share one Safari through an HTTP daemon (SAFARI_MCP_HTTP=1) that gives each session its own tab state.
| Runtime | Node.js 20+ |
|---|
macOS with stable Safari (not Safari Technology Preview) and Node.js 20 or later for npx. In Safari, turn on Show features for web developers and Allow JavaScript from Apple Events. Grant Automation → Safari to the app that launches the server (Terminal, VS Code and so on); Screen Recording for screenshots without the extension and for safari_save_pdf; Accessibility for the bundled safari-helper to use the safari_native_* tools and safari_save_pdf. The optional extension must be built from the git repository with Xcode and an Apple ID; it is not in the npm package.
macOS and Safari only; Safari Technology Preview is never addressed, and private windows are not a supported mode. Without the extension, closed Shadow DOM is invisible and strict-CSP sites often block it; with only the extension, dialogs, native clicks and PDF export still need AppleScript. The extension needs Safari's Allow unsigned extensions setting, which resets every time Safari restarts. After an npm update macOS may revoke the Automation grant, which then has to be given again. Tools refuse tabs the session did not open unless SAFARI_MCP_ALLOW_USER_TABS is set. Clients that multiplex agents through one MCP client (mcporter) defeat per-session tab isolation.
Suits Mac users who want an assistant to work in websites they are already signed into, in the background, without running a second browser. It writes as well as reads (forms, cookies, storage, clicks), so it fits work you would otherwise do by hand in Safari. Pick something else on Linux or Windows, for a clean throwaway browser session, or for Chromium-specific audits: its own README points to Chrome DevTools MCP for Lighthouse and performance audits, and to Apple's safaridriver --mcp (Safari 27+) for an isolated WebDriver session.
safari_navigatesafari_go_backsafari_reloadsafari_read_pagesafari_get_sourcesafari_navigate_and_readsafari_snapshotsafari_clicksafari_click_and_readsafari_hoversafari_fillsafari_fill_formsafari_fill_and_submitsafari_select_optionsafari_type_textsafari_press_keysafari_react_select_setsafari_replace_editorsafari_screenshotsafari_screenshot_elementsafari_save_pdfsafari_scrollsafari_list_tabssafari_new_tabsafari_close_tabsafari_switch_tabsafari_wait_for_new_tabsafari_wait_forsafari_evaluatesafari_eval_filesafari_list_framessafari_get_elementsafari_query_allsafari_detect_formssafari_dragsafari_upload_filesafari_paste_imagesafari_handle_dialogsafari_emulatesafari_get_cookiessafari_set_cookiesafari_delete_cookiessafari_local_storagesafari_set_local_storagesafari_export_storagesafari_import_storagesafari_get_indexed_dbsafari_clipboard_readsafari_clipboard_writesafari_start_network_capturesafari_network_detailssafari_mock_routesafari_get_consolesafari_performance_metricssafari_throttle_networksafari_extract_tablessafari_extract_linkssafari_run_scriptsafari_native_clicksafari_doctor