Skip to main content
Glama
claude-for-firefox

claude-for-firefox

by d7omdev
README.md
<div align="center">

<img src="extension/static/icons/icon-128.png" width="88" alt="Claude for Firefox icon">

# Claude for Firefox

**Let Claude use your own Firefox.** Open tabs, read pages, click, type, fill forms, drag, upload files and take screenshots, in the browser you already use, with your existing sign-ins. You always see what Claude is doing, and you can stop it with one click.

Works with Firefox, Zen, LibreWolf, Floorp and Waterfox, and with Claude Code or any MCP client.

<sub>Unofficial project. Not affiliated with Anthropic or Mozilla.</sub>

</div>

![Claude searching Wikipedia in Firefox: an arrow cursor with a "Claude" tag, a soft orange glow around the page, and the "Claude is using this tab · Stop" bar at the bottom](docs/images/hero.png)

## Why

- **Your real browser.** No separate profile, no headless Chrome. Claude works in the Firefox you're signed in to, with your extensions and cookies.
- **You can see it.** A cursor with a Claude tag glides like a person's to every click and drag, a soft glow marks the tab Claude is working in, and a bar at the bottom says so.
- **You stay in charge.** Claude can read any tab, but asks before acting in one you opened. One click on **Stop** freezes it everywhere.
- **Nothing leaves your computer** except what Claude reads, which goes to your own Claude app. There's no server, no account and no tracking.

## Install

1. **Install the add-on** from [addons.mozilla.org](https://addons.mozilla.org/firefox/addon/claude-for-firefox/).
2. **Install the helper** (needs [Node.js](https://nodejs.org) 18 or newer):
   ```
   npx claude-for-firefox install
   ```
   This registers the helper with Firefox (and Zen, LibreWolf, Floorp and Waterfox, if you have them) and adds it to Claude Code. There are no codes to copy and no ports to open.
3. **Restart Claude Code.** The add-on's toolbar icon turns green **ON**. Then ask something like *"Open Wikipedia in Firefox and summarise today's featured article."*

The setup page opens by itself after you install the add-on. It shows live whether things are connected, and has a message you can paste into Claude Code so Claude runs the install for you.

<p align="center"><img src="docs/images/setup.png" width="640" alt="Setup page: Waiting for Claude, with the install command and a Copy button"></p>

**Using Claude Desktop or another MCP app?** The install command prints the exact settings to paste into that app's MCP config.

**Uninstall:** `npx claude-for-firefox uninstall`, then remove the add-on from `about:addons`.

## You stay in control

### The bar

While Claude works in a tab, a bar rises out of the bottom edge: **"Claude is using this tab"** with a **Stop** button. Minimise it to just the Claude logo whenever you like.

<p align="center"><img src="docs/images/bar-morph.gif" width="520" alt="The bar morphing out of the bottom edge, minimising to the Claude logo, opening again and sinking away"></p>

### Stop

Press **Stop** and Claude is frozen in every tab immediately. That includes an action already halfway through. Claude is told you stopped it and to ask you how to continue. The toolbar icon shows a red **STOP** badge until you press **Resume**. Only a real click counts: Claude can't press Stop or Resume itself.

### Permission per tab

Claude can always **read** your tabs. To **act** in a tab you opened, it needs your OK first: the bar asks **"Claude wants to use this tab"** with **Allow** and **Don't allow**. Tabs Claude opens itself need no question. A permission lasts while the tab stays on the same site, and the toolbar popup lists every tab Claude may use, each with **Revoke**.

<p align="center"><img src="docs/images/popup.png" width="300" alt="Toolbar popup: Connected, the tabs Claude may use with Revoke, Setup & help, and recent actions"></p>

### Built-in limits

- Claude can't type into password, payment or one-time-code fields. You fill those in.
- It can only open web addresses, never links that launch apps or open local files.
- If a page jumps to another site in the middle of an action, the action is stopped.
- Pop-up questions ("Delete this item?") are answered **Cancel** by default, and only for two minutes after Claude acts. You can change this, or have them shown to you.
- Secrets that look like tokens and passwords are blanked out in console and network logs. This is best effort.
- If you allow the add-on in private windows, nothing about them is logged.

## What Claude can do

| | Tools |
|---|---|
| **Tabs** | `tabs_list`, `tab_open`, `tab_select`, `tab_close`, `navigate`, `resize_window` |
| **Read** | `screenshot`, `zoom` (sharp close-up of a region), `read_page`, `get_page_text`, `find` |
| **Act** | `click`, `type`, `key`, `scroll`, `hover`, `drag`, `form_input`, `file_upload` |
| **Debug** | `read_console_messages`, `read_network_requests` |
| **Local files** | `open_local`: open a page from a folder you approved, such as a site you built |
| **Speed** | `batch`: up to 20 of the above in one go, checked before any of them runs |
| **Status** | `connection_status`, `wait` |

Clicks and typing are simulated inside the page, so CSS-only hover menus don't open, and a few sites ignore simulated input.

## Settings

Most people never need these. Approved folders are a list you add to and remove from. File uploads are a separate switch, off by default.

<p align="center"><img src="docs/images/options.png" width="560" alt="Advanced settings: local folders list with Add folder, uploads switch, permission per tab, and pop-up dialog choices"></p>

## How it works

```
Claude Code ── MCP (stdio) ──▶ helper ── private local socket ──▶ helper ── native messaging ──▶ add-on
              (started by Claude)                          (started by Firefox)
```

- The **add-on** does the work in the page: the cursor, the bar, clicks and screenshots.
- The **helper** is the `claude-for-firefox` npm package. It has no dependencies and runs twice: once started by Claude as an MCP server, and once started by Firefox through native messaging.
- The two copies of the helper talk over a socket that only your user account can open, and they also check a private key. Firefox only lets this add-on start the helper.
- Installing again restarts the helper by itself, with no browser restart needed.

## Repository

| Folder | What |
|---|---|
| `extension/` | The add-on (Manifest V2). TypeScript in `src/`, pages, styles and icons in `static/`. |
| `connector/` | The `claude-for-firefox` npm package: MCP server, native messaging host, installer. TypeScript in `src/`. |

## Build from source

Needs [Bun](https://bun.sh) and Node.js 18+.

```
bun install
bun run check      # typecheck, build, tests, web-ext lint
```

- Load `extension/build/manifest.json` from `about:debugging` → This Firefox → Load Temporary Add-on. `bun run dev` in `extension/` rebuilds it when a file changes.
- Install your local helper with `node connector/dist/index.js install`.
- The add-on in `extension/build/` is bundled one file per entry with `bun build`, not minified. To package it for upload, run `bunx web-ext build --source-dir extension/build` from `extension/`.

### Known limits

- Snap and Flatpak builds of Firefox look for native messaging in a different place, and aren't supported yet.
- Windows and macOS support is written, but so far it's only been tested on Linux.

## Thanks

- [Firefox MCP Connect](https://github.com/thriftshoppin/claude-firefox-bridge) by thriftshoppin, which this project started from.
- [claude-in-firefox](https://github.com/llyfn/claude-in-firefox) by Taeyun Eom, for ideas behind several browser features.

## License

[MIT](LICENSE)