NestDaddy

Apple Safari

io.github.mgcrea/mcp-apple-safari · v1.39.0

Read and act on Safari — history, tabs and reading list, writes off by default

Connect Runs on your machine

Terminal
claude mcp add mcp-apple-safari -e APPLE_SAFARI_ALLOW_WRITES=<APPLE_SAFARI_ALLOW_WRITES> -e APPLE_SAFARI_ALLOW_CODES=<APPLE_SAFARI_ALLOW_CODES> -e APPLE_SAFARI_ALLOW_NETWORK=<APPLE_SAFARI_ALLOW_NETWORK> -e APPLE_SAFARI_ALLOW_COOKIES=<APPLE_SAFARI_ALLOW_COOKIES> -e APPLE_SAFARI_COOKIE_HOSTS=<APPLE_SAFARI_COOKIE_HOSTS> -e APPLE_SAFARI_DOWNLOAD_DIR=<APPLE_SAFARI_DOWNLOAD_DIR> -e APPLE_SAFARI_NETWORK_CHUNK_CHARS=<APPLE_SAFARI_NETWORK_CHUNK_CHARS> -- npx -y @mgcrea/[email protected]
claude_desktop_config.json
{
  "mcpServers": {
    "mcp-apple-safari": {
      "command": "npx",
      "args": [
        "-y",
        "@mgcrea/[email protected]"
      ],
      "env": {
        "APPLE_SAFARI_ALLOW_WRITES": "<APPLE_SAFARI_ALLOW_WRITES>",
        "APPLE_SAFARI_ALLOW_CODES": "<APPLE_SAFARI_ALLOW_CODES>",
        "APPLE_SAFARI_ALLOW_NETWORK": "<APPLE_SAFARI_ALLOW_NETWORK>",
        "APPLE_SAFARI_ALLOW_COOKIES": "<APPLE_SAFARI_ALLOW_COOKIES>",
        "APPLE_SAFARI_COOKIE_HOSTS": "<APPLE_SAFARI_COOKIE_HOSTS>",
        "APPLE_SAFARI_DOWNLOAD_DIR": "<APPLE_SAFARI_DOWNLOAD_DIR>",
        "APPLE_SAFARI_NETWORK_CHUNK_CHARS": "<APPLE_SAFARI_NETWORK_CHUNK_CHARS>"
      }
    }
  }
}
~/.cursor/mcp.json
{
  "mcpServers": {
    "mcp-apple-safari": {
      "command": "npx",
      "args": [
        "-y",
        "@mgcrea/[email protected]"
      ],
      "env": {
        "APPLE_SAFARI_ALLOW_WRITES": "<APPLE_SAFARI_ALLOW_WRITES>",
        "APPLE_SAFARI_ALLOW_CODES": "<APPLE_SAFARI_ALLOW_CODES>",
        "APPLE_SAFARI_ALLOW_NETWORK": "<APPLE_SAFARI_ALLOW_NETWORK>",
        "APPLE_SAFARI_ALLOW_COOKIES": "<APPLE_SAFARI_ALLOW_COOKIES>",
        "APPLE_SAFARI_COOKIE_HOSTS": "<APPLE_SAFARI_COOKIE_HOSTS>",
        "APPLE_SAFARI_DOWNLOAD_DIR": "<APPLE_SAFARI_DOWNLOAD_DIR>",
        "APPLE_SAFARI_NETWORK_CHUNK_CHARS": "<APPLE_SAFARI_NETWORK_CHUNK_CHARS>"
      }
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "mcp-apple-safari": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mgcrea/[email protected]"
      ],
      "env": {
        "APPLE_SAFARI_ALLOW_WRITES": "<APPLE_SAFARI_ALLOW_WRITES>",
        "APPLE_SAFARI_ALLOW_CODES": "<APPLE_SAFARI_ALLOW_CODES>",
        "APPLE_SAFARI_ALLOW_NETWORK": "<APPLE_SAFARI_ALLOW_NETWORK>",
        "APPLE_SAFARI_ALLOW_COOKIES": "<APPLE_SAFARI_ALLOW_COOKIES>",
        "APPLE_SAFARI_COOKIE_HOSTS": "<APPLE_SAFARI_COOKIE_HOSTS>",
        "APPLE_SAFARI_DOWNLOAD_DIR": "<APPLE_SAFARI_DOWNLOAD_DIR>",
        "APPLE_SAFARI_NETWORK_CHUNK_CHARS": "<APPLE_SAFARI_NETWORK_CHUNK_CHARS>"
      }
    }
  }
}

Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.

Tools

This server runs locally, so its tools are listed by your MCP client once it starts.

Environment variables

NameDescription
APPLE_SAFARI_ALLOW_WRITES
Optional
Register 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_CODES
Optional
Return 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_NETWORK
Optional
Register 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. Reload…
APPLE_SAFARI_ALLOW_COOKIES
Optional
Register 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_SAF…
APPLE_SAFARI_COOKIE_HOSTS
Optional
Comma-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_DIR
Optional
Where 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_CHARS
Optional
Characters 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.

Details

Package@mgcrea/[email protected] (NPM, stdio)
First published12 Nov 2026
Last updated12 Nov 2026
Registry nameio.github.mgcrea/mcp-apple-safari

More other servers See all

Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.