@heretic-tech/apostate-mcp is an MCP server that gives an agent browser tools: navigate, snapshot, click, type, fill forms, manage tabs, take screenshots. The tools are Playwright MCP’s. The browser behind them is launched by the Node package, so the agent gets what a script gets:
- the Patchright driver, which does not enable the DevTools
Runtimedomain on pages - the persona you choose, kept in a persistent profile
- the locale and timezone of your connection or proxy exit, looked up before launch
- the persona’s own window size, with no emulated viewport
- Xvfb for a headed launch on a Linux host with no display
Install
The server needs Node 22 or later. Download the browser once before an agent uses it, so the first tool call does not wait for a 150 to 200 MB download:- Claude Code
- Codex
- Other clients
- From the repository
Options
Keep proxy credentials out of config files that go into version control: set
APOSTATE_PROXY in the environment the client starts the server with.
Profiles
A persistent profile keeps the machine, cookies and logins between sessions. The first launch draws a machine and stores its seed in the profile. Profiles live in:
One browser can use a profile at a time. Give each agent that runs at the same time its own
--profile, or use --isolated for throwaway sessions.
Tools
With no--caps, the server offers these tools:
A snapshot is the page’s accessibility tree with a
ref for each element. Click and type take a target, which is a ref from the latest snapshot or a selector.
browser_run_code_unsafe runs arbitrary Playwright code, and browser_emulate_media overrides the persona’s colour scheme. Deny both in the client’s permissions unless the task needs them.
Check it works
This starts the server over stdio, as a client does, and drives it with Claude Code in print mode:Other MCP servers
You can also point an MCP server you already use at the Apostate browser. These routes skip the package, so you set what it would have set yourself.Playwright MCP with a config file
Playwright MCP with a config file
Playwright MCP takes browser switches only from a config file. Copy The config sets what the package would have: no emulated viewport or colour scheme, the locale environment, and
examples/agents/mcp/playwright-mcp.json, set executablePath to the output of apostate path and userDataDir to a directory of your choice, then run:--disable-component-update removed from Playwright’s defaults. It also sets GOOGLE_API_KEY=no, which stops the first tab from showing Chromium’s “Google API keys are missing” bar. Without a seed in args, the profile directory keeps its own machine. Playwright MCP uses Playwright, not Patchright, so the DevTools Runtime domain is enabled on pages.Any client that attaches over CDP
Any client that attaches over CDP
Start Apostate with a DevTools port and attach to it:Chrome DevTools MCP attaches with
npx -y chrome-devtools-mcp@latest --browserUrl=http://127.0.0.1:9222 --no-usage-statistics. Keep the port on 127.0.0.1. Use the binary directly covers the rest of this route.