Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/bug-filing/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: bug-filing
description: File a Bugzilla bug for firefox-devtools-mcp, or draft a bug summary and description. Use when the user asks to file a bug, wants a bug summary/description for a change, or needs to report a defect/enhancement/task in this repo. Drafts the summary and description, and opens a prefilled enter_bug.cgi form in the browser for the user to submit.
description: File a Bugzilla bug for firefox-mcp, or draft a bug summary and description. Use when the user asks to file a bug, wants a bug summary/description for a change, or needs to report a defect/enhancement/task in this repo. Drafts the summary and description, and opens a prefilled enter_bug.cgi form in the browser for the user to submit.
allowed-tools:
- Bash(python3 .agents/skills/bug-filing/file-bug.py:*)
- Bash(python3 .claude/skills/bug-filing/file-bug.py:*)
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/COWORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ At any point, make sure the **Cowork** tab is selected and not the **Chat** tab.

![screenshot of Claude Desktop with the Add marketplace option highlighted](cowork-customize-add-marketplace.png)

6. Paste the URL of this repository (`https://github.com/mozilla/firefox-devtools-mcp`) in the popup, validate.
6. Paste the URL of this repository (`https://github.com/mozilla/firefox-mcp`) in the popup, validate.

![screenshot of Claude Desktop with the repository URL pasted in the popup](cowork-customize-add-marketplace-url.png)

Expand Down
8 changes: 4 additions & 4 deletions .claude-plugin/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Firefox DevTools Plugin for Claude Code
# Firefox MCP Plugin for Claude Code

Control Firefox for automated browsing, web testing, and debugging. Navigate pages, fill forms, click elements, take screenshots, and monitor console/network activity.

Expand All @@ -12,7 +12,7 @@ Control Firefox for automated browsing, web testing, and debugging. Navigate pag
## Installation

```bash
/plugin marketplace add mozilla/firefox-devtools-mcp
/plugin marketplace add mozilla/firefox-mcp
/plugin install firefox-devtools-mcp@firefox-devtools-plugins
```

Expand Down Expand Up @@ -84,5 +84,5 @@ The plugin enables the following by default:

## Links

