Firefox DevTools MCP

Mozilla's server for driving and debugging Firefox: browse, fill forms, read console, network, profiler

Official · Mozilla TypeScript Local · stdio Browser automationDeveloper tools

79 popularity score ★ 553 ↓ 4.1k/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add firefox-devtools -- npx -y @mozilla/firefox-devtools-mcp@latest
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "firefox-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "@mozilla/firefox-devtools-mcp@latest"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "firefox-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "@mozilla/firefox-devtools-mcp@latest"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "firefox-devtools": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mozilla/firefox-devtools-mcp@latest"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.firefox-devtools]
command = "npx"
args = ["-y", "@mozilla/firefox-devtools-mcp@latest"]
Gemini CLITerminal
gemini mcp add --scope user firefox-devtools npx -- -y @mozilla/firefox-devtools-mcp@latest

Settings 12

FIREFOX_HEADLESS Optional: true runs Firefox without a window (same as --headless). Default false.
TOOL_PRESET Optional: slim, basic, developer, mozilla or all: which tool modules are on. Default basic.
START_URL Optional: URL opened when the browser starts (same as --start-url). Default about:blank.
AUTO_PROFILE Optional: true keeps a persistent profile under ~/.firefox-devtools-mcp, one per Firefox binary. Default false.
ACCEPT_INSECURE_CERTS Optional: true ignores TLS certificate errors. Default false.
UNRESTRICTED_SAVE_PATHS Optional: true lets saveTo write anywhere on disk. Default false. For saveTo.
DISABLE_NETWORK_BODY_COLLECTION Optional: true stops capturing request and response bodies, keeping headers only. Default false. For get_network_request.
Set together: connect-existing
CONNECT_EXISTING Optional: true attaches to a running Firefox instead of launching one. Default false.
MARIONETTE_PORT Optional: Marionette port used in connect-existing mode. Default 2828.
IDLE_TIMEOUT Optional: Seconds without tool calls before a connect-existing session releases Firefox. Default 1800.
Set together: android
ANDROID_WIPE_APP_DATA Optional: true confirms the app data wipe that --android-device mode needs. Default false.
ANDROID_PACKAGE Optional: Android app package for --android-device mode. Default org.mozilla.firefox.

What it does

Firefox DevTools MCP is Mozilla's server for controlling a real Firefox from an MCP client. It launches Firefox, or attaches to one already running, and talks to it over WebDriver BiDi through Selenium. You take a snapshot of the page, which gives every element a UID, and then click, hover, type, drag, fill forms or upload files by that UID. Tabs, history, dialogs, viewport size, screenshots, PDF printing and downloads have their own tools.

There are two main uses. One is plain browsing, where the assistant reads pages and works through multi-step flows on a site. The other is web development: open the page you are building, then look at its console output and network requests, put logpoints in its scripts, record a profile with the Firefox profiler or capture a screencast. Large results can go to a file through a saveTo parameter instead of filling the conversation.

Tools are grouped in modules that you choose with --tool-preset (slim, basic, developer, mozilla, all) or an explicit --tools list. The generated tool reference counts 57 tools in 19 modules. The npm build skips the launch, prefs, privileged and bidi modules, so 49 tools are reachable from it. The default basic preset turns on 35 of those, evaluate_script among them. Network, console, debugging and profiler tools need the developer preset or higher. Firefox for Android can be driven over adb too. The project is still at 0.x, so expect its interface to change.

The main branch has already moved the server's home folder from ~/.firefox-devtools-mcp to ~/.firefox-mcp and renamed the profile folder and marker file. The published package still uses the old names.

What it needs

RuntimeNode.js 20.19.0+
Runs onmacOS, Windows, Linux
Also
  • Firefox 100 or newer installed locally
  • adb and a connected device for Android mode

Firefox is found automatically, or set --firefox-path. The debugger tools need Firefox 153 or newer. For --connect-existing, start Firefox yourself with --marionette --remote-debugging-port. It needs a local browser, so a cloud host without one cannot run it.

Limits

  • Not covered Network, console, debugging and profiler tools are off under the default basic preset: use --tool-preset developer or a --tools list
  • Not covered The npm build skips the launch, prefs, privileged and bidi modules even when you ask for them
  • Limit saveTo takes relative paths or absolute paths under ~/.firefox-devtools-mcp/output unless --unrestricted-save-paths is set
  • Limit Android mode wipes all data of the target app before a session and will not start without --android-wipe-app-data
  • Limit Leaving Marionette on in your everyday browser sets navigator.webdriver and can trip bot detection
  • Limit Snapshot UIDs go stale after the page navigates, so take a new snapshot
  • Size cap get_page_text returns 20000 characters inline by default (maxLength), more only through saveTo
  • Early release The ~/.firefox-mcp folder named in the main-branch README is not in the published release yet

Network, console, debugging and profiler tools are off under the default basic preset; start with --tool-preset developer or a --tools list. The prefs, privileged and launch modules are skipped by the public package even if you ask for them. Android mode wipes all data of the target app before every session, which is why it insists on --android-wipe-app-data. saveTo accepts relative paths or paths under ~/.firefox-devtools-mcp only, unless you pass --unrestricted-save-paths. Leaving Marionette enabled in your everyday browser sets navigator.webdriver and can trip bot detection. Snapshot UIDs go stale after navigation.

