# Firefox DevTools MCP

> Firefox DevTools MCP is an open-source MCP server for browser automation. Lets agents drive Firefox for browsing, form filling and developer-tools debugging. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted, macOS, Windows, Linux
- **Repository:** https://github.com/mozilla/firefox-devtools-mcp
- **MCP Registry name:** io.github.mozilla/firefox-devtools-mcp
- **Categories:** [browser automation](https://ai-powered.com/categories/browser-automation), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

Mozilla's server gives an agent control of a local Firefox through WebDriver BiDi, using Selenium. It has two stated uses: agentic browsing, such as reading pages and going through multi-step flows, and agent-assisted web development, where the agent loads your page and inspects the console, network requests, debugger and profiler. It needs Node.js 20.19 or newer and Firefox 100 or later.

Tools are grouped into modules chosen by preset: slim, basic (the default), developer and mozilla, or all. The README warns that the basic preset already includes evaluate_script, that higher presets add debugging and privileged context, and that you should use a dedicated Firefox profile because the agent can reach cookies and saved sessions. Page content can also carry prompt injection.

Other options include headless mode, a viewport size, attaching to a running Firefox, Firefox for Android through ADB, and a log file. It is dual licensed MIT and Apache.

## Features

- **Page navigation:** Lists, selects and navigates pages and tabs.
- **Snapshot-based interaction:** Takes a snapshot, then clicks or fills elements by uid.
- **Network and console:** Captures network requests, downloads and console messages.
- **Tool presets:** slim, basic, developer, mozilla or all control what the agent can do.
- **Android mode:** Targets Firefox for Android via an ADB device.
- **Attach to running Firefox:** connect-existing reuses an open browser session.

## Good for

- Debug a page with console and network data
- Fill and submit a form in a test run
- Capture screenshots of a page
- Profile or inspect a site under development
- Run browser flows on an Android device

## Install

### Claude Code: Add with the CLI (Terminal)

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

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "firefox-devtools-mcp": {
      "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"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

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

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

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

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

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

### Codex: Or add to config.toml (~/.codex/config.toml)

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

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

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

Or run: gemini mcp add -s user firefox-devtools-mcp npx -- -y @mozilla/firefox-devtools-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

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

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

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

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

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

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

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

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

From the tool list in its README, going by the names, 1 of 13 tools changes data; 7 names don't say. From the server's own tool labels and tool names; not verified by us.

- `list_pages` (name suggests: reads): Lists open pages.
- `select_page`: Selects a page.
- `navigate_page`: Navigates a page to a URL.
- `take_snapshot`: Takes a snapshot of page elements.
- `click_by_uid`: Clicks an element by uid.
- `fill_by_uid`: Fills an element by uid.
- `list_network_requests` (name suggests: reads): Lists captured network requests.
- `get_network_request` (name suggests: reads): Gets one network request.
- `list_downloads` (name suggests: reads): Lists captured downloads.
- `set_download_behavior` (name suggests: changes): Sets download behaviour.
- `screenshot_page`: Takes a screenshot.
- `list_console_messages` (name suggests: reads): Lists console messages.
- `evaluate_script`: Runs a script in the page.

## FAQ

### What does Firefox DevTools MCP need?

Node.js 20.19 or later and Firefox 100 or later.

### How do I add Firefox DevTools MCP to Claude Code?

claude mcp add firefox-devtools npx @mozilla/firefox-devtools-mcp@latest.

### Is Firefox DevTools MCP safe on my normal profile?

The README says never; use a dedicated profile.

### Can Firefox DevTools MCP run headless?

Yes, with --headless or FIREFOX_HEADLESS=true.

### Is Firefox DevTools MCP free?

Yes. Firefox DevTools MCP is open source, so you can use and self-host it for free.

### What are the best alternatives to Firefox DevTools MCP?

The closest alternatives to Firefox DevTools MCP are REA, Browser Use, Scrapling MCP Server, Context7 and Chrome DevTools MCP.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Browser Use](https://ai-powered.com/mcp/browser-use): Browser Use is a freemium MCP server for browser automation.
- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): Scrapling MCP Server is an open-source MCP server for web search and scraping.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/firefox-devtools-mcp