- [Repository](https://github.com/mozilla/firefox-devtools-mcp)
- [npm](https://www.npmjs.com/package/@mozilla/firefox-devtools-mcp)
- [Repository](https://github.com/mozilla/firefox-mcp)
- [npm](https://www.npmjs.com/package/@mozilla/firefox-mcp)
2 changes: 1 addition & 1 deletion .claude/skills/bug-filing/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: bug-filing
description: File a Bugzilla bug for firefox-devtools-mcp, or draft a bug summary and description. Use when the user asks to file a bug, wants a bug summary/description for a change, or needs to report a defect/enhancement/task in this repo. Drafts the summary and description, and opens a prefilled enter_bug.cgi form in the browser for the user to submit.
description: File a Bugzilla bug for firefox-mcp, or draft a bug summary and description. Use when the user asks to file a bug, wants a bug summary/description for a change, or needs to report a defect/enhancement/task in this repo. Drafts the summary and description, and opens a prefilled enter_bug.cgi form in the browser for the user to submit.
allowed-tools:
- Bash(python3 .agents/skills/bug-filing/file-bug.py:*)
- Bash(python3 .claude/skills/bug-filing/file-bug.py:*)
Expand Down
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Codecov configuration for firefox-devtools-mcp
# Codecov configuration for firefox-mcp
# https://docs.codecov.com/docs/codecov-yaml

# Coverage targets
Expand Down
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ FIREFOX_PROFILE_PATH=
# Tool preset selecting which tool modules to enable (slim, basic, developer, mozilla, all)
TOOL_PRESET=basic

# Debug logging (set to * or firefox-devtools for verbose logs)
# Debug logging (set to * or firefox-mcp for verbose logs)
DEBUG=
12 changes: 11 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,18 @@ jobs:
npm run format:check
npm run build

# Each step skips a version already on npm, so a rerun can finish a partial publish.
- name: Publish main package
run: npm publish --access public --provenance
run: |
PKG=$(node -p "require('./package.json').name + '@' + require('./package.json').version")
if [ "$(npm view "$PKG" version --prefer-online 2>/dev/null)" = "${PKG##*@}" ]; then
echo "$PKG is already published, skipping."
else
npm publish --access public --provenance
fi

- name: Publish compat package
run: npm run publish:compat -- --access public --provenance

- name: Publish moz package
run: npm run publish:moz -- --access public --provenance
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
run: npm run test:run

- name: Create archive
run: tar -czf firefox-devtools-mcp-${{ github.ref_name }}.tar.gz dist package.json README.md LICENSE-APACHE LICENSE-MIT
run: tar -czf firefox-mcp-${{ github.ref_name }}.tar.gz dist package.json README.md LICENSE-APACHE LICENSE-MIT

- name: Build MCPB bundle
run: npm run build:mcpb
Expand All @@ -42,7 +42,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} \
firefox-devtools-mcp-${{ github.ref_name }}.tar.gz \
firefox-mcp-${{ github.ref_name }}.tar.gz \
dist-mcpb/*.mcpb \
--generate-notes

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Contributing to Firefox DevTools MCP
# Contributing to Firefox MCP

## Issues

Issues are tracked on [Bugzilla](https://bugzilla.mozilla.org) under **product: Developer Infrastructure**, **component: Firefox MCP**.

- [File a new issue](https://bugzilla.mozilla.org/enter_bug.cgi?format=__default__&blocked=2026717&product=Developer%20Infrastructure&component=Firefox%20MCP)
- [Meta bug (tracks all firefox-devtools-mcp issues)](https://bugzilla.mozilla.org/show_bug.cgi?id=2026717)
- [Meta bug (tracks all firefox-mcp issues)](https://bugzilla.mozilla.org/show_bug.cgi?id=2026717)

For questions and discussion, join the [#firefox-devtools-mcp Matrix room](https://chat.mozilla.org/#/room/#firefox-devtools-mcp:mozilla.org).

Expand Down
64 changes: 33 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Firefox DevTools MCP
# Firefox MCP

[![npm version](https://badge.fury.io/js/@mozilla%2Ffirefox-devtools-mcp.svg)](https://www.npmjs.com/package/@mozilla/firefox-devtools-mcp)
[![CI](https://github.com/mozilla/firefox-devtools-mcp/workflows/CI/badge.svg)](https://github.com/mozilla/firefox-devtools-mcp/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/mozilla/firefox-devtools-mcp/branch/main/graph/badge.svg)](https://codecov.io/gh/mozilla/firefox-devtools-mcp)
[![npm version](https://badge.fury.io/js/@mozilla%2Ffirefox-mcp.svg)](https://www.npmjs.com/package/@mozilla/firefox-mcp)
[![CI](https://github.com/mozilla/firefox-mcp/workflows/CI/badge.svg)](https://github.com/mozilla/firefox-mcp/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/mozilla/firefox-mcp/branch/main/graph/badge.svg)](https://codecov.io/gh/mozilla/firefox-mcp)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE-MIT) [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE-APACHE)

<a href="https://glama.ai/mcp/servers/@mozilla/firefox-devtools-mcp"><img src="https://glama.ai/mcp/servers/@mozilla/firefox-devtools-mcp/badge" height="223" alt="Glama"></a>
Expand All @@ -14,9 +14,11 @@ Model Context Protocol server that lets AI agents use Firefox. It has two main u

It controls Firefox through WebDriver BiDi (via Selenium WebDriver) and works with Claude Code, Claude Desktop, Cursor, Cline and other MCP clients.

Repository: https://github.com/mozilla/firefox-devtools-mcp
Repository: https://github.com/mozilla/firefox-mcp

> **Note**: This MCP server requires a local Firefox browser installation and cannot run on cloud hosting services like glama.ai. Use `npx @mozilla/firefox-devtools-mcp@latest` to run locally, or use Docker with the provided Dockerfile.
Also published as `@mozilla/firefox-devtools-mcp` for existing setups.

> **Note**: This MCP server requires a local Firefox browser installation and cannot run on cloud hosting services like glama.ai. Use `npx @mozilla/firefox-mcp@latest` to run locally, or use Docker with the provided Dockerfile.

## Security

Expand All @@ -42,31 +44,31 @@ Recommended: use `npx` so you run the latest published version from npm.
#### Claude Code

```bash
claude mcp add firefox-devtools npx @mozilla/firefox-devtools-mcp@latest
claude mcp add firefox npx @mozilla/firefox-mcp@latest

# Headless + viewport via args
claude mcp add firefox-devtools npx @mozilla/firefox-devtools-mcp@latest -- --headless --viewport 1280x720
claude mcp add firefox npx @mozilla/firefox-mcp@latest -- --headless --viewport 1280x720

# Or via environment variables
claude mcp add firefox-devtools npx @mozilla/firefox-devtools-mcp@latest \
claude mcp add firefox npx @mozilla/firefox-mcp@latest \
--env START_URL=https://example.com \
--env FIREFOX_HEADLESS=true
```

#### Codex

```bash
codex mcp add firefox-devtools -- npx @mozilla/firefox-devtools-mcp@latest
codex mcp add firefox -- npx @mozilla/firefox-mcp@latest

# Headless + viewport via args
codex mcp add firefox-devtools -- \
npx @mozilla/firefox-devtools-mcp@latest -- --headless --viewport 1280x720
codex mcp add firefox -- \
npx @mozilla/firefox-mcp@latest -- --headless --viewport 1280x720

# Or via environment variables
codex mcp add firefox-devtools \
codex mcp add firefox \
--env START_URL=https://example.com \
--env FIREFOX_HEADLESS=true \
-- npx @mozilla/firefox-devtools-mcp@latest
-- npx @mozilla/firefox-mcp@latest
```

### Option B — Edit the configuration file
Expand All @@ -78,9 +80,9 @@ Add to Claude Code’s mcp_settings.json:
```json
{
"mcpServers": {
"firefox-devtools": {
"firefox": {
"command": "npx",
"args": ["-y", "@mozilla/firefox-devtools-mcp@latest", "--headless", "--viewport", "1280x720"],
"args": ["-y", "@mozilla/firefox-mcp@latest", "--headless", "--viewport", "1280x720"],
"env": {
"START_URL": "about:blank"
}
Expand All @@ -94,11 +96,11 @@ Add to Claude Code’s mcp_settings.json:
Add to ~/.codex/config.toml:

```toml
[mcp_servers.firefox-devtools]
[mcp_servers.firefox]
command = "npx"
args = ["-y", "@mozilla/firefox-devtools-mcp@latest", "--headless", "--viewport", "1280x720"]
args = ["-y", "@mozilla/firefox-mcp@latest", "--headless", "--viewport", "1280x720"]

[mcp_servers.firefox-devtools.env]
[mcp_servers.firefox.env]
START_URL = "about:blank"
```

Expand All @@ -112,7 +114,7 @@ npm run setup
## Try it with MCP Inspector

```bash
npx @modelcontextprotocol/inspector npx @mozilla/firefox-devtools-mcp@latest --start-url https://example.com --headless
npx @modelcontextprotocol/inspector npx @mozilla/firefox-mcp@latest --start-url https://example.com --headless
```

Then call tools like:
Expand Down Expand Up @@ -172,10 +174,10 @@ surface, and use `--tool-preset slim` or an explicit `--tools` list to drop it.

```bash
# Use the developer preset (adds network, console, debugging and profiler tools)
npx @mozilla/firefox-devtools-mcp --tool-preset developer
npx @mozilla/firefox-mcp --tool-preset developer

# Enable only the modules you need
npx @mozilla/firefox-devtools-mcp --tools pages network console
npx @mozilla/firefox-mcp --tools pages network console
```

The `prefs` and `privileged` modules require `MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1` and are only
Expand Down Expand Up @@ -211,13 +213,13 @@ Use `--android-device` to automate Firefox running on an Android device. Require
adb devices

# Launch Firefox for Android on the single connected device
npx @mozilla/firefox-devtools-mcp --android-device auto --android-wipe-app-data
npx @mozilla/firefox-mcp --android-device auto --android-wipe-app-data

# Target a specific device
npx @mozilla/firefox-devtools-mcp --android-device <serial> --android-wipe-app-data
npx @mozilla/firefox-mcp --android-device <serial> --android-wipe-app-data

# Use Firefox Nightly instead
npx @mozilla/firefox-devtools-mcp --android-device <serial> --android-package org.mozilla.fenix --android-wipe-app-data
npx @mozilla/firefox-mcp --android-device <serial> --android-package org.mozilla.fenix --android-wipe-app-data
```

Port forwarding between the host and device is handled automatically by geckodriver.
Expand All @@ -231,7 +233,7 @@ Use `--connect-existing` to automate your real browsing session, with cookies, l
firefox --marionette --remote-debugging-port

# Run the MCP server
npx @mozilla/firefox-devtools-mcp --connect-existing --marionette-port 2828
npx @mozilla/firefox-mcp --connect-existing --marionette-port 2828
```

Both flags are required because the MCP uses both WebDriver Classic (`--marionette`) and WebDriver BiDi (`--remote-debugging-port`). If Firefox is only started with `--marionette`, the MCP server fails to connect and asks you to restart Firefox with both flags.
Expand Down Expand Up @@ -311,14 +313,14 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on local development, te
- Firefox not found: pass `--firefox-path "/Applications/Firefox.app/Contents/MacOS/firefox"` (macOS) or the correct path on your OS.
- First run is slow: Selenium sets up the BiDi session; subsequent runs are faster.
- Stale UIDs: a UID stays valid until its element is removed or the page navigates; take a fresh snapshot (`take_snapshot`) when a UID tool reports one is gone.
- Windows 10: Error during discovery for MCP server 'firefox-devtools': MCP error -32000: Connection closed
- Windows 10: Error during discovery for MCP server 'firefox': MCP error -32000: Connection closed
- **Solution 1** Wrap with `cmd /c` ([details](https://github.com/modelcontextprotocol/servers/issues/1082#issuecomment-2791786310)):

```json
"mcpServers": {
"firefox-devtools": {
"firefox": {
"command": "cmd",
"args": ["/c", "npx", "-y", "@mozilla/firefox-devtools-mcp@latest"]
"args": ["/c", "npx", "-y", "@mozilla/firefox-mcp@latest"]
}
}
```
Expand All @@ -327,9 +329,9 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on local development, te

```json
"mcpServers": {
"firefox-devtools": {
"firefox": {
"command": "C:\\nvm4w\\nodejs\\npx.ps1",
"args": ["-y", "@mozilla/firefox-devtools-mcp@latest"]
"args": ["-y", "@mozilla/firefox-mcp@latest"]
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: '3.8'

services:
firefox-devtools-mcp:
firefox-mcp:
build:
context: .
dockerfile: Dockerfile
image: firefox-devtools-mcp:latest
container_name: firefox-devtools-mcp
image: firefox-mcp:latest
container_name: firefox-mcp
stdin_open: true
tty: true
environment:
Expand Down
15 changes: 11 additions & 4 deletions docs/ci-and-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ Workflows

- Publish (.github/workflows/publish.yml)
- On GitHub Release published, or via manual dispatch: builds and publishes to npm with provenance.
- Two jobs: `publish` pushes both npm packages, then `publish-mcp-registry` syncs `server.json`
- Two jobs: `publish` pushes the npm packages, then `publish-mcp-registry` syncs `server.json`
to the `package.json` version and publishes to the official MCP Registry.
- `publish` pushes three packages from the same build: `@mozilla/firefox-mcp`, the compat
package `@mozilla/firefox-devtools-mcp` (the name used before the rename, still published so
that existing setups keep updating) and the moz package.
- Manual dispatch takes `npm-publish` (default false) and `mcp-publish` (default true), so a
failed registry publish can be re-run on its own without npm rejecting an already published
version. `release.yml` passes both explicitly when it triggers the workflow.
- Each npm step skips a package whose version is already on npm. If a publish stops
halfway, rerun it with `npm-publish` checked and the release tag as the ref: it
publishes the missing packages with provenance, then registers the version.
- The registry verifies the package on npm, so `publish-mcp-registry` first polls `npm view`
for the version it is about to register, up to five minutes, and fails if it never appears.
- To re-run the registry publish on its own, use the Actions UI, whose checkboxes send real
Expand Down Expand Up @@ -57,14 +63,15 @@ MCP Registry
`packages[].version` in step with `package.json`, and the publish job syncs them again in its
own checkout so a release cannot register a mismatched version.
- The registry proves package ownership through the `mcpName` field in `package.json`, which must
keep matching the `name` in `server.json` (`io.github.mozilla/firefox-devtools-mcp`).
keep matching the `name` in `server.json` (`io.github.mozilla/firefox-mcp`).
- The `io.github.mozilla/*` namespace comes from owning the `mozilla` GitHub organization, so no
DNS verification is involved.
- `mcp-publisher` is pinned to a release and its sigstore bundle is checked with `cosign
verify-blob` before it runs, since it executes in a job holding `id-token: write`. Bumping the
pinned `VERSION` in the workflow is a deliberate step.
- `scripts/generate-moz-package.mjs` and `scripts/build-mcpb.mjs` both strip `mcpName` from the
`package.json` they ship, since neither artifact is the package registered under that name.
- `scripts/generate-moz-package.mjs`, `scripts/publish-compat-package.mjs` and
`scripts/build-mcpb.mjs` all strip `mcpName` from the `package.json` they ship, since none of
these artifacts is the package registered under that name.

Client plugin manifests
- `plugins/*/.claude-plugin/` (Claude), `gemini-extension.json` (Gemini CLI) and the root
Expand Down
2 changes: 1 addition & 1 deletion docs/firefox-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ In WebDriver BiDi mode, Firefox applies [RecommendedPreferences](https://searchf
**Example:** `browser.ml.enable` is disabled by RecommendedPreferences, which prevents testing ML/AI features like Smart Window. Override it:

```bash
npx firefox-devtools-mcp --pref "browser.ml.enable=true"
npx @mozilla/firefox-mcp --pref "browser.ml.enable=true"
```

Runtime (requires `MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1`):
Expand Down
6 changes: 3 additions & 3 deletions gemini-extension.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "firefox-devtools-mcp",
"name": "firefox-mcp",
"version": "0.10.7",
"description": "Control Firefox for browsing, web testing, and debugging. Fill forms, capture network and console activity, take screenshots, run scripts, and profile performance. Supports Android devices.",
"mcpServers": {
"firefox-devtools": {
"firefox": {
"command": "npx",
"args": [
"-y",
"@mozilla/firefox-devtools-mcp@latest",
"@mozilla/firefox-mcp@latest",
"--auto-profile",
"--tool-preset",
"developer",
Expand Down
10 changes: 5 additions & 5 deletions manifest.mcpb.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"manifest_version": "0.3",
"name": "firefox-devtools-mcp",
"display_name": "Firefox DevTools MCP",
"name": "firefox-mcp",
"display_name": "Firefox MCP",
"version": "0.10.7",
"description": "Control Firefox for browsing, web testing, and debugging. Fill forms, capture network and console activity, take screenshots, run scripts, and profile performance. Supports Android devices.",
"author": {
"name": "Mozilla",
"url": "https://github.com/mozilla/firefox-devtools-mcp"
"url": "https://github.com/mozilla/firefox-mcp"
},
"repository": {
"type": "git",
"url": "https://github.com/mozilla/firefox-devtools-mcp.git"
"url": "https://github.com/mozilla/firefox-mcp.git"
},
"homepage": "https://github.com/mozilla/firefox-devtools-mcp",
"homepage": "https://github.com/mozilla/firefox-mcp",
"license": "MIT OR Apache-2.0",
"server": {
"type": "node",
Expand Down
Loading
Loading