firefox-devtools-mcp
Configuration
Configuration options for firefox-devtools-mcp
Configuration
CLI Options
| Flag | Description | Environment Variable |
|---|---|---|
--firefox-path | Absolute path to Firefox binary | - |
--headless | Run without UI | FIREFOX_HEADLESS=true |
--viewport WxH | Initial window size (e.g., 1280x720) | - |
--profile-path | Use a specific Firefox profile | - |
--firefox-arg | Extra Firefox arguments (repeatable) | - |
--start-url | Open this URL on start | START_URL |
--accept-insecure-certs | Ignore TLS errors | ACCEPT_INSECURE_CERTS=true |
Examples
Headless with Viewport
npx firefox-devtools-mcp@latest --headless --viewport 1920x1080Custom Firefox Path (macOS)
npx firefox-devtools-mcp@latest --firefox-path "/Applications/Firefox.app/Contents/MacOS/firefox"With Start URL
npx firefox-devtools-mcp@latest --start-url https://example.comTroubleshooting
Firefox Not Found
Pass the correct path to Firefox:
# macOS
--firefox-path "/Applications/Firefox.app/Contents/MacOS/firefox"
# Windows
--firefox-path "C:\Program Files\Mozilla Firefox\firefox.exe"
# Linux
--firefox-path "/usr/bin/firefox"First Run is Slow
Selenium sets up the BiDi session on first run. Subsequent runs are faster.
Stale UIDs After Navigation
Take a fresh snapshot (take_snapshot) before using UID tools after page navigation.