MCP server crashes when downloading files with persistent profile on Windows
Author: zhigangliu-botCreated Sep 16, 2026Updated Sep 17, 2026
Environment:
- OS: Windows 10 Enterprise
- Node.js: v22.x
- @playwright/mcp: latest (v0.0.81)
- Claude Code (VSCode extension)
Description:
When using Playwright MCP with a persistent profile (default behavior), any file download operation causes the MCP server to crash with error MCP error -32000: Connection closed.
Steps to reproduce:
- Install Playwright MCP via Claude Code:
claude mcp add playwright npx @playwright/mcp@latest - Navigate to any website with a download button (e.g., Moka HR system's interview recording download)
- Click the download button (either programmatically or manually in the opened browser)
- Observe the MCP server crashes with
MCP error -32000: Connection closed
Expected behavior: The download should complete successfully without crashing the MCP server.
Actual behavior:
- MCP server process exits when download starts
- The file is still downloaded successfully to
~/Downloads/ - MCP connection is lost, requiring reconnect
Workaround: We currently handle this by:
- Accepting the crash as expected behavior
- Finding the downloaded file (often with
.tmpextension) in~/Downloads/ - Waiting for MCP to reconnect automatically
- Continuing the workflow
Additional context:
- This happens with any download operation, not just specific websites
- The download itself completes successfully; only the MCP server crashes
- This seems related to how Playwright MCP handles download events with persistent profiles
- Non-persistent profiles may not have this issue, but we need persistent profiles to maintain login state
Related issues:
- #658 (similar connection closed error, but different cause - Windows npx invocation)
Source: microsoft/playwright-mcp