Skip to content
VS Code

Apple Safari for VS Code

io.github.mgcrea/mcp-apple-safari

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

client:VS Code transport:stdio runtime:npm

Install Apple Safari in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "apple-safari-allow-writes",
      "description": "APPLE_SAFARI_ALLOW_WRITES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "apple-safari-allow-codes",
      "description": "APPLE_SAFARI_ALLOW_CODES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "apple-safari-allow-network",
      "description": "APPLE_SAFARI_ALLOW_NETWORK",
      "password": true
    },
    {
      "type": "promptString",
      "id": "apple-safari-allow-cookies",
      "description": "APPLE_SAFARI_ALLOW_COOKIES",
      "password": true
    },
    {
      "type": "promptString",
      "id": "apple-safari-cookie-hosts",
      "description": "APPLE_SAFARI_COOKIE_HOSTS",
      "password": true
    },
    {
      "type": "promptString",
      "id": "apple-safari-download-dir",
      "description": "APPLE_SAFARI_DOWNLOAD_DIR",
      "password": true
    },
    {
      "type": "promptString",
      "id": "apple-safari-network-chunk-chars",
      "description": "APPLE_SAFARI_NETWORK_CHUNK_CHARS",
      "password": true
    }
  ],
  "servers": {
    "mcp-apple-safari": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mgcrea/mcp-apple-safari"
      ],
      "env": {
        "APPLE_SAFARI_ALLOW_WRITES": "${input:apple-safari-allow-writes}",
        "APPLE_SAFARI_ALLOW_CODES": "${input:apple-safari-allow-codes}",
        "APPLE_SAFARI_ALLOW_NETWORK": "${input:apple-safari-allow-network}",
        "APPLE_SAFARI_ALLOW_COOKIES": "${input:apple-safari-allow-cookies}",
        "APPLE_SAFARI_COOKIE_HOSTS": "${input:apple-safari-cookie-hosts}",
        "APPLE_SAFARI_DOWNLOAD_DIR": "${input:apple-safari-download-dir}",
        "APPLE_SAFARI_NETWORK_CHUNK_CHARS": "${input:apple-safari-network-chunk-chars}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

Apple Safari in other clients