# Firefox DevTools MCP server

> Lets AI agents browse websites and inspect Firefox pages using developer tools like console, network, debugger, and profiler.

- Repository: https://github.com/mozilla/firefox-devtools-mcp
- Page: https://hostedmcp.org/servers/mozilla/firefox-devtools-mcp
- Transport: stdio
- Stars: 571
- Latest version: 0.10.7

## Install

### Claude Code

```sh
claude mcp add firefox-devtools-mcp -- npx -y @mozilla/firefox-devtools-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "firefox-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mozilla/firefox-devtools-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "firefox-devtools-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mozilla/firefox-devtools-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"firefox-devtools-mcp","type":"stdio","command":"npx","args":["-y","@mozilla/firefox-devtools-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "firefox-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mozilla/firefox-devtools-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add firefox-devtools-mcp -- npx -y @mozilla/firefox-devtools-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

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

### Gemini CLI

```sh
gemini mcp add -s user firefox-devtools-mcp npx -- -y @mozilla/firefox-devtools-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "firefox-devtools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@mozilla/firefox-devtools-mcp"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `FIREFOX_HEADLESS` | no | no | Set to true to run Firefox without a visible window. |
| `START_URL` | no | no |  |
| `START_URL` | no | no | URL to open when the server starts. |

## Tools (6)

- `slim`
- `basic`
- `developer`
- `mozilla`
- `all`
- `true`

## FAQ

### Does Firefox DevTools MCP require a local Firefox install?

Yes. The server launches or attaches to a local Firefox browser and cannot run on cloud hosting services.

### How do I install Firefox DevTools MCP with Claude Code?

Add it as an MCP server via the claude mcp add command using npx with the @mozilla/firefox-devtools-mcp package.

### Can it attach to an already running Firefox instead of launching a new one?

Yes, pass the --connect-existing flag (or CONNECT_EXISTING=true) to attach to a running Firefox; Marionette port defaults to 2828.

### What tool presets are available?

Presets are slim, basic (default), developer, mozilla, and all, each a superset of the previous; you can also pick modules explicitly with --tools.

### Can it automate Firefox on Android?

Yes, using --android-device with --android-wipe-app-data, but it wipes all app data before every session and requires adb.
