chrome-profile-mcp
Allows driving a real Chrome profile (with existing logins, cookies, sessions) via Playwright MCP, enabling browser automation on a specific Chrome profile.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
chrome-profile-mcp
Drive your real Chrome profiles (with existing logins, cookies, sessions) from Claude Code via @playwright/mcp --extension + the Playwright Chrome Extension relay.
Why this exists
Upstream @playwright/mcp --extension auto-discovers which Chrome profile to open — Default first, then numeric Profile N, preferring last_used — with no knob to pin a specific profile. If the browser extension is installed in several profiles, the relay tab can land in the wrong one (e.g. Diana's instead of jamu's).
This repo adds one env var, PLAYWRIGHT_MCP_PROFILE_DIRECTORY, via a small idempotent patch script, so each MCP server deterministically opens its own profile.
No extension code is modified. No credentials or tokens are stored here.
Related MCP server: browser-mcp-cdp
How it works
npm ciinstalls pinned@playwright/mcp@0.0.80(which pullsplaywright-core).npm run postinstallrunspatch-profile-directory.mjs, which rewrites one line innode_modules/playwright-core/lib/coreBundle.js(createExtensionBrowser):
// before (upstream)
const profileDirectory = userDataDir ? await findPlaywrightExtensionProfile(userDataDir) : void 0;
// after (patched)
const profileDirectory = process.env.PLAYWRIGHT_MCP_PROFILE_DIRECTORY ?? (userDataDir ? await findPlaywrightExtensionProfile(userDataDir) : void 0); // PATCHEDEach MCP server runs the vendored CLI with its own token + profile:
{
"mcpServers": {
"mcp-jamu": {
"type": "stdio",
"command": "node",
"args": ["<repo>/node_modules/@playwright/mcp/cli.js", "--extension"],
"env": {
"PLAYWRIGHT_MCP_EXTENSION_TOKEN": "<token-from-that-profile>",
"PLAYWRIGHT_MCP_PROFILE_DIRECTORY": "Profile 5"
}
}
}
}The token must equal that profile's extension localStorage auth-token (open chrome-extension://mmlmfjhmonkocbjadbfplnigmagldckm/connect.html in the target profile to view/regenerate it). Matching token → silent auto-connect; mismatch → Invalid token provided.; no token → manual tab picker.
Setup
git clone <this-repo> ~/.chrome-mcp/extension-servers # or anywhere
cd ~/.chrome-mcp/extension-servers
npm ci # installs + patches (postinstall)
node patch-profile-directory.mjs # re-run any time node_modules is reinstalledRequirements: Google Chrome (stable channel path), Playwright Extension installed in each target profile, @playwright/mcp@0.0.80 (pinned; the patch anchors to this bundle layout and fails loudly otherwise).
Constraints / gotchas
Never set
--user-data-dirto the live Chrome home — a second copy fightsSingletonLock. With defaults (channel: chrome→~/Library/Application Support/Google/Chromeon macOS) the relay attaches to the running Chrome session.Never run two servers with the same/empty profile pin — each needs its own relay port + connect tab.
One profile = one token. Never commit tokens — use
.mcp.jsonenv (local, gitignored by clients) or your process manager's secret store.Patch is version-pinned: bumping
@playwright/mcprequires re-verifying the anchor strings inpatch-profile-directory.mjs.Tools surface as
browser_*(browser_navigate,browser_snapshot, …), notpuppeteer_*.
Verify
# should print: Version 0.0.80
./node_modules/.bin/playwright-mcp --version
# should print the patched line
grep -n PLAYWRIGHT_MCP_PROFILE_DIRECTORY node_modules/playwright-core/lib/coreBundle.jsThen point an MCP client at the vendored CLI, call browser_navigate https://example.com, and confirm the visit lands in the pinned profile's History (copy the live History file first — Chrome locks it while running).
Files
File | Purpose |
| Exact-pinned |
| Idempotent patch script (the actual patch) |
| Template server entries (tokens redacted) |
| Excludes |
License
MIT — patch script and docs. Upstream packages retain their own licenses (Apache-2.0).
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
A real Chromium browser agents pay for per action in USDC via x402 — hosted MCP, free local stdio.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables browser automation over MCP using a real Chrome browser with existing profile, supporting real tabs, downloads, cookies, and RPA workflows.497 npmMIT
- AlicenseAqualityDmaintenanceDrives your real local Chrome with profile isolation, allowing LLMs to interact with your logged-in sessions without modifying your actual profile.1337 npmMIT
- AlicenseBqualityBmaintenanceEnables MCP clients like Codex to operate chatgpt.com through a dedicated persistent browser profile, allowing chat creation, project management, prompt submission, file uploads, and response reading without using the ChatGPT API.33MIT
- AlicenseBqualityCmaintenanceEnables browser control through your existing signed-in Chrome profile, letting MCP clients like Claude Code manage tabs, navigate, inspect pages, and perform real user interactions via tool calls. Works with any model backend without needing Playwright or a fresh browser profile.21MIT