Browser agent extension (MV3) — functional clone of Claude in Chrome 1.0.81.
Self-hosted API + side panel agent loop, with Claude Code / Desktop open MCP via native messaging.
This fork uses a self-generated RSA public key in the manifest (key) so the Chrome extension ID is stable across Load unpacked paths and does not collide with the Chrome Web Store “Claude in Chrome” id.
| Extension ID | bbkeopmjdjdiiaahndbbjhckdbgblpjn |
| Store Claude in Chrome | fcoeoabgfenejglbffodgkkbkcdhcgfn (can coexist) |
| Public key | keys/extension-public.b64 (committed) |
| Private key | keys/extension.pem (gitignored — keep offline) |
| ID source of truth | keys/extension-id.txt |
Origin for native host allowed_origins:
chrome-extension://bbkeopmjdjdiiaahndbbjhckdbgblpjn/
Allow this id on the host side (env name may vary by CLI build), for example:
export CLAUDE_CHROME_EXTENSION_IDS=bbkeopmjdjdiiaahndbbjhckdbgblpjnOr merge into the native messaging host JSON:
"allowed_origins": [
"chrome-extension://bbkeopmjdjdiiaahndbbjhckdbgblpjn/"
]npm install
npm run buildChrome → chrome://extensions → Developer mode → Load unpacked → select dist/.
Confirm the card shows id bbkeopmjdjdiiaahndbbjhckdbgblpjn. If it is random, the built dist/manifest.json is missing key — rebuild from a clean tree that includes keys/extension-public.b64.
Options page: Base URL + API key for the side-panel agent (self-hosted / proxy). Side panel: Cmd/Ctrl+E or toolbar action.
- Build + Load unpacked as above (fixed id).
- Put the id in CLI
CLAUDE_CHROME_EXTENSION_IDS/ hostallowed_origins. - In Claude Code: Connect local / open browser MCP (wording depends on CLI version).
- Extension should receive
mcp_connectedoverchrome.runtime.connectNative. - First browser tool in a session is typically
tabs_context_mcp(bridge defaultscreateIfEmpty: truewhen omitted).
- Single MCP client at a time is the practical model (one native port session).
tabs_create_mcp: optionalurl(http:///https://, protocol may be omitted → https). Omit / empty →chrome://newtab.update_plan: official densable fieldsdomains[]+approach[]; also accepts free-textplan(string or string[]) which is normalized intoapproach.file_upload: host expands local paths → base64files: [{ data, name, mimeType }]. Required target:ref(fromread_page/find) orcoordinate. Files alone are not enough. Native messaging message size is ~1MB; keep each file well under that after base64 (~700KB raw is a safe guide).- Bridge allowlist includes automation + MCP tab tools,
file_upload,update_plan,shortcuts_*(seeMCP_BRIDGE_TOOLSinsrc/mcp/bridge.ts). - Permissions for MCP use an isolated permission manager; domain-transition “Always continue” is still persisted.
| Script | |
|---|---|
npm run dev |
Vite + CRX HMR |
npm run build |
tsc --noEmit + production dist/ |
npm run typecheck |
Types only |
npm run zip |
Zip dist/ for sharing |
Internal functional clone for self-hosted use. Not affiliated with Anthropic. Do not ship the private keys/extension.pem or reuse this id for a public store listing without rotating keys.
- ((https://linux.do/)) — linux.do 社区