← Back to directory
F

Firefox DevTools MCP

Official
Automate Firefox for AI assistants.
GitHub source repository ↗
★ 323 Stars Category · Browser Very popular
58FMRS · C
Reliability
10/20
Security and permissions
8/20
Maintenance
13/20
Documentation
14/20
Setup experience
13/20

An official Mozilla project suited to local Firefox automation and development debugging. Its broad capabilities also create significant browser-session and privileged-access risks, so use a dedicated profile and enable only the required modules.

Read the FMRS scoring method →

A Mozilla-maintained Model Context Protocol server that automates Firefox through Selenium WebDriver using WebDriver BiDi. It supports page inspection and control, network and console observation, screenshots, script execution, profiling, and screencasting. It requires a local Firefox installation and cannot run directly on cloud hosting services such as glama.ai.

Tools

list_pages
List pages.
select_page
Select the page to operate on.
navigate_page
Navigate to a page.
take_snapshot
Capture a page snapshot, with optional file saving.
click_by_uid
Click an element by its UID from a snapshot.
fill_by_uid
Fill a form element by UID.
list_network_requests
List network requests with filtering and optional file saving.
get_network_request
Get network request details by ID.
list_downloads
List downloads.
set_download_behavior
Set download behavior to allow, deny, or default.
screenshot_page
Capture a page screenshot, with optional file saving.
screenshot_by_uid
Capture a screenshot of an element by UID.
list_console_messages
List console messages.
evaluate_script
Evaluate a script in the page.
evaluate_privileged_script
Evaluate a script in a privileged context; requires the relevant system access permission.
install_extension
Install a browser extension.
uninstall_extension
Uninstall a browser extension.
list_extensions
List browser extensions; requires the relevant system access permission.
get_firefox_info
Get Firefox information.
get_firefox_output
Get Firefox output.
restart_firefox
Restart Firefox.
set_firefox_prefs
Set Firefox preferences.
get_firefox_prefs
Get Firefox preferences.
profiler_is_active
Check whether the profiler is active.
profiler_start
Start the profiler.
profiler_stop
Stop profiling and save the profile.
screencast_start
Start recording the page viewport.
screencast_stop
Stop page viewport recording; requires Firefox 154 or later.

Setup

Requires Node.js ≥ 20.19.0 and Firefox 100+. The recommended approach is npx: run npx @mozilla/firefox-devtools-mcp@latest, or add the provided Claude Code configuration to the client settings. Use --firefox-path to specify the Firefox binary and options such as --headless as needed.

claude_desktop_config.json
{"mcpServers":{"firefox-devtools":{"command":"npx","args":["-y","@mozilla/firefox-devtools-mcp@latest","--headless","--viewport","1280x720"],"env":{"START_URL":"about:blank"}}}}

Fit and risk

Best for

  • Local Firefox automation
  • Web debugging and development workflows
  • Users of Claude Code, Claude Desktop, Cursor, or Cline

Not for

  • Environments without a local Firefox installation
  • Situations where an agent must not access browser-reachable content
  • Cloud-hosted execution environments
  • Direct use with a normal daily-browsing profile

Required permissions

  • Requires access to a local Firefox browser and sites it can reach.
  • A dedicated Firefox profile is recommended; when connecting to an existing browser, the agent can access cookies, logged-in sessions, and open tabs.
  • The `prefs` and `privileged` modules require `MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1` and are available only in the Mozilla-internal build.
  • Firefox for Android mode requires adb on PATH and a connected Android device.

Risks and side effects

  • Browser automation servers carry inherent risk and may expose cookies, saved sessions, and browser-reachable content.
  • Web pages may contain prompt injection intended to manipulate the agent; use sites you control or trust.
  • The developer preset enables script and debugging tools, while the mozilla preset additionally expands access to privileged contexts.
  • Connecting to an existing Firefox uses a real browsing session; leaving Marionette enabled during normal browsing can expose navigator.webdriver and trigger bot detection.

Troubleshooting

  1. If Firefox is not found, provide the correct executable path with `--firefox-path`.
  2. A slow first run may result from Selenium establishing the BiDi session.
  3. UIDs can become stale after navigation; call `take_snapshot` again.
  4. On Windows 10, a connection-closed error may require wrapping npx with `cmd /c` or using an absolute npx path as shown in the README.
  5. Connect-existing mode requires both `--marionette` and `--remote-debugging-port` when starting Firefox.

Use cases

Automating Firefox navigation and interaction
Inspecting snapshots, network requests, and console messages
Running page scripts, taking screenshots, and profiling
Recording the page viewport and managing downloads

Supported clients

Claude CodeFull support
Claude DesktopFull support
CursorFull support
ClineFull support