> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/microsoft/playwright-mcp/llms.txt
> Use this file to discover all available pages before exploring further.

# User Profiles

> Configure browser profile persistence modes for Playwright MCP

Playwright MCP can run with persistent profiles like a regular browser (default), in isolated contexts for testing sessions, or connect to your existing browser using the browser extension.

## Persistent Profile

By default, all logged-in information and browser state is stored in a persistent profile. This allows you to maintain sessions across MCP server restarts.

### Default Profile Locations

The persistent profile is stored at the following locations by default:

**Windows:**

```
%USERPROFILE%\AppData\Local\ms-playwright\mcp-{channel}-profile
```

**macOS:**

```
~/Library/Caches/ms-playwright/mcp-{channel}-profile
```

**Linux:**

```
~/.cache/ms-playwright/mcp-{channel}-profile
```

### Custom Profile Location

You can specify a custom profile location using the `--user-data-dir` argument:

```json theme={null}
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest",
        "--user-data-dir",
        "/path/to/custom/profile"
      ]
    }
  }
}
```

### Clearing Browser State

You can delete the persistent profile directory between sessions to clear all offline state, cookies, and logged-in information.

## Isolated Mode

In isolated mode, each session starts in a fresh, isolated browser context. When you close the browser, all storage state for that session is lost.

### Basic Isolated Mode

```json theme={null}
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest",
        "--isolated"
      ]
    }
  }
}
```

### Isolated Mode with Initial Storage State

You can provide an initial storage state to the isolated browser context using the `--storage-state` argument:

```json theme={null}
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest",
        "--isolated",
        "--storage-state",
        "path/to/storage.json"
      ]
    }
  }
}
```

Learn more about storage state in the [Playwright documentation](https://playwright.dev/docs/auth).

### Configuration File Approach

You can also configure isolated mode with initial storage state using a configuration file:

```json theme={null}
{
  "browser": {
    "isolated": true,
    "contextOptions": {
      "storageState": "path/to/storage.json"
    }
  }
}
```

## Browser Extension Mode

The Playwright MCP Chrome Extension allows you to connect to existing browser tabs and leverage your logged-in sessions and browser state.

See the [Browser Extension guide](/guides/browser-extension) for detailed installation and setup instructions.
