Skip to main content
Browser Agents Local is the local edition of Browser Agents: a free, open-source MCP server that lets the coding agent on your computer drive the Google Chrome you already have open. Your agent can open a tab in your work profile, read a dashboard you are signed in to, fill in a form, click through a flow, and screenshot the result. There is no second browser to set up and no site to sign in to again. It works with any MCP client that runs local servers: Claude Code, Codex, Cursor, Windsurf, VS Code (Copilot agent mode), Gemini CLI, OpenCode, Claude Desktop, and others. Run as many agents as you like at the same time. They share one connection to Chrome, so Chrome asks you to allow it once each time Chrome starts.

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 with node --version). Run one command:
It walks you through everything:
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

Then give it real work, such as reading a dashboard you are signed in to, filling in a form, or checking a flow in your app and screenshotting the result.
Or let your agent do it. Paste this into Claude Code or any coding agent:
Setup is safe to run again, and running it again updates to the latest version. Chrome asks Allow remote debugging? once each time it starts, and again after an update.

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.
Restart your agent. The first time it uses Chrome, Chrome shows Allow remote debugging?. Click Allow.

Check your setup

The check confirms remote debugging is on, connects to Chrome, lists your profiles, and checks your key: the one saved by login, or PREDEV_API_KEY when it is set. It ends by naming anything left to fix.

Commands

Run each as npx -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 by setup or login, or PREDEV_API_KEY:
  • chrome_act clicks 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 from chrome_snapshot for irreversible steps such as send, pay, or delete.
  • chrome_wait with condition waits 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_eval runs JavaScript in the page.
  • Passwords stay with you. It refuses to type into password fields, except on localhost and .test development 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_act and chrome_wait conditions send the page text they need to pre.dev. Nothing else does.

Troubleshooting

Platform support

macOS is supported and tested. Linux and Windows are not tested yet: the server looks for Chrome’s data in the standard places, and on those systems a profile needs an open Chrome window before the agent can use it. Reports and pull requests are welcome on GitHub.