Authorization notice. Invisible Playwright MCP is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Credentials. The profile folder holds logins and cookies for your accounts, so protect it and delete it when you no longer need the sessions.
Who it is forA user who needs an agent to return to the same sites repeatedly, such as a dashboard or account page, without signing in every time.
The problemEach new browser start normally begins with no cookies, so the agent must log in again on every task.
The outcomeA profile folder that holds logins and cookies across restarts, and a fixed browser identity when you also set a seed.
What you need first
- uv installed, using the install command for your operating system from the README
- An OpenRouter API key for the standalone web UI and for model calls
- An MCP-capable assistant such as Claude Code, Codex or Gemini CLI, for the MCP route
- Permission to automate the sites you point it at, and a read of their terms
Steps
- Install uv with the README command for your system.
- Choose an empty folder to hold the profile, for example ./agent-profile. (inferred, check the README)
- Run
uvx invisible-playwright-mcp ui --profile-dir ./agent-profileso the profile is kept there. (inferred, check the README) - Add
--seed 42to the same command if you want the same browser identity on every run. (inferred, check the README) - Sign in to the site once through the browser, then restart and check the agent is still signed in.
Prompt for your agent
Using the invisible-playwright-mcp server from feder-cr/invisible_playwright_mcp with a profile directory set to <profile-folder>, open <site-url> and report whether the account page loads without a login prompt. Expected output: a yes or no with the page title. Verify that the profile folder now contains the session data after the first run.
Caveat. The README says sessions and profiles are stored locally and are yours to delete, but it does not describe how the profile is encrypted, so do not assume it is protected beyond your own file permissions.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for feder-cr/invisible_playwright_mcp and "Keep logins and cookies between agent browsing runs"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer