diff --git a/README.md b/README.md index 4eec875..a22000e 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,18 @@ code-insiders --add-mcp '{"name":"playwright","command":"npx","args":["@playwrig After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code. +### User data directory + +Playwright MCP will launch Chrome browser with the new profile, located at + +``` +- `%USERPROFILE%\AppData\Local\ms-playwright\mcp-chrome-profile` on Windows +- `~/Library/Caches/ms-playwright/mcp-chrome-profile` on macOS +- `~/.cache/ms-playwright/mcp-chrome-profile` on Linux +``` + +All the logged in information will be stored in that profile, you can delete it between sessions if you'dlike to clear the offline state. + ### Running headless browser (Browser without GUI). diff --git a/src/program.ts b/src/program.ts index 95fa800..ab7fec0 100644 --- a/src/program.ts +++ b/src/program.ts @@ -69,7 +69,7 @@ async function userDataDir() { cacheDirectory = process.env.LOCALAPPDATA || path.join(os.homedir(), 'AppData', 'Local'); else throw new Error('Unsupported platform: ' + process.platform); - const result = path.join(cacheDirectory, 'ms-playwright', 'mcp-chromium-profile'); + const result = path.join(cacheDirectory, 'ms-playwright', 'mcp-chrome-profile'); await fs.promises.mkdir(result, { recursive: true }); return result; }