The server exposes 55 tools grouped into 16 modules. Which modules are
enabled depends on --tool-preset or --tools; see
Tool modules and presets in the README.
Presets are cumulative and basic is the default. Privileged modules require the
Mozilla-internal build and MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1; the public package drops them.
| Module | Tools | slim | basic | developer | mozilla | all |
|---|---|---|---|---|---|---|
pages |
6 | yes | yes | yes | yes | yes |
snapshot |
3 | yes | yes | yes | yes | yes |
input |
8 | yes | yes | yes | yes | yes |
network |
3 | - | - | yes | yes | yes |
console |
2 | - | - | yes | yes | yes |
screenshot |
2 | yes | yes | yes | yes | yes |
downloads |
3 | - | yes | yes | yes | yes |
utilities |
4 | - | yes | yes | yes | yes |
management |
4 | - | yes | yes | yes | yes |
webextension |
2 | - | yes | yes | yes | yes |
profiler |
3 | - | - | yes | yes | yes |
screencast |
2 | - | yes | yes | yes | yes |
script |
1 | - | yes | yes | yes | yes |
debugging |
6 | - | - | yes | yes | yes |
prefs (privileged) |
2 | - | - | - | yes | yes |
privileged (privileged) |
4 | - | - | - | yes | yes |
- pages
- snapshot
- input
- network
- console
- screenshot
- downloads
- utilities
- management
- webextension
- profiler
- screencast
- script
- debugging
- prefs
- privileged
Open, navigate, select, and close pages.
Read-only.
List open tabs (index, title, URL). Selected tab is marked.
No parameters.
Open new tab at URL. Returns tab index.
Parameters:
url(string, required) - Target URLwait(none|interactive|complete, optional) - When to return: 'none' (navigation started), 'interactive' (DOMContentLoaded), 'complete' (load event fired, including subresources). Omit for the default: 'interactive' for http/https/data/blob/file, 'none' for other schemes. Use 'complete' when the page must be fully loaded, e.g. before stopping a performance recording.
Navigate selected tab to URL.
Parameters:
url(string, required) - Target URLwait(none|interactive|complete, optional) - When to return: 'none' (navigation started), 'interactive' (DOMContentLoaded), 'complete' (load event fired, including subresources). Omit for the default: 'interactive' for http/https/data/blob/file, 'none' for other schemes. Use 'complete' when the page must be fully loaded, e.g. before stopping a performance recording.
Select active tab by index, URL, or title. Index takes precedence.
Parameters:
pageIdx(number, optional) - Tab index (0-based, most reliable)url(string, optional) - URL substring (case-insensitive)title(string, optional) - Title substring (case-insensitive)
Close tab by index.
Parameters:
pageIdx(number, required) - Tab index to close
Read-only.
Get the visible text of the page (document.body.innerText). Caps at maxLength (default 20000 chars); saveTo saves the full text to a file.
Parameters:
maxLength(number, optional) - Max characters to return inline (default: 20000). Ignored when saveTo is used.saveTo(boolean | string, optional) - Save the full untruncated text to a file instead of returning it inline. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.preview(number, optional) - Number of characters of the saved text to return inline as a preview when saveTo is used. Omit for no preview.
Capture accessibility/DOM snapshots and resolve UIDs.
Read-only.
Capture DOM snapshot with stable UIDs. A UID stays valid across snapshots until its element is removed or the page navigates. Output caps at maxLines (default 100); scope with selector or dump the full tree with saveTo.
Parameters:
maxLines(number, optional) - Max lines (default: 100)includeAttributes(boolean, optional) - Include ARIA attributes (default: false)includeText(boolean, optional) - Include text (default: true)maxDepth(number, optional) - Max tree depthincludeAll(boolean, optional) - Include all visible elements without relevance filtering. Useful for Vue/Livewire apps (default: false)selector(string, optional) - CSS selector to scope snapshot to specific element (e.g., "#app")saveTo(boolean | string, optional) - Save the complete snapshot text to a file (ignores maxLines) instead of returning it inline. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.preview(number, optional) - Number of characters of the saved output to return inline as a preview when saveTo is used. Omit for no preview.
Read-only.
Resolve UID to CSS selector. Fails if the element is gone.
Parameters:
uid(string, required) - UID from snapshot
Clear snapshot UIDs. Usually not needed.
No parameters.
Interact with the page via UID-based clicks, typing, key presses, drag, and uploads.
Click element by UID. Set dblClick for double-click.
Parameters:
uid(string, required) - Element UID from snapshotdblClick(boolean, optional) - Double-click (default: false)
Hover over element by UID.
Parameters:
uid(string, required) - Element UID from snapshot
Fill text input/textarea by UID.
Parameters:
uid(string, required) - Input element UID from snapshotvalue(string, required) - Text to fill
Drag element to another (HTML5 drag events).
Parameters:
fromUid(string, required) - Source element UIDtoUid(string, required) - Target element UID
Fill multiple form fields at once.
Parameters:
elements(array of object, required) - Array of {uid, value} pairs
Upload file to file input by UID.
Parameters:
uid(string, required) - File input UID from snapshotfilePath(string, required) - Local file path
Press a single key, optionally with modifiers, to submit, dismiss, navigate or trigger a shortcut. Not for entering text: use fill_by_uid instead.
Parameters:
key(string, required) - One key, optionally preceded by "+"-separated modifiers, such as "Escape", "Enter" or "ctrl+shift+t". Modifiers: ctrl, alt, shift, meta. Named keys: Enter, Return, NumpadEnter, Tab, Backspace, Delete, Insert, Space, Escape, Home, End, PageUp, PageDown, ArrowUp, ArrowDown, ArrowLeft, ArrowRight, F1-F12, Numpad0-Numpad9, Clear, Pause, Help, Cancel, Semicolon, Equals, Add, Subtract, Multiply, Divide, Decimal, Separator. Anything else must be a single character. Any number of modifiers, but only one key.uid(string, optional) - Focusable element UID from snapshot to focus before pressing (default: the already focused element)
Type text key by key into the focused element, optionally followed by a key such as Enter. Use fill_by_uid to set the value of a known input; use this for elements that only react to real typing, such as autocomplete fields and rich text editors.
Parameters:
text(string, required) - Text to typeuid(string, optional) - Focusable element UID from snapshot to focus before typing (default: the already focused element)submitKey(string, optional) - Key to press after the text, such as "Enter" or "Tab". Same syntax as press_key.
List and inspect network requests, and control the HTTP cache.
Read-only.
List network requests, returning IDs for get_network_request. Filter by url/method/status; caps at limit (default 50); saveTo saves all matches to a file.
Parameters:
limit(number, optional) - Max requests (default: 50)sinceMs(number, optional) - Only last N msurlContains(string, optional) - URL filter (case-insensitive)method(string, optional) - HTTP method filterstatus(number, optional) - Exact status codestatusMin(number, optional) - Min status codestatusMax(number, optional) - Max status codeisXHR(boolean, optional) - XHR/fetch onlyresourceType(string, optional) - Resource type filtersortBy(timestamp|duration|status, optional) - Sort field (default: timestamp)detail(summary|min|full, optional) - Detail level (default: summary)format(text|json, optional) - Output format (default: text)saveTo(boolean | string, optional) - Save matching requests to a file as JSON instead of returning them inline. Saves full untruncated headers by default; pass detail=summary or min for a lean form, or an explicit limit to cap how many are saved (default: all matching). Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.preview(number, optional) - Number of characters of the saved output to return inline as a preview when saveTo is used. Omit for no preview.
Read-only.
Get request details by ID, including the response body (and request body when present). Large text bodies are truncated inline; binary bodies are summarized. URL lookup as fallback.
Parameters:
id(string, optional) - Request ID from list_network_requestsurl(string, optional) - URL fallback (may match multiple)format(text|json, optional) - Output format (default: text)saveTo(boolean | string, optional) - Save the request details with full untruncated headers and bodies to a file as JSON instead of returning them inline (binary bodies are stored base64-encoded). Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.preview(number, optional) - Number of characters of the saved output to return inline as a preview when saveTo is used. Omit for no preview.
Control the HTTP cache. Use behavior='bypass' so every request goes to the network — useful for performance measurement and for verifying a change that a cached asset would otherwise hide. Applies to the currently selected tab unless scope='global'. Persists until set back to 'default' or Firefox shuts down.
Parameters:
behavior(default|bypass, required) - 'bypass' to skip the cache, 'default' to restore normal cachingscope(tab|global, optional) - 'tab' (default) applies to the selected tab; 'global' applies browser-wide
Read and clear console messages.
Read-only.
List console messages, filterable by level, time, text, source. Caps at limit (default 50); saveTo saves all matches to a file.
Parameters:
level(debug|info|warn|error, optional) - Filter by levellimit(number, optional) - Max messages (default: 50)sinceMs(number, optional) - Only last N mstextContains(string, optional) - Text filter (case-insensitive)source(string, optional) - Filter by sourceformat(text|json, optional) - Output format (default: text)saveTo(boolean | string, optional) - Save matching messages to a file in full (untruncated) instead of returning them inline. Saves all matching messages by default; pass an explicit limit to cap how many are saved. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.preview(number, optional) - Number of characters of the saved output to return inline as a preview when saveTo is used. Omit for no preview.
Clear collected console messages.
No parameters.
Capture screenshots of the page or specific elements.
Read-only.
Capture viewport screenshot as base64 PNG. Set fullPage for the whole scrollable document.
Parameters:
fullPage(boolean, optional) - Capture the whole scrollable document (default: false)saveTo(boolean | string, optional) - Save the screenshot to a file instead of returning it as image data in the response. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.
Read-only.
Capture element screenshot by UID as base64 PNG.
Parameters:
uid(string, required) - Element UID from snapshotsaveTo(boolean | string, optional) - Save the screenshot to a file instead of returning it as image data in the response. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.
Monitor and manage file downloads.
Read-only.
List downloads tracked since startup, including status and saved file path.
Parameters:
status(in_progress|complete|canceled, optional) - Filter by statusurlContains(string, optional) - URL filter (case-insensitive)limit(number, optional) - Max downloads (default: 50)format(text|json, optional) - Output format (default: text)
Clear the tracked downloads buffer.
No parameters.
Control how downloads are handled: allow (save to a destination folder), deny (cancel), or reset to default. Avoids the native save-file dialog. Requires a recent Firefox.
Parameters:
behavior(allowed|denied|default, required) - 'allowed' saves downloads todownloadFolder, 'denied' cancels them, 'default' resets to the browser defaultdownloadFolder(string, optional) - Path to the folder where downloads should be stored, created if missing. Only used for behavior='allowed', where it defaults to ~/.firefox-devtools-mcp/downloads. Relative paths resolve against the current working directory.
Handle dialogs, history navigation, and viewport sizing.
Accept browser dialog. Provide promptText for prompts.
Parameters:
promptText(string, optional) - Text for prompt dialogs
Dismiss browser dialog.
No parameters.
Navigate history back/forward. UIDs become stale.
Parameters:
direction(back|forward, required) - back or forward
Set viewport dimensions in pixels.
Parameters:
width(number, required) - Width in pixelsheight(number, required) - Height in pixels
Inspect Firefox options and logs, restart and close the browser.
Read-only.
Retrieve 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.
Parameters:
lines(number, optional) - Number of recent log lines to return (default: 100, max: 10000)grep(string, optional) - Filter log lines containing this string (case-insensitive)since(number, optional) - Only show logs written in the last N seconds
Read-only.
Get information about the current Firefox instance configuration, including binary path, environment variables, and output file location.
No parameters.
Restart Firefox with different configuration. Allows changing binary path, environment variables, and other options. All current tabs will be closed.
Parameters:
firefoxPath(string, optional) - New Firefox binary path (optional, keeps current if not specified)profilePath(string, optional) - Firefox profile path (optional, keeps current if not specified)env(array of string, optional) - New environment variables in KEY=VALUE format (optional, e.g., ["MOZ_LOG=HTMLMediaElement:5", "MOZ_LOG_FILE=/tmp/ff.log"])headless(boolean, optional) - Run in headless mode (optional, keeps current if not specified)startUrl(string, optional) - URL to navigate to after restart (optional, uses about:blank if not specified)prefs(object, optional) - Firefox preferences to set at startup. Values are auto-typed: true/false become booleans, integers become numbers, everything else is a string. Requires MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1.
Ends the browser session. If the server connected to your existing Firefox, this releases the connection and leaves Firefox running. If the server started Firefox itself, this closes it. Call this when the browser task is complete and no further browser interaction is expected.
No parameters.
Install and uninstall web extensions.
Install a Firefox extension using WebDriver BiDi webExtension.install command. Supports installing from archive (.xpi/.zip), base64-encoded data, or unpacked directory.
Parameters:
type(archivePath|base64|path, required) - Extension data type: "archivePath" for .xpi/.zip, "base64" for encoded data, "path" for unpacked directorypath(string, optional) - File path (for archivePath or path types)value(string, optional) - Base64-encoded extension data (for base64 type)permanent(boolean, optional) - Firefox-specific: Install permanently (requires signed extension). Default: false (temporary install)
Uninstall a Firefox extension using WebDriver BiDi webExtension.uninstall command. Requires the extension ID returned by install_extension or obtained from list_extensions.
Parameters:
id(string, required) - Extension ID (e.g., "[email protected]")
Start, stop, and query the performance profiler.
Read-only.
Check whether the Firefox profiler is currently recording.
No parameters.
Start the Firefox profiler. Provide either a preset name or explicit recording options (entries, interval, features, threads). Cannot combine both. Valid presets: web-developer, firefox-platform, graphics, media, ml, networking, power, debug.
Parameters:
preset(web-developer|firefox-platform|graphics|media|ml|networking|power|debug, optional) - Profiler preset name. Cannot be combined with entries, interval, features, or threads.entries(integer, optional) - Number of entries to keep in the sampling buffer. Required when no preset is given.interval(number, optional) - Sampling interval in milliseconds. Required when no preset is given.features(array of string, optional) - Profiler features to enable. Required when no preset is given.threads(array of string, optional) - Thread names to profile. Required when no preset is given.activeContext(string, optional) - Id of the top-level navigable to mark as the active tab in the profile. Does not restrict profiling to that tab.
Stop the Firefox profiler and save the recorded profile to a file in the downloads directory. Returns the path to the saved file, or null when nothing was saved.
Parameters:
discard(boolean, optional) - If true, stop the profiler and discard the recording instead of saving it to disk. Defaults to false.
Record screencasts of the page viewport (Firefox 154+).
Start 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.
Parameters:
context(string, optional) - Id of the top-level browsing context to record. Defaults to the currently selected page.frameRate(integer, optional) - Target frame rate of the recording, in frames per second.width(integer, optional) - Width of the recorded video in pixels. Defaults to the viewport width.height(integer, optional) - Height of the recorded video in pixels. Defaults to the viewport height.mimeType(string, optional) - MIME type of the output file. Defaults to "video/webm".
Stop an in-progress screencast recording started with screencast_start and finalize the video file. Returns the path to the saved file.
Parameters:
screencast(string, optional) - Id of the screencast to stop, as returned by screencast_start. Optional when exactly one recording is active.
Evaluate arbitrary JavaScript in the page context.
Run a JS function in the page and return its result. Prefer this for targeted reads (a value, text, computed style, whether an element exists) instead of a full take_snapshot. Use the UID interaction tools for clicking, typing, and filling.
Parameters:
function(string, required) - JS function string, e.g. () => document.titleargs(array of object, optional) - UIDs to pass as function argumentstimeout(number, optional) - Timeout in ms (default: 5000)sandbox(string, optional) - Evaluate in an isolated sandbox realm with this name instead of the page realm. The sandbox shares the page DOM and keeps the native built-ins even where the page overrode them. Page-defined globals and expandos are invisible from the sandbox, and vice-versa. The same name reuses the same sandbox across calls; omit to evaluate in the page realm.saveTo(boolean | string, optional) - Save the result to a file as JSON instead of returning it inline. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.preview(number, optional) - Number of characters of the saved result to return inline as a preview when saveTo is used. Omit for no preview.
Inspect scripts and set logpoints (Firefox 153+).
Enable the JS debugger for the current page. Required before set_logpoint works. Requires Firefox 153+.
No parameters.
Read-only.
List all JavaScript files currently loaded in the page. Requires enable_debugger to have been called.
No parameters.
Read-only.
Get the source code of a JavaScript file loaded in the page. Requires enable_debugger to have been called.
Parameters:
scriptUrl(string, required) - URL of the script to retrieve.
Set a logpoint at a specific location. When execution reaches that line, the expression is evaluated and the result is stored without pausing. Use get_logpoint_results to retrieve collected values. Requires enable_debugger to have been called.
Parameters:
url(string, required) - URL of the script.line(number, required) - Line number (1-based).expression(string, required) - JavaScript expression to evaluate each time the logpoint is hit.
Remove a previously set logpoint.
Parameters:
logpoint(string, required) - Logpoint id returned by set_logpoint.
Read-only.
Get the results collected by a logpoint since it was set.
Parameters:
logpoint(string, required) - Logpoint id returned by set_logpoint.
Get and set Firefox preferences.
Privileged module: requires the Mozilla-internal build.
Read-only.
Get Firefox preference values via a privileged API. Requires MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1 env var.
Parameters:
names(array of string, required) - Array of preference names to read
Set Firefox preferences at runtime a privileged API. Requires MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1 env var.
Parameters:
prefs(object, required) - Object mapping preference names to values. Values are auto-typed: true/false become booleans, integers become numbers, everything else is a string.
Access privileged ("chrome") contexts and list extensions.
Privileged module: requires the Mozilla-internal build.
Read-only.
List privileged (privileged) browsing contexts. Requires MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1 env var. Use restart_firefox with env parameter to enable.
No parameters.
Select a privileged browsing context by ID and set WebDriver Classic context to "chrome" . Requires MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1 env var.
Parameters:
contextId(string, required) - Privileged browsing context ID from list_privileged_contexts
Execute JS function in a privileged (chrome) browsing context. Requires MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1 env var. Get context ids from list_privileged_contexts.
Parameters:
function(string, required) - JS function string, e.g. () => Services.prefs.getBoolPref("foo")context(string, required) - Privileged browsing context ID from list_privileged_contextssaveTo(boolean | string, optional) - Save the result to a file as JSON instead of returning it inline. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory.preview(number, optional) - Number of characters of the saved result to return inline as a preview when saveTo is used. Omit for no preview.
Read-only.
List installed Firefox extensions with UUIDs and background scripts. Requires MOZ_REMOTE_ALLOW_SYSTEM_ACCESS=1 env var.
Parameters:
ids(array of string, optional) - Optional: Filter by exact extension IDs (e.g., ["[email protected]"])name(string, optional) - Optional: Filter by partial name match (case-insensitive, e.g., "shopify")isActive(boolean, optional) - Optional: Filter by enabled (true) or disabled (false) statusisSystem(boolean, optional) - Optional: Filter by system/built-in (true) or user-installed (false) extensions