Claw in Chrome Deep Dive: Unlocking the Claude Browser Extension
> When official restrictions become shackles, community ingenuity forges the key.
Key points
- Claw in Chrome is a community-modified, open-source unlock of Anthropic's official Claude in Chrome extension, version 1.0.66, developed by S-Trespassing.
- It removes the forced Anthropic account login and Claude Pro/Team subscription requirements of the original.
- Its core innovation is a custom provider system: any OpenAI-compatible or Anthropic-compatible API endpoint can power the extension, with editable reasoning effort, context window, and multiple switchable provider profiles.
- The extension keeps the original's powerful features: SidePanel chat, MCP-based permission management, OAuth, 13-language i18n, and deep browser automation (click, fill forms, navigate, screenshot, execute JavaScript, read accessibility tree).
- Debug logging includes multi-layer data sanitization so exported logs are safe to share.
- Stack: Chrome Extension Manifest V3, React + TypeScript, Vite bundling, Chrome Storage API with a custom
useStorageStatehook, Chrome Extension Message API. - Core modules:
sidepanel-*.js— main chat UI, model selection, permission prompts, OAuth/credential refresh.service-worker-*.js— message routing hub: sidepanel events, OAuth refresh, MCP permission replies, native messaging,clau.de/chrome/*URL protocol handling.PermissionManager-*.js— permission checks (sidePanel, scripting, debugger), requests, and status broadcast.mcpPermissions-*.js— browser automation tools with a domain-verification security check before each action.- Supported formats:
anthropic(/messages),openai_chat(/chat/completions),openai_responses(/responses). - Anthropic-format requests are transparently converted to OpenAI format (and responses back), including SSE streaming, error normalization, and token usage mapping.
- Zero modification of original code required; format is auto-inferred from base URL and model name.
- Models can be fetched from a provider's
/modelsendpoint, with conversational models (claude, gpt, o-series, sonnet, opus, haiku…) sorted first. - GitHub: https://github.com/S-Trespassing/claw-in-chrome
- Chrome Extension docs: https://developer.chrome.com/docs/extensions/
Technical architecture
Custom provider adapter
The standout feature is a request/response translation layer that intercepts the global fetch:
Reverse engineering methodology
The project is based on deobfuscating the minified production build: breakpoint debugging, string search for API endpoints, behavioral analysis, and semantic renaming of compressed identifiers ($Q, qQ, t1, auth.refresh_state, __cpModelBootstrap*).
Usage
1. Clone the repo: https://github.com/S-Trespassing/claw-in-chrome
2. Open chrome://extensions/, enable Developer Mode, and load the unpacked folder.
3. Configure a provider in the options page (name, format, base URL, API key, default model, reasoning effort, context window), optionally fetch models, save, and restart the side panel.
4. Toggle the sidebar with Ctrl+E / Cmd+E.
Security considerations
The extension requests broad permissions (debugger, nativeMessaging, scripting, tabs, webNavigation, etc.), enabling powerful automation but carrying real risk. Mitigations include sensitive-key redaction in debug logs, managed schema support (URL blocklists, org binding), and the per-action domain verification in automation tools. Install only from trusted sources and disable during sensitive operations.
Relation to OpenClaw
Thanks to its MCP support, Claw in Chrome could theoretically act as a Browser Relay for OpenClaw — natively integrated, visible to the user, with no separate relay install — though gateway protocol alignment, security boundary coordination, and Service Worker lifecycle limits remain challenges.
Outlook
Potential future directions: Firefox/Safari ports, VS Code integration, and local model support (Ollama, LM Studio).
References: