# Firefox DevTools MCP

Connects Firefox to AI agents via MCP for web debugging, network request tracking, console logging, and automated form interaction.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 518
- Author: mozilla
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mozilla/firefox-devtools-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/firefox-devtools-mcp

## What it does

The server drives Firefox via WebDriver BiDi through Selenium WebDriver. It allows the agent to navigate URLs, inspect network traffic, read browser console messages, and click interface elements via structured DOM snapshots. Available tool presets include `slim`, default `basic`, and `developer` for deep inspection.

Running this server requires a local Firefox 100+ installation and Node.js 20.19.0 or higher. Cloud hosting without a local browser instance will fail: the server requires access to a local Firefox binary or a configured Docker container. Always configure a dedicated profile using `--profile-path` because the agent accesses any session cookies present in the active profile.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `FIREFOX_HEADLESS`, `START_URL` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env FIREFOX_HEADLESS=<FIREFOX_HEADLESS> --env START_URL=<START_URL> --transport stdio firefox-devtools-mcp -- npx -y @mozilla/firefox-devtools-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add firefox-devtools-mcp --env FIREFOX_HEADLESS=<FIREFOX_HEADLESS> --env START_URL=<START_URL> -- npx -y @mozilla/firefox-devtools-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "firefox-devtools-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "@mozilla/firefox-devtools-mcp"
            ],
            "env": {
                "FIREFOX_HEADLESS": "<FIREFOX_HEADLESS>",
                "START_URL": "<START_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "firefox-devtools-mcp": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mozilla/firefox-devtools-mcp"
            ],
            "env": {
                "FIREFOX_HEADLESS": "<FIREFOX_HEADLESS>",
                "START_URL": "<START_URL>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e FIREFOX_HEADLESS=<FIREFOX_HEADLESS> -e START_URL=<START_URL> firefox-devtools-mcp npx -y @mozilla/firefox-devtools-mcp
```
Replace <…> with your own values

## When to use it
- Inspect browser console errors and runtime warnings
- Track outgoing network requests and verify response payloads
- Interact with web forms through automated DOM snapshots
- Capture headless page screenshots at a specified viewport size

## Example prompts
- Navigate to `https://example.com` and inspect the network tab for failing requests
- Take a screenshot of the current page with a 1280x720 viewport
- Inspect console messages on the active tab and report any errors

## Similar
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [AIHawk](https://affpapa.org/en/nevibecode/mcp/aihawk.md) — MCP server · ★ 32221
- [Skyvern](https://affpapa.org/en/nevibecode/mcp/skyvern.md) — MCP server · ★ 23263
- [SeleniumBase MCP](https://affpapa.org/en/nevibecode/mcp/seleniumbase-mcp.md) — MCP server · ★ 13169
- [apify-mcp-server](https://affpapa.org/en/nevibecode/mcp/apify-mcp-server.md) — MCP server · ★ 12927

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
