Does the Playwright MCP server keep browser data on disk?
Yes, by default. A security reviewer deciding whether an AI agent driving a browser leaves cookies, logins and files behind needs to know that the Playwright MCP server is open source, runs locally via npx, and has no hosted service or plan tier, so data privacy is controlled entirely by the flags and host the organization chooses. Nothing is enforced by a vendor cloud. The server's default mode is persistent: login state, cookies and local storage are kept between sessions. Each client workspace gets its own profile directory, and the default location on Linux follows the pattern ~/.cache/ms-playwright-mcp/mcp-{channel}-{workspace-hash}. Any employee's agent session can therefore leave an authenticated browser profile on a developer laptop or build host unless someone changes that default.
The memory-only option is the --isolated flag. According to the profile and state documentation, it starts each session fresh with nothing written to disk. It cannot be combined with --user-data-dir, so a team that needs a specific profile must choose one mode or the other. If an agent must start logged in, --storage-state loads an initial state file into the isolated session, but that file is itself sensitive and must be stored, rotated and deleted under the organization's normal secret handling rules. Reviewers should confirm the effective flags in each client's configuration file, since a single override can switch a host back to persistent storage.
Before approving the server, ask the engineering team to run it in both modes on a test host and list every path written under the profile and output locations. Confirm the --output-dir location for automatically named output files and the --output-max-size eviction threshold, because old output files are removed only at that limit. Confirm which Node.js version the team pins, since the README and the getting started page disagree. Finally, record which MCP client and model provider receive page content, since that data leaves the host regardless of the browser storage mode. The Playwright MCP profile and state documentation is the reference for these checks.
Storage and privacy controls by mode and option
This table compares each Playwright MCP server setting that affects what is kept on disk, from the default persistent profile to output and secret handling. Read each row against the what-it-writes column to see where session data, cookies and files end up. There is no vendor plan tier for these options, so every control is set on the local server by the organization running it.
| Setting | What it does | What it writes to disk | Built in or needs an outside component |
|---|---|---|---|
| Default persistent profile | Keeps login state, cookies and local storage between sessions | A profile directory per client workspace, such as ~/.cache/ms-playwright-mcp on Linux | Built in, no outside component |
| --isolated | Starts each session fresh | Nothing written to disk, per the profile docs | Built in, cannot be combined with --user-data-dir |
| --storage-state | Loads initial cookies and storage into an isolated session | Reads a supplied state file; the file itself must be protected by the organization | Built in, used with --isolated |
| --user-data-dir | Sets the browser profile location manually | The chosen directory, which keeps persistent state | Built in, incompatible with --isolated |
| --output-dir | Stores automatically named output files from the server | Files in the configured directory | Built in, no outside component |
| --output-max-size | Sets the threshold for evicting old output files | Removes older output files once the threshold is reached | Built in, controls retention of output files only |
| --secrets | Redacts matching values in tool responses and substitutes placeholders | Secret values are read from the configured source, not stored by this option | Built in, but the docs state it is not a security boundary |
What the default profile keeps between sessions
The default mode of the Playwright MCP server is persistent, so login state, cookies and local storage are kept between sessions instead of being discarded when a task ends. For a security reviewer, this means the server is not stateless by default. A browser profile on the host can hold authenticated sessions for any site an agent has signed into, and a later agent run can reuse those sessions without a fresh login. Before approving the server, confirm with your team which sites staff will open through it and whether any of them are internal systems or accounts with broad access.
The Profile and State documentation gives a default profile location on Linux that follows the pattern ~/.cache/ms-playwright-mcp/mcp-{channel}-{workspace-hash}. Each client workspace gets its own profile directory, so two projects opened in separate workspaces do not share cookies or storage by default. That separation is useful for keeping a client engagement apart from an internal project, but it is a per-workspace boundary on one machine, not an access control. Anyone with access to the user account can read the profile directory, so treat the directory as sensitive data in your endpoint and disk encryption reviews.
The supplied documentation covers only the Linux pattern. Confirm the equivalent profile paths for macOS and Windows in the Playwright MCP profile and state documentation before you write endpoint rules or backup exclusions, and ask the team deploying the server to list the exact directories on each operating system in their fleet. Also confirm whether backup, sync or endpoint tools copy these directories, because a copied profile carries the same logged-in sessions as the original.
Choosing between persistent, isolated and seeded modes
The decision starts with one question: does the agent need login state to survive across sessions? If yes, the default persistent mode keeps cookies, local storage and login state in a profile directory that each client workspace gets for itself, so the team must decide where that directory lives and who can read it. If no, --isolated starts each session fresh and writes nothing to disk, but it cannot be combined with --user-data-dir. If the agent needs a known starting point, --storage-state loads that state into the isolated session. Check the storage-state file itself, since it holds the cookies and tokens it carries.
Decision path for persistent, isolated and seeded Playwright MCP sessions.
Decisions to make before the first approved workspace
Four decisions shape what the Playwright MCP server leaves behind on a managed endpoint: whether sessions persist, where profiles and output files land, whether seed state is approved, and how far a client workspace reaches. Each one changes what a reviewer can later inspect, delete or explain during an incident.
Persistent or isolated mode per use case
The default mode keeps login state, cookies and local storage between sessions, so a workflow that signs in once can resume later. Running with --isolated starts each session fresh with nothing written to disk, which limits retention but means every run must re-authenticate. Decide per use case, record the choice in the workspace configuration, and confirm with your security team which flows, such as logged-in admin consoles, justify persistence.
- Persistent mode
- Default
Profile directory location on endpoints
Persistent profiles are written to a per-workspace directory, for example under ~/.cache/ms-playwright-mcp/ on Linux, so each client workspace gets its own profile. Ask your endpoint team whether these paths fall inside disk encryption, backup scope and endpoint detection coverage, and whether they can be wiped on offboarding. Where your policy requires a fixed location, set --user-data-dir explicitly, noting that it cannot be combined with --isolated.
Approval of storage-state seed files
The --storage-state option loads initial cookies and storage into an isolated session, which lets a team reuse a login without a persistent profile. Those seed files contain live session material, so treat them like credentials. Name an owner for each seed, define who may create and rotate it, set an expiry review, and exclude them from shared repositories and ticket attachments.
Output directory and size limits
Output files, such as snapshots or downloads, are named automatically and written to the directory set by --output-dir. The --output-max-size setting is the threshold at which old output files are evicted, so it governs how long artifacts persist and how much they accumulate. Choose a directory outside synced folders, set a size limit that matches your retention rule, and confirm with the reviewer what evidence must survive eviction.
Workspace boundary versus project boundary
Profiles are separated by client workspace, so a developer's project boundary determines which sessions and cookies a given agent can reuse. Check whether one workspace spans sensitive and non-sensitive projects, and whether sessions from a production-facing site could be reached from a sandbox project. If the boundaries differ, split workspaces or use isolated mode so that an investigation can tie each session to a single project.
How the storage answer changes by use case
Long-running loops are the case the Playwright MCP docs describe for persistent state. The default mode keeps login state, cookies and local storage between sessions, so an agent can resume work without signing in again. That convenience is also the main storage risk, because the profile sits on disk under a per-workspace directory and outlives the task. Treat the profile as a credential store, not a cache.
- Persistent profile is the default: Confirm that the team accepts login state, cookies and local storage remaining on the developer machine between sessions.
- Profile location: Ask each team to locate its profile directory (on Linux, under
~/.cache/ms-playwright-mcp/) and record it in the workstation standard. - One profile per workspace: Each client workspace gets its own profile, so confirm which workspaces may hold sessions for which systems.
- Output files: Set
--output-dirdeliberately and review what is written there, since screenshots or snapshots from long runs accumulate. - Cleanup rule: Define when profiles are deleted, such as at project end or offboarding.
Before approving this pattern, confirm which logged-in sites the agent can reach and whether any of them hold data that must not persist on a laptop.
For one-off test runs, reproduction steps or public research, the better starting point is the isolated mode. The docs say --isolated starts each session fresh with nothing written to disk, which removes the profile as a storage location. Where a task needs a known starting state, --storage-state loads that state into the isolated session, so the reviewer can control exactly what the agent begins with.
- Isolated by default: Start from
--isolatedand treat any move to a persistent profile as an exception that needs a reason. - No combined flags:
--isolatedcannot be combined with--user-data-dir, so confirm that launch scripts do not try to pass both. - Controlled starting state: When
--storage-stateis used, confirm who creates the state file, where it is kept and when it is deleted. - Output still needs a rule: Isolation does not stop the output files from being written, so confirm the
--output-dirand--output-max-sizevalues for the task. - Public targets: Confirm the task does not require signing in to internal or customer systems.
For illustrative purposes, a test team reproducing a public site bug fits this tab well. Confirm the scope in writing before the task starts.
When the agent drives sessions into clinical or financial systems, storage is a compliance question as well as a security one. A persistent profile would keep authenticated sessions on disk, which may fall under the organization's own data handling and access rules. The isolated mode reduces what is written locally, but it does not remove the data sent to the model, and it does not make the browser session safe on its own. The reviewer should confirm the rules with privacy, legal and the system owner, not treat the technical setting as the answer.
- Isolated mode as the baseline: Start from
--isolatedand avoid persistent profiles for these sessions unless the data owner approves. - Secrets handling: Use
--secretsto keep known values out of tool responses, and remember the docs say it is not a security boundary. - Model data path: Confirm which MCP client and model provider receives page content, because the server itself runs locally and sends data to whichever client the organization chooses.
- Evidence: Ask how the organization will show what was read and written, since the server docs do not describe a central audit log.
- Regulatory review: Confirm with the compliance team whether HIPAA or GDPR obligations apply to the data the pages display.
Do not approve logged-in clinical or financial sessions until the reviewers have confirmed the data path and retention rules in writing.
On a shared or multi-user developer workstation, the profile directories and output files are visible to anyone with access to the same operating system account or file system permissions. The docs state that each client workspace gets its own profile, but that separation is by workspace, not by person or by security boundary. Reviewers should assume that anything persisted on such a machine can be read by whoever else can reach it, and should decide whether the agent belongs on that machine at all.
- Prefer isolated mode: Use
--isolatedso that no profile remains between one user's session and the next. - Check the operating system account: Confirm that profile and output directories are not readable by other accounts on the same machine.
- Avoid shared profiles: Confirm that no team shares a profile directory or a storage-state file that carries sessions.
- Clear output directories: Define how
--output-dircontents are removed when a user finishes or changes roles. - Machine scope: Confirm which machines are approved for the server, and document that list as part of the rollout.
Before approving a shared machine, confirm who has administrative access to it and whether the workstation policy covers files written by developer tools.
Keeping secrets out of tool responses
The --secrets option lets an organization reduce accidental exposure of credential values in what the Playwright MCP server returns to the model. According to the configuration docs, values listed through this option are redacted when they match tool output and replaced with placeholders, so the model sees a token instead of the literal string. Before relying on it, confirm the exact file format and how values are supplied in the Playwright MCP configuration options, and test it against the pages and flows your agents actually use. Treat it as a hygiene control for responses, not as a secret store.
The docs are explicit that --secrets is not a security boundary. Redaction happens in tool responses only. The browser profile, page memory and any storage the session holds can still contain the real value, so anyone with access to the profile directory or a live session may still reach it. A page can also display a secret in its own markup, and a prompt injection embedded in that page can instruct the agent to read or type values it can see, regardless of how responses are filtered. Pages that render credentials in plain text, or forms that echo them back, fall outside what this option can reliably protect.
The practical control is to keep credentials out of the browser where you can. Prefer sessions that log in with short-lived credentials supplied at run time, avoid storing long-lived passwords in profiles, and combine this with --isolated so nothing persists after the run. Where a login must be reused, review who can read the profile directory before approving the workflow. Ask your security team to decide which accounts agents may use, and set up a test that checks whether a known test secret appears in a tool response, a saved file or the profile after a sample run.
Where the server does not cover data privacy
The Playwright MCP server runs locally, so the privacy picture depends on the machine, the client and the model provider around it. The cards below name the gaps a reviewer should close with controls the organization already runs, and what to confirm with each vendor.
No hosted service or retention terms
The server runs locally through npx, and the docs describe no hosted Playwright MCP service or plan tiers. Microsoft therefore publishes no retention schedule or data processing terms for the server itself, because it never receives the data. Check instead whether the endpoint's disk encryption and local logging meet your policy, since those controls hold what the server writes. Confirm with Microsoft through the microsoft/playwright-mcp README that no telemetry or update channel changes this picture.
Read the READMEModel provider receives page content
Snapshots of pages the agent reads are passed to whichever MCP client and model provider the organization chooses. The server does not decide where that content goes, so the provider's terms govern retention, training use and regional processing. Require an approved model provider agreement that covers the data classes staff will browse, and confirm the client's data handling settings with the client vendor before rollout.
The secrets flag is not a boundary
The --secrets option redacts matched values from tool responses and substitutes placeholders, but the docs state it is not a security boundary. Anything the page displays that does not match a supplied value can still reach the model, and sensitive values held in the browser remain reachable. Treat it as a reduction in exposure, pair it with isolated mode for sensitive tasks, and test with a page that displays dummy credentials to confirm what the client actually receives.
Persistent profiles stay on disk
In default mode, login state, cookies and local storage are kept between sessions in a profile directory under the cache path, such as ~/.cache/ms-playwright-mcp on Linux. The profile remains after the session ends unless someone deletes it. Set a scheduled cleanup for profile directories on managed endpoints, and confirm the location on each operating system your staff use, since the default path varies by platform.
Profile and state docsOutput files accumulate by size
Automatically named output files written to the directory set by --output-dir are evicted only when the total passes the threshold in --output-max-size. Until then, files with page content or downloads can sit on disk for an unknown period. Choose a dedicated output directory outside synced folders, set a size limit that matches your policy, and check the directory after test runs. Confirm the eviction behavior against the current options page before relying on it.
Configuration optionsNo documented audit trail of state
The docs do not describe an audit log of what the server stored, which profile a session used, or which values were redacted. A reviewer who needs to answer what data a session left behind has to reconstruct it from the file system and the client's own logs. Compensate with endpoint file monitoring on profile and output directories, a written record of which profiles belong to which users, and a request to the client vendor for its session logging options.
Order of work before approving the server
This sequence confirms the runtime, sets how the server keeps browser state and output files, and tests those settings in a workspace before any staff member connects a production client. The result is a written decision on each storage setting that the approver can review.
Confirm the Node.js version first
The repository README lists Node.js 18 or newer, while the Playwright getting started page lists Node.js 20 or newer. The platform engineer checks the current getting started page, pins the version that page supports, and records the source and date in the approval file. Done means the approver has one Node.js version, a named source for it, and a check that the endpoint image matches it.
Choose the default mode for each use case
The default mode is persistent, so login state, cookies and local storage carry over between sessions. The security lead decides, per use case, whether persistence is needed for long-running work or whether each session should start fresh. Done means every planned use case has a recorded mode, and any use case that needs persistence has a named owner and a reason.
Set profile and output locations on managed endpoints
Persistent profiles default to a per-workspace directory under the user's cache folder, and output files go to the directory set by the output option. The endpoint administrator confirms these paths on a managed device, decides whether they sit on encrypted storage, and checks that standard endpoint protection and backup policies cover or exclude them as intended. Done means the approver has the exact paths for each workstation image and a documented decision on backups.
Decide on seeded state and secrets handling
If a session needs a saved login, the team decides whether to load a stored state file into an isolated session, and who creates and stores that file. The secrets option redacts matching values in tool responses, but the documentation says it is not a security boundary. The security reviewer decides which credentials are never placed in a browser session and records where the secret values are kept. Done means each credential has an owner, a storage location and an explicit yes or no on seeding.
Identify the model provider and client
The server runs locally, but page content returned by tools goes to whichever MCP client and model provider the organization selects. The procurement and privacy reviewers identify each client in use, the model provider behind it, and the terms that apply to retention and training for that provider. Done means the data flow diagram names every party that receives tool responses, and each one has a reviewed agreement or an approved exception.
Verify storage in a test workspace
The platform team runs a test workspace with a non-sensitive test account and checks that profile directories and output files appear where the documentation and the endpoint settings predict. They then confirm the removal behavior on the chosen schedule, including the size threshold for evicting old output files. Done means a written test record shows the expected paths, the files created, and the files removed, and the approver signs off on that record.
Evidence a security reviewer asks for
This table lists the evidence a reviewer should request for the Playwright MCP server's disk, output and secrets behavior, with where each item is documented and who produces it. Read it as a checklist: each row names one control, the artifact that proves it, and the team that should supply it. The main takeaway is that the default mode keeps browser state between sessions, so the endpoint team must show the profile location and the isolation setting in use before approval.
| Evidence item | What to ask for | Where it comes from in the tool | Who produces it |
|---|---|---|---|
| Data location and profile paths | Profile directory per workspace on each endpoint, plus whether the default persistent mode is kept or replaced | Profile and state docs, including the default ~/.cache/ms-playwright-mcp path on Linux | Endpoint team |
| Isolation mode configuration | Client config showing --isolated, or a written reason for persistent mode, and confirmation it is not combined with --user-data-dir | Configuration options docs and the profile and state docs | Endpoint team, checked by the reviewer |
| Initial state loading | Any --storage-state file used to seed isolated sessions, with its owner, storage location and review date | Profile and state docs | Endpoint team |
| Output retention and size limits | Configured --output-dir and --output-max-size values, and where old files are evicted | Configuration options docs | Endpoint team |
| Secrets handling configuration | Client config showing the --secrets setting and the list of secret names covered, plus a note that redaction is not a security boundary | Configuration options docs | Endpoint team, reviewed against the security policy |
| Model and client data flow | Named MCP client and model provider, and a statement of which page content and tool responses are sent to the model | README, which says the server runs locally via npx and sends data to the chosen client and provider | Reviewer, with the vendor contract from procurement |
| Package version pinned | The exact @playwright/mcp version installed, not a floating @latest, and the Node.js version that matches the current requirement | README and getting started page, which list conflicting Node.js minimums | Endpoint team |
Questions buyers ask about Playwright MCP data privacy
Does the Playwright MCP server store our data in the cloud?
No hosted Playwright MCP service is described in the docs, and the server runs locally through npx on the machine where the MCP client starts it. Anything the server keeps is written to that machine, such as profiles and output files. What leaves the machine is the content the agent sends to the model, and that depends on the MCP client and model provider your organization chooses. Confirm with each client and provider which prompts, page content and tool results they retain, and under which terms. The Playwright MCP README is the starting point for the local run model.
Does isolated mode keep everything off disk?
The docs say --isolated starts each session fresh with nothing written to disk, so it is the setting to use when you do not want logins or browsing state to persist. It cannot be combined with --user-data-dir. If an agent needs a signed-in state, --storage-state loads initial state into an isolated session, which means the state file itself still sits on disk and must be protected. Output files are a separate question, so check --output-dir settings too. Test the chosen flags on a workstation and confirm the profile and output paths stay empty after a session.
Does the --secrets option actually protect our credentials?
It reduces exposure but does not protect them. The docs describe --secrets as keeping listed values out of tool responses by redacting matches and substituting placeholders. The same docs state it is not a security boundary, so a credential the browser can reach can still be used, typed into a form or exposed through a page the agent visits. Treat it as one layer. Pair it with short-lived test accounts, least-privilege logins, origin restrictions and secret stores that never place real passwords in the agent's context. Ask your reviewers to test whether a known secret ever appears in a transcript or output file.
How long do profiles and output files persist?
In default persistent mode, login state, cookies and local storage are kept between sessions, so they remain until someone removes them. Each client workspace gets its own profile directory, and on Linux the docs give a default location under ~/.cache/ms-playwright-mcp/. Output files are named automatically and older ones are evicted once the total passes the --output-max-size threshold, so retention depends on that size and on how much the agent writes. The docs do not give a fixed retention period. Confirm the paths and sizes on your own endpoints, and set a cleanup routine for devices where staff may hold sensitive sessions.
What drives the effort of a Playwright MCP rollout?
Three factors matter most. The first is the number of workspaces, because each client workspace gets its own profile directory that must be found, reviewed and cleaned. The second is the sensitivity of the logins the agent may use, since admin, finance or customer-data accounts need isolated mode or no stored state at all. The third is endpoint management: if your devices are managed centrally, you can standardize flags and output locations, while unmanaged laptops need a written standard and checks. Ask any implementation partner for a quote built from these factors and from the written scope of workspaces, endpoints and test cases.
Can our own team configure these privacy settings without outside help?
Often yes, for a small pilot, because the settings are documented flags and a local run model. A team with endpoint management skills and a security reviewer can set default flags, choose an isolated or storage-state pattern, and test whether profiles and outputs stay where expected. Outside help becomes more useful when many workspaces, shared machines or regulated logins are involved, or when the team needs evidence for a security review. DeployOpen can plan and implement self-hosted platforms in your infrastructure and run security testing of AI agent setups, including tests of data exposure and credential handling, with a findings report and retest. It does not issue audit reports or certifications.
How DeployOpen works on this
DeployOpen approaches Playwright MCP storage controls as a fixed-scope review of what the server writes to disk, how the profile, stored state and output directories are configured, and what reaches tool responses. Each engagement ends with written findings, fixes and a retest, so the security and IT reviewers can make a documented decision about the setup.
How we scope
- Written scope lists which clients, workspaces and machines will run the Playwright MCP server.
- Scope names the profile directories, output directories and any storage-state files to be reviewed.
- Fixed-scope engagements agree deliverables and timelines in writing before any testing begins.
How we build
- We compare default persistent mode with isolated mode and record which settings each client uses.
- We check the
--output-dirand--output-max-sizevalues and where old output files are kept. - We test whether
--secretsplaceholders hold up in tool responses, treating redaction as a convenience rather than a boundary.
How we hand over
- Findings report lists each storage location, its contents, retention and the control that governs it.
- Deliverables include a recommended configuration file and the steps to confirm it on each workstation.
- A retest after fixes confirms whether profiles, cookies and output files are handled as documented.
How we support
- Ongoing support is available as a retainer for upgrades to the
@playwright/mcppackage and config changes. - Retainers can include periodic retesting when client teams change their workspace or output settings.
- Support questions about storage behavior are answered against the current Playwright MCP documentation.