Who it suits

Suits web developers who test in Firefox and want an assistant to see console errors, network traffic, logpoints and profiles for a page they control, and anyone automating sites in Firefox specifically. It runs locally and can act on pages, so give it a dedicated profile and avoid --connect-existing against your daily one. For Chrome, the Chrome DevTools MCP server, which we also list, is the counterpart. For cross-browser test automation, Microsoft's Playwright MCP, also listed, is the usual pick.

Tools 49

17 only read, 32 change things. A ? marks an optional parameter.

list_pages
List the open tabs and mark the selected one
new_page changes
Open a new tab at a URLurl: stringwait?: enum
navigate_page changes
Load a URL in the selected taburl: stringwait?: enum
select_page changes
Switch which tab later tools act on, by index, URL or titlepageIdx?: numberurl?: stringtitle?: string
close_page changes
Close a tab by its indexpageIdx: number
get_page_text
Return the visible text of the page, 20000 characters inline by defaultmaxLength?: numbersaveTo?: anypreview?: number
take_snapshot
Capture the page structure with a UID for each elementmaxLines?: numberincludeAttributes?: booleanincludeText?: booleanmaxDepth?: numberincludeAll?: booleanselector?: stringsaveTo?: anypreview?: number
resolve_uid_to_selector
Turn a snapshot UID into a CSS selectoruid: string
clear_snapshot changes
Drop the stored snapshot UIDs
click_by_uid changes
Click or double-click the element with a given UIDuid: stringdblClick?: boolean
hover_by_uid changes
Move the pointer over an elementuid: string
fill_by_uid changes
Type a value into one fielduid: stringvalue: string
drag_by_uid_to_uid changes
Drag one element onto anotherfromUid: stringtoUid: string
fill_form_by_uid changes
Fill several fields in one callelements: array
upload_file_by_uid changes
Attach a local file to a file inputuid: stringfilePath: string
press_key changes
Send a key press or combinationkey: stringuid?: string
type_text changes
Type text into the focused element or a given UIDtext: stringuid?: stringsubmitKey?: string
list_network_requests
List captured network requests, with filters and sortinglimit?: numbersinceMs?: numberurlContains?: stringmethod?: stringstatus?: numberstatusMin?: numberstatusMax?: numberisXHR?: booleanresourceType?: stringsortBy?: enumdetail?: enumformat?: enumsaveTo?: anypreview?: number
get_network_request
Show the details of one captured requestid?: stringurl?: stringformat?: enumsaveTo?: anypreview?: number
set_network_cache changes
Bypass or restore the HTTP cache for a tab or globallybehavior: enumscope?: enum
list_console_messages
List console output from the page, filtered by level or textlevel?: enumlimit?: numbersinceMs?: numbertextContains?: stringsource?: stringformat?: enumsaveTo?: anypreview?: number
clear_console_messages changes
Empty the captured console log
screenshot_page
Take a screenshot of the viewport or the full pagefullPage?: booleansaveTo?: any
screenshot_by_uid
Take a screenshot of one elementuid: stringsaveTo?: any
print_page
Print the page to PDFlandscape?: booleanbackground?: booleansaveTo?: any
list_downloads
List downloads seen this sessionstatus?: enumurlContains?: stringlimit?: numberformat?: enum
clear_downloads changes
Empty the download list
set_download_behavior changes
Allow, deny or reset downloads and pick their folderbehavior: enumdownloadFolder?: string
accept_dialog changes
Accept an alert, confirm or prompt, with optional prompt textpromptText?: string
dismiss_dialog changes
Dismiss a browser dialog
navigate_history changes
Go back or forward in historydirection: enum
set_viewport_size changes
Resize the browser viewportwidth: numberheight: number
get_firefox_output
Read Firefox's own stdout and stderrlines?: numbergrep?: stringsince?: number
get_firefox_info
Report the running Firefox's version and setup
close_firefox_session changes
Shut down the browser session
install_extension changes
Install an add-on from an archive, base64 data or a foldertype: enumpath?: stringvalue?: stringpermanent?: boolean
uninstall_extension changes
Remove an installed add-on by its IDid: string
profiler_is_active
Check whether the Firefox profiler is recording
profiler_start changes
Start the profiler with a preset or custom optionspreset?: enumentries?: integerinterval?: numberfeatures?: arraythreads?: arrayactiveContext?: string
profiler_stop changes
Stop the profiler and collect or discard the profilediscard?: boolean
screencast_start changes
Start recording a video of the viewportcontext?: stringframeRate?: integerwidth?: integerheight?: integermimeType?: string
screencast_stop changes
Stop a recording and return its filescreencast?: string
evaluate_script changes
Run a JavaScript function in the page and return the resultfunction: stringargs?: arraytimeout?: numbersandbox?: stringsaveTo?: anypreview?: number
enable_debugger changes
Turn on the JS debugger for the page
list_scripts
List the scripts the page has loaded
get_script_source
Fetch the source of a loaded scriptscriptUrl: string
set_logpoint changes
Log an expression at a script line without pausingurl: stringline: numberexpression: string
remove_logpoint changes
Remove a logpointlogpoint: string
get_logpoint_results
Return the values a logpoint collectedlogpoint: string

Similar servers