Skip to documentationMCP Browser ExtensionDocs

Develop

Build from source, run the tests, and load the extension from a git clone.

npm install
npm run typecheck       # server/test sources
npm run typecheck:ext   # extension sources (@types/chrome)
npm run build:ext       # bundle the extension → extension-dist/
npm test                # builds, then runs node --test on dist/test
RUN_EXT_SMOKE=1 node --test dist/test/extension-smoke.test.js   # live, headed

The extension

Published on the Chrome Web Store as MCP Browser Extension. Extension versions move only when extension/ changes, so the listed build can sit a release behind the npm package; the two negotiate capabilities on connect, so an older extension loses features rather than breaking.

For normal use, install from the Chrome Web Store above. The following is only for local development; do not load this unpacked copy in the same Chrome profile as the Store extension. On Windows, Chrome may disable a non-Store build.

extension/ builds (esbuild) to extension-dist/, loaded via chrome://extensions → Load unpacked → select ~/mcp-browser-extension, the mirror the server refreshes from extension-dist/ on every boot (loading extension-dist/ directly also works). It pairs itself from the pairing.json the server writes into that folder; the Options page paste of port + token from ~/.mcp-browser-extension/handshake.json (run npx -y mcp-browser-extension@latest --print-pairing to get the path) is only the fallback.

Reads/interaction use chrome.scripting/chrome.tabs — no "is being debugged" banner, CSP-safe reads (isolated world), testable under Playwright. chrome.debugger is used only where it's needed and worth it: trusted: true input (real OS-level events on React/Vue inputs) and screenshot (captures a specific tab without activating it — safe under parallel batch — with true full-page and element capture). Those ops show the debug banner while attached; the session lingers 1.5s after the last op so a burst of them attaches once. Screenshots are JPEG (quality 70) at CSS-pixel size by default — pass format: "png", quality, or scale to change that.

On this page