accept_dialog
Accept browser dialog. Provide promptText for prompts.
Drive a real Firefox by stable element UIDs, then read the browser's own stdout, MOZ_LOG lines and crash traces from the same server that did the clicking.
LABSCO SUMMARY
get_firefox_output is the part a page-level automation tool cannot give you: MOZ_LOG lines, warnings, crashes and stack traces straight from the browser process, filtered by grep, line count or time. Interaction is UID-based rather than selector-based, so a snapshot has to be retaken after navigation and a stale UID fails loudly instead of clicking the wrong element. Two settings decide how much room the agent has: the preset that chooses its tools, and --connect-existing, which attaches to your real signed-in Firefox and needs Marionette turned on — worth turning off again afterwards, since it changes the browser's fingerprint enough to trip bot detection.
Mozilla's Firefox automation server, driving the browser over WebDriver BiDi: tabs, DOM snapshots, input, downloads, extensions, screencasts and the browser process itself.
Node.js 20.19.0 or newer and Firefox 100+ installed locally — it is auto-detected, or named with --firefox-path. START_URL decides the page it opens at. Which tools appear is a launch decision: the default basic preset covers pages, snapshot, input, screenshot, downloads, script, screencast and extensions, --tool-preset developer adds network, console, debugging and profiler, and --tool-preset slim drops evaluate_script. Point it at a dedicated Firefox profile rather than your own, since the agent reaches whatever that profile can reach. MIT or Apache-2.0, at your option.
One command — npx @mozilla/firefox-devtools-mcp@latest
USE CASES
Open the page, snapshot it for UIDs, walk the same steps the report describes, then read the browser's own output for the warning or stack trace the page never showed.
Set downloads to save silently so no native dialog blocks the run, trigger the link, then read back the status and the path the file went to.
Start a screencast, drive the reproduction, then stop it for the saved file path. A still of the whole page or of one element covers the cases where a video is more than anyone needs.
Install the build straight from an archive or an unpacked directory, exercise a page against it, read the browser output for what it logged, and remove it by the ID the install returned.
Fill every field in one call rather than one call per field, attach the file the form wants, submit, and answer the confirmation dialog that follows.
Snapshots, screenshots and script results take a saveTo path and come back as a file path and byte size, with a short inline excerpt when you ask for one.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
accept_dialogAccept browser dialog. Provide promptText for prompts.
clear_downloadsClear the tracked downloads buffer.
clear_snapshotClear snapshot cache. Usually not needed.
click_by_uidClick element by UID. Set dblClick for double-click.
close_pageClose tab by index.
dismiss_dialogDismiss browser dialog.
drag_by_uid_to_uidDrag element to another (HTML5 drag events).
evaluate_scriptExecute JS function in page. Prefer UID tools for interactions.
fill_by_uidFill text input/textarea by UID.
fill_form_by_uidFill multiple form fields at once.
get_firefox_infoGet information about the current Firefox instance configuration, including binary path, environment variables, and output file location.
get_firefox_outputRetrieve Firefox output (stdout/stderr including MOZ_LOG, warnings, crashes, stack traces). Returns recent output from the capture file. Use filters to focus on specific content.
hover_by_uidHover over element by UID.
install_extensionInstall a Firefox extension using WebDriver BiDi webExtension.install command. Supports installing from archive (.xpi/.zip), base64-encoded data, or unpacked directory.
list_downloadsList downloads tracked since startup, including status and saved file path.
list_pagesList open tabs (index, title, URL). Selected tab is marked.
navigate_historyNavigate history back/forward. UIDs become stale.
navigate_pageNavigate selected tab to URL.
new_pageOpen new tab at URL. Returns tab index.
resolve_uid_to_selectorResolve UID to CSS selector. Fails if stale.
restart_firefoxRestart Firefox with different configuration. Allows changing binary path, environment variables, and other options. All current tabs will be closed.
screencast_startStart recording a screencast (video) of the current page viewport, saving the output to a file in the downloads directory. Returns a screencast id to pass to screencast_stop. Multiple recordings can run at once.
screencast_stopStop an in-progress screencast recording started with screencast_start and finalize the video file. Returns the path to the saved file.
screenshot_by_uidCapture element screenshot by UID as base64 PNG.
screenshot_pageCapture page screenshot as base64 PNG.
select_pageSelect active tab by index, URL, or title. Index takes precedence.
set_download_behaviorControl how downloads are handled: allow (save silently to the default download directory), deny (cancel), or reset to default. Avoids the native save-file dialog. Requires a recent Firefox.
set_viewport_sizeSet viewport dimensions in pixels.
take_snapshotCapture DOM snapshot with stable UIDs. Retake after navigation.
uninstall_extensionUninstall a Firefox extension using WebDriver BiDi webExtension.uninstall command. Requires the extension ID returned by install_extension or obtained from list_extensions.
upload_file_by_uidUpload file to file input by UID.
BEFORE YOU INSTALL
31 tools when we connected.
Both documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 31 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx @mozilla/firefox-devtools-mcp@latest{
"mcpServers": {
"firefox-devtools": {
"command": "npx",
"args": [
"-y",
"@mozilla/firefox-devtools-mcp@latest",
"--headless",
"--viewport",
"1280x720"
],
"env": {
"START_URL": "about:blank"
}
}
}
}codex mcp add firefox-devtools -- npx @mozilla/firefox-devtools-mcp@latest