Skip to main content
Glama
Agent Bridge for Firefox

Agent Bridge for Firefox

by Jetemple

Agent Bridge for Firefox

Let coding agents and MCP clients drive the Firefox you're signed into, in background tabs, without touching the tab you're on. Use the ff CLI from any shell agent, or connect an MCP client.

Trust: anything that can run ff or reach the MCP endpoint can act as you on every site you're signed into. Only connect agents you trust.

Requires Firefox 142+ and Node 20+. Tested on macOS and Linux.

Install

git clone https://github.com/Jetemple/firefox-agent-bridge.git
cd firefox-agent-bridge
npm run setup        # deps + `ff` on PATH; add `-- --desktop` or `-- --cowork` for those apps

Install the signed extension from the latest release (open the .xpi in Firefox). Working on the extension itself? Load it temporarily instead: about:debugging#/runtime/this-firefox β†’ Load Temporary Add-on… β†’ firefox-extension/manifest.json. Then:

ff status            # bridge + extension
ff nav example.com   # opens in a background πŸ€– tab
ff text              # read it

Run ff --help for every command.

Related MCP server: firefox-bridge

Tell your agent

Add to your CLAUDE.md / AGENTS.md:

You can drive my logged-in Firefox with `ff` (run `ff --help` once). It works in its
own background tab; use `--here` only when I ask about the page I'm on. `nav` and
`click` don't wait, so verify with `ff text`.

To have an agent set this up or change the code, point it at AGENTS.md.

MCP clients

  • Claude Desktop: npm run setup -- --desktop, then restart Desktop.

  • Cowork: npm run setup -- --cowork, then upload firefox-bridge.plugin. This exposes the bridge on your LAN behind a token.

  • Anything else: http://127.0.0.1:3003/mcp (Streamable HTTP).

Security

  • Binds localhost only by default. LAN exposure (--cowork) always uses a token.

  • The extension relay and the CLI endpoint reject requests from web pages.

  • Sites can detect it: input events are synthetic (isTrusted: false) and the agent tab's title starts with πŸ€–.

Configuration

Env var

Default

FIREFOX_BRIDGE_WS_PORT / _SSE_PORT

3002 / 3003

extension relay / HTTP MCP ports

FIREFOX_BRIDGE_SSE_HOST

127.0.0.1

HTTP bind address; pair 0.0.0.0 with a token

FIREFOX_BRIDGE_SSE_TOKEN

none

required bearer token for HTTP

FIREFOX_BRIDGE_AGENT_TAB_IDLE_MS

2 hours

close idle agent tabs; 0 disables

FIREFOX_BRIDGE_LOG_DIR

~/.firefox-mcp

bridge log location

Permanent install

To sign your own build, get AMO API keys, export WEB_EXT_API_KEY / WEB_EXT_API_SECRET, set your own gecko.id in the manifest, and run npm run sign. Open the .xpi from web-ext-artifacts/.

Development

npm test                 # all unit tests
npm run lint:extension

MIT licensed.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables MCP-capable CLIs to operate real, already-logged-in Firefox tabs via a WebExtension and native messaging, without simulated input. Supports navigation, clicking, typing, reading, screenshots, and console/network capture with policy gating and frame awareness.
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to create, read, and operate granted background tabs in Chrome via a local stdio MCP server, preserving the human's front tab. Supports tab groups, navigation, clicking/typing, screenshots, and human-priority permissions.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables an MCP client to drive a real, already-logged-in Firefox session through a WebExtension rather than a WebDriver connection, so tabs, cookies and logins work as-is without relaunching the browser under remote-control flags. Exposes tools for tab listing and selection, navigation, accessibility-style snapshots, clicking, filling, typing, key presses, file uploads, screenshots and waiting, with per-origin permission grants and opt-in script evaluation.
    MIT