claude-in-firefox
Enables browser automation in Firefox: list, open, and close tabs; navigate pages; click, type, scroll, hover, and drag; take screenshots; read the page as an accessibility outline; find elements; fill forms; run JavaScript in the page; read console and network logs; resize the viewport; and batch multiple browser actions.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-in-firefoxopen github.com in a new tab and take a screenshot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Claude in Firefox
A Firefox WebExtension (shown in Firefox as Claude Browser Bridge, since add-on names may not contain the Firefox trademark) plus an MCP server that lets Claude Code (CLI and desktop app) drive Firefox the way the official Claude in Chrome extension drives Chrome: list tabs, navigate, click, type, scroll, take screenshots, read the page as an accessibility outline, fill forms, run JavaScript, and read console and network logs.
Anthropic ships no Firefox extension (its help centre says Claude in Chrome supports only
Google Chrome). This project is an independent, clean-room implementation: it contains no
Anthropic code or assets and never touches your Claude credentials. It is not the
claude.ai side panel chat; it is the browser-automation half, exposed to Claude Code as
tools named mcp__claude-in-firefox__*.
Tools
Tool | What it does |
| list / open / close tabs (every other tool takes an optional |
| open a URL, or go |
|
|
| indented outline with roles, names, state and |
| substring search over the outline, returns refs |
| set inputs, selects, checkboxes, contenteditable by ref |
| readable text, main content first |
| evaluate code in the page with console semantics (top-level |
| per-tab console capture and request log, XHR/fetch bodies by |
| mobile / tablet / desktop presets or a custom viewport |
| several calls in one round trip |
Coordinates are CSS pixels of the viewport and map 1:1 onto the screenshot the model just
took (scale shrinks the image and the note says how to convert back).
Related MCP server: firefox-use
Architecture
Claude Code / desktop app
│ MCP over stdio
▼
dist/mcp-server.js ── JSON lines over a Unix socket ──▶ dist/native-host.js
(one per Claude session) $XDG_RUNTIME_DIR/claude-in-firefox.sock (spawned by Firefox,
one per extension)
│ native messaging
│ (4-byte length + JSON)
▼
extension background.js
tabs · screenshots · console/network stores
│ tabs.sendMessage
▼
content.js in each page
outline/refs · pointer · keyboard · forms · evalThe native host multiplexes any number of MCP servers onto the single extension connection,
so several Claude Code sessions can share one Firefox. All wire types live in
extension/src/shared/protocol.ts.
Install
Requirements: Firefox 128+, Node.js 22+, Claude Code.
git clone https://github.com/diegochagas/claude-in-firefox
cd claude-in-firefox
./scripts/setupscripts/setup installs dependencies, builds dist/, writes the native-messaging manifest
to ~/.mozilla/native-messaging-hosts/claude_in_firefox.json (pointing at this checkout) and
registers the MCP server in Claude Code (user scope) as claude-in-firefox. Re-running it is
safe. Pass --no-mcp to skip the Claude Code registration.
Then install the extension in Firefox, one of:
Signed release (recommended): download the latest
.xpifrom Releases and open it in Firefox (about:addons→ gear → Install Add-on From File, or drag it onto a window). It is signed by Mozilla through the unlisted channel, so it stays installed, and the manifest'supdate_urlpoints at the release'supdates.json, so Firefox pulls newer versions by itself.Try it now (temporary):
npm run firefoxopens your default profile with the extension loaded until Firefox quits, or useabout:debugging#/runtime/this-firefox→ Load Temporary Add-on →dist/extension/manifest.json.
The toolbar badge reads on when the native host is connected; clicking the icon opens a
status popup (connection state, tabs Claude has driven, a Reconnect button). There is no chat
panel: Claude drives the browser from a Claude Code session. A new Claude Code session
then lists the claude-in-firefox tools; pick a tab with tabs_context and go.
Development
npm run watch # rebuild dist/ on change
./scripts/check # prettier + tsc + eslint + vitest + build + clean-code audit (the pre-push gate)
./scripts/e2e # real headless Firefox through web-ext; screenshots in e2e/screenshots/Unit tests run the content-script modules under jsdom and the MCP tools against a
FakeBridge. The e2e suite starts a local fixture server, launches Firefox headless with the
built extension, waits for the native host's socket (isolated via CLAUDE_IN_FIREFOX_SOCKET)
and calls every tool through an in-memory MCP client.
Releasing
./scripts/release 0.2.0 --dry-run # build + lint, publishes nothing
./scripts/release 0.2.0 # bump, sign with AMO, publish xpi + updates.jsonscripts/release needs addons.mozilla.org API credentials in config.env (see
config.env.example; the file is gitignored). It bumps extension/manifest.json and
package.json, builds, signs dist/extension on the unlisted channel, regenerates
updates.json (previous versions kept, sha256 hash per file via
scripts/build-updates-json.ts), commits and tags v<version>, pushes, and creates the
GitHub Release with the .xpi and updates.json attached. The update_url always resolves
through releases/latest/download/updates.json, so the newest release is what installed
copies see.
Limitations
Events are synthetic (
isTrustedis false). Links, buttons, form controls and framework handlers work; file pickers, popups and anything needing a real user gesture do not. Firefox has nochrome.debuggerequivalent for trusted input.Extensions cannot run on
about:,moz-extension:, addons.mozilla.org or the PDF viewer.prefers-color-schemecannot be emulated per tab;resize_windowresizes the real window.javascript_toolevaluates in the page's world; pages whose CSP forbidsevalfall back to the content-script world (DOM visible, page globals not), and the result says so.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Hosted browser for agents: open pages, search the web, extract data, read PDFs and take screenshots.
Provides cloud browser automation capabilities using Stagehand and Browserbase, enabling LLMs to i…
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables Claude Code to inspect network traffic, query the DOM, read console logs, and capture WebSocket frames in Firefox.17-
- MIT
- AlicenseBqualityCmaintenanceLets Claude Code attach to a running, signed-in Firefox over WebDriver BiDi to control tabs, navigate, screenshot, read pages, click, type, fill forms, evaluate JavaScript, and inspect console/network activity.22MIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude Code to drive a local Firefox browser: opening and managing tabs, navigating, reading page structure and text, clicking, typing, filling forms, running JavaScript, taking screenshots, and inspecting console messages and network requests. Everything runs over a local Unix socket with no network traffic, and actions are restricted to tabs explicitly placed under Claude's control.4 npmGPL 3.0