claude-for-firefox
Drives a real Firefox browser: lists and creates tabs, navigates to allowed domains, reads page content, finds elements, clicks, types, scrolls, takes screenshots, uploads files, and reads console messages. Actions are performed via synthetic DOM events in the page, with per-domain consent and safety guards.
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-for-firefoxopen a new tab to example.com 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 for Foxfire (unofficial)
This is an unofficial community project. It is not affiliated with, endorsed by, or sponsored by Anthropic. Claude is a trademark of Anthropic.
Lets Claude Code drive your real Firefox: your own tabs, your own logins. Clicks and typing are performed with synthetic DOM events inside the page; no system-level input is ever generated. Communication is over a local unix socket only: no network port is opened.
Architecture
Claude Code ──stdio/MCP──> src/server.mjs ──unix socket (mode 600)──> src/host.mjs
│ native messaging
v
Firefox extension (background.js)
│
v
content script in the page (DOM events)src/server.mjs: MCP server (stdio), exposes the tools below, owns the socket ($XDG_RUNTIME_DIR/claude-in-firefox.sock, override withCLAUDE_IN_FIREFOX_SOCK).src/host.mjs: native messaging host launched by Firefox, bridges the socket and the extension.extension/: Manifest V2 extension (background page + content script, popup, options page).
Related MCP server: Kamurafox
Requirements
Linux. The bridge socket lives in
$XDG_RUNTIME_DIRandbin/install-host.mjswrites only to~/.mozilla/native-messaging-hosts. macOS and Windows are not supported (the host manifest location differs there and is not handled).Firefox 128 or newer (
strict_min_versionin the extension manifest), installed as a regular package (deb or tarball). With Snap or Flatpak the native messaging directory is different and this setup has not been tried.Node.js (tested with 22). It must stay installed: the native messaging host wrapper runs it.
Install
npm install
node bin/install-host.mjs # writes the native messaging manifest in ~/.mozilla/native-messaging-hosts/
npm run build # produces dist/claude-for-firefox-<version>.xpi(node bin/install-host.mjs --uninstall removes the host manifest.) The host wrapper records the
absolute path of the node that ran install-host.mjs: re-run it if you change Node version.
Load the extension, either:
temporarily:
about:debugging→ This Firefox → Load Temporary Add-on… → pickextension/manifest.json(gone at the next restart); orpermanently: Firefox release requires signed extensions. Sign it as unlisted with your own addons.mozilla.org API keys:
export WEB_EXT_API_KEY=... # "JWT issuer" from the AMO API keys page export WEB_EXT_API_SECRET=... # "JWT secret" npm run sign # output in dist/signed/Each signature needs a new
versioninextension/manifest.json. Open the signed.xpiin Firefox to install it.
The extension id is claude-for-firefox@unofficial.extension; it must match allowed_extensions in the
host manifest (done by install-host.mjs).
Register the MCP server with Claude Code:
claude mcp add claude-for-firefox -- node /path/to/src/server.mjsQuick check
claude mcp listshould showclaude-for-firefoxas connected.With Firefox open and the extension loaded, ask Claude to use
tabs_context: it should list your tabs.Before
navigateorread_pageon a site, allow its domain from the extension popup (or options page); otherwise the call is refused with «dominio … non autorizzato».
Permissions
Firefox asks for these when you install the extension:
nativeMessaging: talk to the local host (src/host.mjs), which relays to the MCP server over the unix sockettabs: list tabs and read their url/title, open and close the tabs Claude createsstorage: keep your allowed domains and settingssessions: mark the tabs Claude created, sotabs_closeonly closes thosetabGroups: put the tabs Claude opens in a «Claude» group<all_urls>: inject the content script into the page you allowed; it can only be injected once the domain is allowed (see below)
The manifest also declares that the extension handles browsing activity and website content, as Firefox requires. These install-time permissions are not the limit on what Claude can do: the real limit is the per-site consent below.
Per-site permissions
Claude acts only on domains you allow (and their subdomains). Manage them from the extension popup
(button for the current tab's domain) or the options page. Actions on a non-allowed domain are refused.
tabs_context and tabs_create are always allowed. navigate/tabs_create accept only http(s)
(and about:blank for tabs_create): never file:, moz-extension:, javascript:, data:.
MCP tools
tabs_context, tabs_create (opens in background), tabs_close (only tabs created by Claude),
navigate, read_page, find, click, form_input, type, press_key, scroll, screenshot,
file_upload, javascript_tool (off by default, enable it in the options page),
read_console_messages.
Safety guards
Variable | Effect |
| only observation tools ( |
| actions per minute cap (default 120) |
| JSONL audit log (default |
Typing into password fields is refused. Ideas for these guards come from nanogenomic/ClaudeCodeBrowser (MIT); the code was rewritten, not copied.
Known limits
Synthetic events have
isTrusted=false; some sites (payments, captchas, some logins) reject them.Screenshots of background tabs can occasionally come back blank; the extension retries and then reports an error.
javascript_toolrelies on page-leveleval: a strict CSP may block it.Main frame only (no iframes). Several Claude Code sessions can share one Firefox: the first MCP server owns the socket, the others relay their calls through it.
Privacy
The extension sends nothing over the network by itself. Page contents it reads go only to the local Claude Code process, which in turn sends them to Anthropic like any other content of your conversation. Enable it only on sites you are comfortable sharing with the model.
Tests
node test/e2e.mjs starts a regular (non-headless) Firefox on its own Xvfb display, with a temporary profile
and HOME (your real Firefox and profile are not touched; it needs Firefox at /usr/lib/firefox/firefox,
xvfb, and python3).
Other benches: test/guard.mjs, test/client-guard.mjs, test/multi.mjs, test/upload.mjs, test/cursor.mjs.
License
MIT, see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Live browser debugging for AI assistants — DOM, console, network via MCP.
Related MCP Servers
- 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
- AlicenseNot gradedqualityAmaintenanceEnables an MCP client such as Claude Code to read and operate your real, everyday Firefox profile — reading pages, clicking, typing, navigating, switching tabs and taking screenshots — with per-action human approval and masking of password, one-time-code and credit card fields.MIT
- AlicenseNot gradedqualityAmaintenanceEnables Claude Code to control a real browser for navigation, interaction, screenshots, accessibility snapshots, and automated end-to-end testing through MCP tools.106 npmMIT