Quickstart
Register the server, install the extension, verify your email, and pair Chrome.
Up and running in one paste
Hand this to your AI agent (Claude Code, Cursor, Windsurf, anything MCP) and it installs the server, wires it into the client, and walks you through installing the extension, verifying your email, and pairing Chrome:
Set up MCP Browser Extension on this machine by fetching and following
https://mcp-browser-extension.com/docs/agent-setup.md
exactly, step by step. Work autonomously and verify each step.Prefer to read before you run an agent on your machine? Agent setup instructions is the exact file the agent follows. The manual steps are below.
1. Register the MCP server with your host.
Claude Code (terminal) — one command, no config file to find
claude mcp add mcp-browser-extension -s user -- \
npx -y mcp-browser-extension@latest \
--allow-domain example.com --enable-mutations --persist-tokenEverything before -- belongs to Claude Code; everything after it is this
server's command and flags. Keep the -- or --allow-domain gets read as a
Claude Code option.
-s user registers it for every project on your machine. Use -s local (the
default) for just the current project, or -s project to write a .mcp.json
your team can commit.
Check it came up with claude mcp list. After upgrading the server, reconnect it
with /mcp inside a session — no restart needed.
Claude Desktop and other MCP hosts — JSON config
{
"mcpServers": {
"mcp-browser-extension": {
"command": "npx",
"args": ["-y", "mcp-browser-extension@latest",
"--allow-domain", "example.com", "--enable-mutations",
"--persist-token"]
}
}
}VS Code (GitHub Copilot) — .vscode/mcp.json
VS Code uses a top-level servers key, not mcpServers. Put this in
.vscode/mcp.json for one project, or in your user mcp.json (MCP: Open User
Configuration) for every project:
{
"servers": {
"mcp-browser-extension": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-browser-extension",
"--allow-domain", "example.com", "--enable-mutations",
"--persist-token"]
}
}
}Run the tools from the Chat view with Agent selected. The full walkthrough is in VS Code Copilot browser MCP.
Website access requires app approval and Chrome permission. Suspicious-site
checks are on by default; click Allow website access once in the extension.
For a fixed named-site policy, use --no-site-grants --allow-domain <glob>.
Mutations, downloads, uploads and eval stay off until enabled with
--enable-mutations, --enable-downloads, --enable-uploads or --unsafe-enable-eval.
Email verification is on by default. For a trusted, local unattended setup, you
can opt out with --no-email-verification (or set
MCP_BROWSER_EXTENSION_EMAIL_VERIFICATION=0). This skips the email prompt and
the Firebase access service, so no email or device grant is sent there. The
local MCP client still needs approval inside Chrome before using the extension,
and stays within the configured domain and capability policy. Treat every process that can launch
or reach this local server as trusted. This option is rejected with --tunnel
and does not turn off telemetry or the npm update check.
--enable-uploads permits upload_file (setting local file(s) on a page's file
<input>). It is off by default because sending local files to a page is an
exfiltration risk; it is also gated by the destination-domain allowlist. Pair it
with --uploads-dir <path> to restrict uploads to files inside that directory
(.. traversal is blocked) — strongly recommended for unattended use.
Pairing across restarts. The examples include --persist-token to reuse
the pairing token. The extension can also fetch a rotated token through the
native helper; the manual fallback is below.
Without --persist-token a fresh token is minted every boot (the secure
default), the extension can fetch it through the native helper. Without that helper,
manual re-pairing may be needed. With it, the
token is stored 0600 at ~/.mcp-browser-extension/token and reused; the extension's
keepalive auto-reconnects with no manual step. MCP_BROWSER_EXTENSION_TOKEN pins the token
explicitly (and is never written to disk). This transport pairing does not grant
an app access: every new app session has a separate key and needs Chrome approval.
2. Install the extension — required; the server can drive nothing without it.
Install MCP Browser Extension from the Chrome Web Store. One click, no Developer mode, and Chrome keeps it updated for you. This is the way to install it.
3. Verify your email. In your MCP client, ask the agent to call
chrome_status. On this first browser tool call, the client shows an email
prompt. Enter an address you can access, then open the sign-in link sent to
that address and click Verify this device. The waiting tool reports
Email verified and continues.
If the tool returns ACCESS_PENDING, ask the agent to call chrome_status
again to keep waiting on the same link. You do not need another email or a
verification code.
If your client suppresses the prompt (for example, in YOLO/bypass mode), does
not support MCP elicitation, or the dialog is dismissed, the server automatically
opens a temporary local verification form in your browser. The tool also returns
ACCESS_INPUT_REQUIRED with the link, so you can open it yourself if necessary
on the computer running the MCP server. Enter your email in the browser form,
and open the sign-in link from your inbox. Click Verify this device, then
call chrome_status to continue.
The local form expires after 10 minutes; call the tool again for a fresh one.
Opening the form does not send an email, and access remains blocked until the
email link and device grant are verified. Installing the extension alone does
not activate access.
4. Click Connect if Chrome is not already paired. A fresh install opens the extension's Settings with a Connect button (it is in the toolbar popup too). Click it, allow the one permission Chrome asks for, and you are paired: the server registers a small helper with Chrome every time it starts, and the button asks it for the port and token. Chrome lets only this extension talk to that helper. If the server ever changes its token, the extension fetches the new one by itself. Nothing to copy or paste.
5. Approve the app connection in Chrome. Run chrome_status, then open
the extension popup's App connections section. Compare the key
fingerprint with the one in the tool result and click Approve for 8 hours.
App names are supplied by the app; the key identifies this particular session.
Retry the tool after approving. A question-mark badge and the popup show pending
requests, even if the client hides its prompts. Approve, deny, revoke and restore
connections directly in the popup or in Settings.
Each app session has its own signing key, held only in that server session's memory.
Approval applies to this Chrome profile for eight hours. Restarting the app's MCP
connection creates a new key and needs a new approval. Remove access blocks further
commands from that key; an action already running may finish. YOLO, bypass-permission
mode and --no-email-verification cannot skip this extension check.
6. Allow website access once. Suspicious-site checks are on by default. In the
popup or Settings, Allow website access asks Chrome for HTTP/HTTPS access. After
you accept, ordinary sites work without an Allow request. Local checks pause
flagged addresses and risky login forms and show their reasons under Waiting
for Allow. Allow approves only the displayed reasons for that exact origin;
new reasons ask again. Blocked websites lets you block or restore any site.
Both the extension and connected server must be updated; --no-site-grants
disables this option.
These checks run locally with no external checking service. They can miss scams and flag legitimate sites. Form checks run after a page loads, before app reads or actions; they do not prevent page scripts from running or detect all malware. App approval, Stop access and the configured tool permissions still apply.
Choose Use per-site approval or Turn off to use named-site access instead. With automatic access off, the popup shows a Website access request. Click Allow, then accept Chrome's website permission prompt if shown. This single flow grants that named website in both Chrome and the server's allowlist. Allowing a website lets approved apps read and take actions there, including sending messages, deleting information and making purchases, subject to the configured tool permissions. There is no separate extension approval for each action. Website access is remembered until removed and shared by approved app sessions; each app still needs its own unexpired connection approval. Removing the website also removes its Chrome permission. Existing server flags do not grant Chrome access, and an upgrade may ask you to approve websites again.
Cookies and downloads ask separately under Extra permissions when needed.
They start off, and their buttons also let you remove permission. Downloads are
fetched without browser cookies, redirects are refused, and files are limited to
50 MiB. Links that require a signed-in browser session or redirect may not
work. Proxy
authentication and IP lookups request permission from Settings. Chrome does not
support making debugger or proxy optional; those remain required, and debugger
commands still check website permission before they run.
Update both the extension and server before using client approval. An older extension cannot enforce it, and the updated server refuses browser commands until the extension is updated. See client approval details.
Developers: load it unpacked instead
The extension also ships inside the npm package, and every time the server boots
it copies it to ~/mcp-browser-extension (%USERPROFILE%\mcp-browser-extension on
Windows; MCP_BROWSER_EXTENSION_EXTENSION_DIR moves it). chrome://extensions → enable
Developer mode → Load unpacked → pick that folder. It pairs itself from a
pairing.json the server writes there, and the server refreshes the files on each
boot (never with an older build) so it reloads itself within 30 seconds.
An unpacked copy does not update through Chrome, so its popup suggests the store
copy. Fresh unpacked builds carry the store's public key and so have the same id:
load one or the store copy in a Chrome profile, not both. Updates preserve the
ID of an existing unpacked installation, including older copies without a
manifest key; those continue to pair through the bundled pairing.json.
Working from a git clone?
npm install && npm run build:ext first; extension-dist/ is gitignored.
npm run clean clears server build output and keeps extension-dist/, whose
manifest and pairing data may belong to an installation already loaded in Chrome.
Where to see the badge: it sits on the extension's icon in Chrome's
toolbar, not on the chrome://extensions page. Chrome hides new extensions
behind the puzzle-piece button at the right of the address bar, so click that,
find MCP Browser Extension, and click the pin next to it once; the icon then
stays in the toolbar. Hover it for the status in words.
| Badge | Meaning |
|---|---|
| green dot | transport paired and connected |
| question mark | a connection or site needs your review |
| yellow dots | connecting |
| grey circle | not paired yet (no server has run, or no pairing file) |
| red exclamation mark | token rejected; the server rotated it, re-pairs by itself in a moment |
Manual fallback (the helper is turned off with --no-native-host, or Connect
reports a problem): run npx -y mcp-browser-extension@latest --print-pairing,
open the extension's Settings, and paste the port + token from
~/.mcp-browser-extension/handshake.json.
Extension missing after restarting Chrome
Run the read-only diagnostic to see the actual installation type, missing files, Chrome disable reasons, and any conflicting extension registrations:
npx -y mcp-browser-extension@latest extension doctorOlder unpacked copies could acquire a new ID when an update added the Web Store public key to their manifest. Chrome then retained both IDs for one folder and skipped that folder on its next startup. Updates now preserve existing IDs. For an installation already affected by this exact conflict:
npx -y mcp-browser-extension@latest extension repair
# Review the preview, fully quit Chrome and other Chromium browsers, then:
npx -y mcp-browser-extension@latest extension repair --applyThe repair backs up the original preferences under
~/.mcp-browser-extension/extension-repair-backups/, removes only the confirmed obsolete
registration, and preserves the current extension and its saved settings. It
refuses to write while a Chromium browser is running. Reopen Chrome afterwards.
Use --user-data-dir <directory> for a custom browser data location, or
extension doctor --json for a diagnostic report. Reports contain extension
paths and registration status, but no browsing history, cookies or pairing tokens.
A Web Store installation with no matching stale-ID conflict is left unchanged. If the diagnostic finds missing files, a disabled Store copy, or no registration, that needs its own diagnosis; this command does not assume the cause or reset the browser profile. When moving from an unpacked copy to the Store version, remove the unpacked copy first, then install from the Store.
Running more than one session
Every MCP host session (each Claude terminal, tab or window) starts its own MCP Browser Extension server, and they all share your Chrome at once. The first one to start owns the bridge port and the extension connections — the hub. Each later session finds the port held by a live MCP Browser Extension server and joins it as a peer: its tool calls are relayed through the hub to the same browsers, so every session keeps working side by side. Nobody is disconnected.
When the hub's session ends, its peers race for the port; one takes it over
(with the same token, so the extension re-pairs by itself within a few seconds)
and the rest join the new hub. A call that was in flight at that moment fails
once with EXTENSION_DISCONNECTED and is retried automatically when it is safe
to repeat.
Peers authenticate to the local transport with the pairing token from the 0600 handshake file. That token alone cannot authorize browser commands: each session must sign its own commands with a key approved inside Chrome. A server too old to share the port is replaced as before: it is verified to be an MCP Browser Extension server, then stopped. Anything that isn't a verified MCP Browser Extension server is never touched — a port held by some other program is reported, never killed.
Sessions share one browser, so they also share its tabs: two sessions driving
the same tab at the same moment will step on each other. Give each session its
own tabs (tab_new), or its own Chrome profile (below).
Each session can also drive several browsers at once: load the extension
in each Chrome profile and they all pair to the same server, each under its own
profile name. Tools act on the active profile — pick it with --profile <name>
at startup or the profile_use tool at runtime.
Naming is automatic. Chrome won't tell an extension which profile it runs in, so
each install keeps a random id and the server names it: the first browser is
default, the next profile-2, then profile-3, and so on. Names are stored in
~/.mcp-browser-extension/profiles.json, so a browser keeps its name across restarts.
chrome_status lists every paired browser (with its active tab as a hint), and
profile_rename gives one a friendly name (profile-2 → work). To pin a name
yourself instead, type it into the extension's Options → Profile; that always wins.
Without --port, each server binds an ephemeral port (no conflict ever), but the
port changes every boot — so you'd re-pair the extension each time. Pin --port
plus --persist-token for a pair-once setup.
Windows
WSL2 is not required — native Windows works. One config change is, though:
on Windows npx is npx.cmd, a batch shim, and MCP hosts spawn the server
without a shell, which cannot execute a .cmd. So "command": "npx" fails to
start. Wrap it in cmd /c:
{
"mcpServers": {
"mcp-browser-extension": {
"command": "cmd",
"args": ["/c", "npx", "-y", "mcp-browser-extension@latest",
"--allow-domain", "example.com", "--enable-mutations",
"--persist-token"]
}
}
}Or from Claude Code: claude mcp add mcp-browser-extension -- cmd /c npx -y mcp-browser-extension@latest --allow-domain example.com
For normal use, install the extension from the Chrome Web Store as described
above, then click Connect. Do not use Load unpacked as part of the normal
Windows setup. The unpacked developer build has the same extension ID as the
Store build, so loading it can replace the Store installation; Chrome may then
disable the non-Store copy. If you are developing mcp-browser-extension, load
%USERPROFILE%\mcp-browser-extension in a separate Chrome profile.