Source on GitHub
predotdev/chrome-mcp, MIT licensed.Cloud Browser Agents
Run tasks on pre.dev’s browsers through REST, the SDKs, or the hosted MCP server.
Cloud or Local
Use Cloud to run browser work from your application or at volume. Use Local when your coding agent needs the Chrome you already use.
Quick start
You need macOS, Google Chrome, and Node.js 22 or later (check withnode --version). Run one command:
1
Sign in to pre.dev
Your browser opens pre.dev with a short code. Sign in, or create a free account, and approve Sign in to pre.dev Browser Agents Local. Setup saves your workspace API key for every agent, so there is nothing to copy.
2
Add it to every coding agent on your Mac
Setup installs a stable copy and registers it, with full paths that also work in desktop apps, in each agent it finds: Claude Code, Codex, Cursor, Windsurf, VS Code, Gemini CLI, OpenCode, and Claude Desktop. Codex gets a 120-second tool timeout. If a different server named
chrome already exists, setup leaves it alone and registers this one as predev-chrome. It backs up each JSON config once, as <file>.bak-chrome-mcp.3
Connect to Chrome
The first time, setup asks you to turn on remote debugging at
chrome://inspect/#remote-debugging and copies the address for you. Then Chrome asks Allow remote debugging?: click Allow. Setup lists your Chrome profiles once it is connected.4
Restart your agent and try a prompt
Or let your agent do it. Paste this into Claude Code or any coding agent:
Manual setup
setup does this for you. To add the server by hand, for example to an agent setup does not know, turn on remote debugging at chrome://inspect/#remote-debugging once, then give your agent the command npx -y github:predotdev/chrome-mcp.
A key is needed only for plain-words actions. Sign in once with npx -y github:predotdev/chrome-mcp login and leave the key out of the config, or put your workspace API key in the agent’s PREDEV_API_KEY.
Copy your pre.dev API key from Integrations → Built-in in the dashboard: pre.dev/projects/integrations for your personal workspace, or the Integrations page of a team workspace. Workspace keys start with pdk_.
The examples below set the key. If you signed in with login, leave it out: drop the env or environment entry, or the -e and --env flags.
- Claude Code
- Codex
- Cursor
- Windsurf
- VS Code
- Gemini CLI
- OpenCode
- Claude Desktop
- Other clients
Check your setup
login, or PREDEV_API_KEY when it is set. It ends by naming anything left to fix.
Commands
Run each asnpx -y github:predotdev/chrome-mcp <command>.
Tools
A snapshot labels every tab with the profile it belongs to, so the agent always knows which account it is acting as:
Plain-words actions
Two tools use your pre.dev account to understand the page, through the key saved bysetup or login, or PREDEV_API_KEY:
chrome_actclicks or types into an element described in plain words, such as “the Create button in the dialog”, in one call and in under a second, with no snapshot. If it is not sure which element you mean, it lists the likely refs instead of acting. Use explicit refs fromchrome_snapshotfor irreversible steps such as send, pay, or delete.chrome_waitwithconditionwaits until a plain-words statement about the page is true, such as “the export has finished”.
Credits
Plain-words actions are the only part of Browser Agents Local that calls pre.dev. Each one costs a small fraction of a credit. Free workspaces get 20 credits of plain-words actions, separate from the AI Gateway trial, which covers more than a thousand actions. When they run out, your agent tells you and offers to open the billing page in your Chrome so you can subscribe; every other tool keeps working. They share the rate limits of your other API calls. Every other tool runs on your computer, never calls pre.dev, and is free. Credits are the one currency for coding, planning, verification, browser tasks, and AI calls from your apps. One credit is worth $0.10.GET /v1/usage lists plain-words actions under the model browser-agents-local, with path /browser/locate for chrome_act and /browser/check for conditions. Their errors follow the AI Gateway error format; see troubleshooting for what to do.
Configuration
setup and login save your workspace API key in ~/.predev/chrome-mcp/credentials.json, a file only you can read, and every agent uses it. It is the same key you use for the API, the AI Gateway, and cloud Browser Agents. The server reads the file on every call, so signing in again needs no restart.
To change that for one agent, set these in the env of its MCP entry:
State, logs, the stable copy setup installs (
~/.predev/chrome-mcp/app), and the saved key are kept in ~/.predev/chrome-mcp/.
To turn access off, run stop or turn remote debugging off at chrome://inspect/#remote-debugging. To remove everything, run uninstall.
Safety
Browser Agents Local drives your real, signed-in Chrome. Read this before you turn it on.- Anything you can do in a tab, the agent can do. Connect only agents you trust, and watch what they do on sensitive sites.
chrome_evalruns JavaScript in the page. - Passwords stay with you. It refuses to type into password fields, except on
localhostand.testdevelopment sites, and masks password values in snapshots. - It listens only on your computer. The background process binds to
127.0.0.1, requires a random per-run token stored in a file only you can read, and rejects any request that comes from a web page. - Page text leaves your computer only for plain-words actions.
chrome_actandchrome_waitconditions send the page text they need to pre.dev. Nothing else does.

