Apple Safari
Let an agent read Safari history, tabs and reading list, with writes switched off
- Pricing
- Open source
- Platforms
- macOS, CLI
- Runs
- Locally
- Version
- 1.39.0
- Listing updated
- 2 days ago
About Apple Safari
Apple Safari is an open-source MCP server for browser automation. It runs locally on your machine and is started by your AI client.
Safari access is split into three lanes that see different things. File access (Full Disk Access) reads the past: history, bookmarks and the Reading List. Apple Events (an Automation grant) lists the tabs open now. A Safari extension reads page text and elements, needs no system grant, and is allowed one website at a time.
Risky capabilities are separate opt-in gates. Write tools are not even registered unless APPLE_SAFARI_ALLOW_WRITES is set, so an agent never sees them. Reading one-time codes, recording page network traffic, and reading cookies each have their own switch, and cookies are readable only for domains listed in APPLE_SAFARI_COOKIE_HOSTS. Credential fields stay redacted.
It ships as the @mgcrea/mcp-apple-safari npm package, part of the unofficial, MIT-licensed Cupertino bundle for macOS 26 or later.
Install
Run in a terminal
claude mcp add mcp-apple-safari -- npx -y @mgcrea/mcp-apple-safariAdd to claude_desktop_config.json
{
"mcpServers": {
"mcp-apple-safari": {
"command": "npx",
"args": [
"-y",
"@mgcrea/mcp-apple-safari"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-apple-safari": {
"command": "npx",
"args": [
"-y",
"@mgcrea/mcp-apple-safari"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"mcp-apple-safari": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mgcrea/mcp-apple-safari"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-apple-safari": {
"command": "npx",
"args": [
"-y",
"@mgcrea/mcp-apple-safari"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"mcp-apple-safari": {
"command": "npx",
"args": [
"-y",
"@mgcrea/mcp-apple-safari"
]
}
}
}Configuration
APPLE_SAFARI_ALLOW_WRITESRegister the mutating tools. Off by default, and the gate decides whether the write tools exist at all rather than merely refusing — an agent with writes off cannot see them.APPLE_SAFARI_ALLOW_CODESReturn one-time codes: a one-time-code field in apple_safari_page_elements, and apple_safari_find_codes for a code a page shows as text. Its own gate rather than allowWrites, because it is a read. Credential fields stay redacted whatever this says.APPLE_SAFARI_ALLOW_NETWORKRegister apple_safari_network_record, _list and _get, which record what a page you allowed the extension on fetches and read the responses. Its own gate rather than allowWrites, because it is a read; off means the tools do not exist. Headers named like credentials are masked, bodies are not. Reloading a tab to record and saving a body to a file still need APPLE_SAFARI_ALLOW_WRITES.APPLE_SAFARI_ALLOW_COOKIESRegister apple_safari_cookies, which lists the cookies Safari would send to an open page, HttpOnly ones included, through the extension's cookies permission. Its own gate rather than allowWrites, because it is a read; off means the tool does not exist. Not enough on its own: only sites in APPLE_SAFARI_COOKIE_HOSTS are readable. Values never come back inline; saveAs writes named ones to a 0600 file and needs APPLE_SAFARI_ALLOW_WRITES.APPLE_SAFARI_COOKIE_HOSTSComma-separated registrable domains whose cookies apple_safari_cookies may read, like "yahoo.com"; each covers the domain and its subdomains. Empty, the default, means no site is readable. An entry with no dot is ignored.APPLE_SAFARI_DOWNLOAD_DIRWhere saveAs writes a file, for apple_safari_network_get and apple_safari_cookies. Defaults to ~/Downloads. A name is kept to its basename and an existing file is never replaced unless asked.APPLE_SAFARI_NETWORK_CHUNK_CHARSCharacters of a body the server asks the page for per command when it reads a large body. Defaults to 262144, which was measured to work; how far above that Safari's native-message channel goes is unmeasured.
Tools this server provides (9)
Taken from the project documentation; the running server may differ.
- apple_safari_search_history
- Search history by text or date range, with visit counts.
- apple_safari_get_page
- Fetch one history item by reference.
- apple_safari_list_tabs
- List tabs open now.
- apple_safari_list_bookmarks
- Return the bookmark tree.
- apple_safari_list_reading_list
- List saved items and which are unread.
- apple_safari_read_page
- Return a captured page as text or HTML.
- apple_safari_page_elements
- List what is clickable or typeable on a live page.
- apple_safari_wait_for
- Wait for text to appear on or leave a page.
- apple_safari_diagnostics
- Report which access lanes work.
What it does
- Three access lanes
- History files, Apple Events and a per-site extension.
- Writes off by default
- Mutating tools are not registered until you enable them.
- Opt-in code reading
- One-time codes shown on a page need their own switch.
- Network recording
- Lists what a page fetched, with credential headers masked.
- Cookie allowlist
- Cookies are readable only for domains you name.
- Diagnostics tool
- Reports which lanes work and why one does not.
Good for
- Find a page you visited last week
- See which tabs are open before a task
- Check what is unread in the Reading List
- Read the text of the page in front of you
Pricing
Open source
MIT servers; the Cupertino menu-bar app has a 30-minute trial and 30-day refund, price not published
Prices change. Check cupertino.mgcrea.io before you buy.
Apple Safari FAQ
What macOS version is needed?
The Cupertino site says macOS 26 or later.
Can the agent change Safari?
Only if you turn on APPLE_SAFARI_ALLOW_WRITES.
Is it from Apple?
No, it is unofficial and not affiliated with Apple.
How do I install it?
Run it with npx -y @mgcrea/mcp-apple-safari in your MCP client config.
Is Apple Safari free?
Yes. Apple Safari is open source, so you can use and self-host it for free.
How do I add Apple Safari to Claude Code?
Run this command in your terminal: claude mcp add mcp-apple-safari -- npx -y @mgcrea/mcp-apple-safari
What are the best alternatives to Apple Safari?
The closest alternatives to Apple Safari are Browser Use, Scrapling MCP Server, Ha MCP, Concord MCP and Oya Browser.
Alternatives to Apple Safari

Browser Use
MCP serverBrowser agents and cloud browsers for AI, with an MCP server for web tasks
- 7 tools
- Remote
- Freemium
- 121K GitHub stars
- Browser automation

Scrapling MCP Server
MCP serverMCP server for AI clients to scrape sites with HTTP and stealth browser sessions
Runs locally- 17 tools
- Open source
- 104K GitHub stars
- Web search and scraping

Ha MCP
MCP serverMCP server for managing and automating Home Assistant from AI assistants
Runs locally- 8 tools
- Open source
- 7.9K GitHub stars
- Productivity

Concord MCP
MCP serverLocal-first MCP server for messaging and shared work-state between coding agents
Runs locally- Freemium
- 1.3K GitHub stars
- Developer tools

Oya Browser
MCP serverHIPAA-oriented agentic browser with replayable playbooks, reachable over MCP
- 32 tools
- Remote
- Freemium
- 349 GitHub stars
- Browser automation
Mantis
MCP serverBrowser MCP server that gives agents numbered text pages instead of screenshots
Runs locally- 1 tool
- Open source
- 5 Hacker News points
- Browser automation