Get the FREE Ultimate OpenClaw Setup Guide →

firefox-devtools

Model Context Protocol server for Firefox DevTools - enables AI assistants to inspect and control Firefox browser through the Remote Debugging Protocol

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio freema-firefox-devtools-mcp npx -y firefox-devtools-mcp@latest \
  --env START_URL="https://example.com" \
  --env FIREFOX_HEADLESS="true"

How to use

This MCP server provides automation capabilities for Firefox DevTools via WebDriver BiDi (through Selenium WebDriver). It exposes a set of tools to enumerate and control browser pages, interact with UI elements, capture snapshots, inspect network activity, and read console messages. You can connect to the server with MCP clients such as Claude Code, Cursor, or the MCP Inspector, and then call tools like list_pages, navigate_page, take_snapshot, click_by_uid, fill_by_uid, list_network_requests, get_network_request, screenshot_page, and list_console_messages. The integration is designed to work with a local Firefox installation and supports headless mode for automated testing and scripting.

To use the server, run it via npx as recommended, then connect your MCP client and start issuing tool commands. For debugging or local development, you can leverage the MCP Inspector to explore the available tools and their inputs/outputs before integrating into your workflow. The CLI-friendly tooling mirrors common browser automation patterns (open page, interact with elements, capture state) and includes utilities for dialog handling, viewport management, and navigation history.

How to install

Prerequisites

  • Node.js ≥ 20.19.0
  • npm (bundled with Node.js)
  • A local Firefox browser installation (required by the server)

Installation and setup

  1. Install or upgrade Node.js to meet the minimum requirement.
  2. Install the MCP server via npx (no global install needed):
npx firefox-devtools-mcp@latest
  1. (Optional) Build locally if you are developing the server:
git clone https://github.com/freema/firefox-devtools-mcp.git
cd firefox-devtools-mcp
npm install
npm run build
  1. Run the server directly with npx (recommended for latest):
npx firefox-devtools-mcp@latest
  1. Run the server with Docker (if you prefer containerized execution):
# Build the image from the repository's Dockerfile (if provided)
# or pull a prebuilt image if available
docker build -t firefox-devtools-mcp:latest .

# Run the container (adjust paths/ports as needed)
docker run -i firefox-devtools-mcp:latest
  1. Verify installation by connecting a MCP client (e.g., MCP Inspector) to the running server and listing available tools.

Additional notes

Tips and common issues:

  • Ensure you have a local Firefox installation accessible to the server. Firefox must be installed and detectable by the system or passed via --firefox-path.
  • When running in headless mode, use FIREFOX_HEADLESS=true and optionally set START_URL to your desired starting page.
  • If you encounter Windows-related MCP discovery errors, consider using cmd /c prefixed commands or providing the absolute path to npx as described in the README of the project.
  • For large screenshots or data, consider using the saveTo option (in MCP Inspector or scripts) to write outputs to disk and reduce context size.
  • The server supports always-on network capture via list_network_requests to help debug API interactions.
  • If you experience stale UIDs after navigation, perform a fresh take_snapshot before continuing to rely on page UIDs.
  • When integrating into Claude Code or similar environments, prefer the npx approach to stay up-to-date with the latest release.

Related MCP Servers

Sponsor this space

Reach thousands of developers