FoxMCP

v1.7.0
io.github.ThinkerYzu/foxmcp Checked 20 hours ago Published 24 days ago

Let your AI assistant use your real, logged-in Firefox: tabs, pages, bookmarks, history.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

profiles_list

Discover connected Firefox profiles, their real names and windows. Use this first to choose a profile_id for browser commands, and again after a disconnect or server restart: IDs change on every reconnect. Window, tab, group, container and monitor IDs belong to that profile only. With populate=True, inspect tab titles/URLs to choose a target; False omits tabs. Use list_windows for windows in one known profile. Read-only; does not switch profiles or focus windows. Names may repeat or be unavailable; per-profile window errors are reported separately.

ParameterTypeDescription
populatebooleanInclude each window's tabs with titles and URLs.

list_windows

List all browser windows profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
populatebooleanWhether to include tab information for each window

get_window

Get information about a specific window profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
window_id *integerThe ID of the window to retrieve
populatebooleanWhether to include tab information

get_current_window

Read this profile's current (most recently focused) Firefox window. Does not focus or change the window. Use get_window for a known window_id, or list_windows to inspect all windows in this profile. populate controls whether the result includes the window's tabs. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
populatebooleanWhether to include tab information

create_window

Create a new browser window profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
focusedbooleanWhether the new window takes focus. Firefox always focuses a new window, so with False the extension hands focus back to the window that had it; the result says "(focused)" if the new window kept it a…
heightWindow height in pixels
incognitobooleanWhether to create an incognito window
leftWindow left position in pixels
statestringWindow state ("normal", "minimized", "maximized", "fullscreen")
topWindow top position in pixels
urlURL to load in the new window
widthWindow width in pixels
window_typestringType of window ("normal", "popup", "panel", "detached_panel")

close_window

Close a browser window profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
window_id *integerThe ID of the window to close

focus_window

Bring a window to front and focus it profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
window_id *integerThe ID of the window to focus

update_window

Update window properties profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
window_id *integerThe ID of the window to update
focusedTrue brings the window to the front. False is refused: Firefox cannot take focus away from a window, so call focus_window on the window that should have it instead.
heightNew window height in pixels
leftNew window left position in pixels
stateNew window state ("normal", "minimized", "maximized", "fullscreen")
topNew window top position in pixels
widthNew window width in pixels

tabs_list

List open browser tabs, optionally filtered by window and cookie store Each line includes "[window {id}, index {n}] [cookie store {cookie_store_id}]", and carries "(active)" for the active tab of its window and "(pinned)" for a pinned one. The window, the index and the pinned mark are what tabs_move needs: the window to move a tab out of or into, the position it currently holds, and whether a leading run of pinned tabs blocks the low indexes. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
cookie_store_idOpaque store ID to filter by, combined with window_id.
window_idRestrict the listing to this window (optional, accepts int or string). Omit it to list tabs in every window.

tabs_create

Create a new browser tab profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
url *stringURL to open in the new tab
activebooleanWhether the tab should be active (default: True)
cookie_store_idOpaque store ID from containers_list, or firefox-default. Omit for existing behavior. Explicit selection never falls back.
pinnedbooleanWhether the tab should be pinned (default: False)
window_idWindow ID to create tab in (optional, accepts int or string)

tabs_close

Close one browser tab, removing its live page and possibly unsaved state. Use tabs_list to identify the tab first. Use tabs_switch to select a tab without closing it, or close_window to close an entire window. Closing the last tab may close its window. There is no FoxMCP tool to restore a closed tab; an invalid or already closed tab ID fails. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
tab_id *integerID of the tab to close

tabs_switch

Switch to a specific browser tab profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
tab_id *integerID of the tab to switch to

tabs_group

Group existing tabs, optionally setting the group's title and colour Never activates a tab or focuses a window. Requires Firefox 139+. Omit group_id to create a group in the first tab's window, which moves tabs from other windows into it; pass a group_id from tabs_groups_query to add tabs to that group instead. Firefox unpins a pinned tab before grouping it, and refuses to mix private and non-private tabs. Grouping and styling are separate steps in Firefox. If the tabs were grouped but the title or colour could not be set, the result still names the group, and tabs_groups_update can retry th…

ParameterTypeDescription
profile_id *integer
tab_ids *Tab ID, or several as a list (`[12, 15]`) or a JSON string (`"[12, 15]"`).
colorblue, cyan, grey, green, orange, pink, purple, red or yellow. Omit to leave as is.
group_idGroup to add the tabs to; omit it to create a new group.
titleGroup title; an empty string clears it. Omit to leave as is.

tabs_ungroup

Remove tabs from their tab group Never activates a tab or focuses a window. Requires Firefox 138+. Firefox deletes a group once its last tab leaves it. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
tab_ids *Tab ID, or several as a list (`[12, 15]`) or a JSON string (`"[12, 15]"`).

tabs_groups_update

Change a tab group's title, colour or collapsed state Leaves the group's tabs where they are. Requires Firefox 139+. Give at least one of title, color or collapsed. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
group_id *The group to change, from tabs_group or tabs_groups_query.
profile_id *integer
collapsedWhether the group should be collapsed.
colorblue, cyan, grey, green, orange, pink, purple, red or yellow.
titleNew title; an empty string clears it.

tabs_groups_query

List tab groups with their IDs, in every window or filtered Requires Firefox 139+. tabs_group reports a group's ID only when it creates the group, so this is how to find the ID of any other group. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
collapsedOnly collapsed (True) or expanded (False) groups.
colorOnly groups of this colour.
titleOnly groups with exactly this title.
window_idOnly groups in this window (optional, accepts int or string).

tabs_move

Move tabs to a new position, optionally into another window Reorders tabs within their window, or gathers them into a different window — to collect every tab for one site into a window of its own, create the window with create_window and pass its ID here. Succeeding partially is normal, so check the result: it reads "Moved {n} of {m}", and a tab missing from the list did not move. Firefox declines some moves without raising an error, and the common one is that **an unpinned tab cannot be placed in front of a pinned tab** — with 3 pinned tabs, the lowest index an unpinned tab can reach is…

ParameterTypeDescription
profile_id *integer
tab_ids *Tab ID, or several as a list (`[12, 15]`) or a JSON string (`"[12, 15]"`). Listed tabs keep their given order at the destination.
indexintegerPosition to move to, counting from 0; -1 means the end (default: -1). An index inside a leading run of pinned tabs is refused for an unpinned tab — the move reports "No tabs moved" rather than faili…
window_idWindow to move the tabs into (optional, accepts int or string). Omit it to reorder within each tab's current window.

tabs_capture_screenshot

Capture a screenshot of the visible tab, or of the tab given by tab_id What comes back depends on whether you pass a filename: with one, the image is written to disk and you get a success message and the path; without one, you get the image inline as a base64 data URL, which for a full window is large. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
filenameName of the file to save the screenshot (optional, if not provided returns base64)
formatstringImage format ('png' or 'jpeg', default: 'png')
qualityintegerImage quality for JPEG format (1-100, default: 90)
tab_idCapture this tab, even in the background (not with window_id)
window_idID of the window to capture (optional, defaults to current window)

containers_list

List Firefox containers as JSON with opaque cookie_store_id, name, color and icon; default_cookie_store_id identifies normal browsing separately. IDs belong to the connected profile. Names may repeat. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer

containers_create

Create a persistent Firefox container. Return JSON container metadata. Duplicate names are permitted. Firefox validates color and icon. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
name *string
profile_id *integer
colorstring
iconstring

containers_update

Update a named Firefox container, preserving its ID and omitted properties. Supply at least one of name, color or icon. Return JSON container metadata. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
cookie_store_id *string
profile_id *integer
color
icon
name

containers_remove

Remove a named Firefox container and its stored site data. Refuses open tabs with CONTAINER_IN_USE and tab_ids. Close tabs explicitly first. The check cannot exclude races with browser UI. No automatic cleanup. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
cookie_store_id *string
profile_id *integer

history_query

Search browser history profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
query *stringSubstring to match in URL or title (exact substring match, not tokenized keywords)
end_timeEnd time filter (ISO format, optional)
max_resultsintegerMaximum number of results (default: 200)
start_timeStart time filter (ISO format, optional)

history_get_recent

Get recent browser history profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
countintegerNumber of recent items to get (default: 10)

history_delete_item

Delete all history visits for one exact URL in this profile. Use history_query to find the URL first. This removes history records, not the open tab, bookmarks or cookies, and FoxMCP has no history restore tool. Use tabs_close if the goal is to close a page instead. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
url *stringURL of the history item to delete

bookmarks_list

List browser bookmarks Folders are marked 📁 and bookmarks 🔖. Every line carries its own ID, its parent folder's ID and its index, its position within that folder counting from 0. The IDs are what bookmarks_update, bookmarks_delete, bookmarks_move and the parent_id of bookmarks_create take, so this listing is how you find them. With folder_id, the lines are that folder's direct children in order. Without it, the whole tree is listed and a folder's children are interleaved with everything nested under them, so read positions from Index, not line order. An empty folder returns "No bookmark…

ParameterTypeDescription
profile_id *integer
folder_idOptional folder ID to list bookmarks from

bookmarks_create

Create a new bookmark profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
title *stringTitle of the bookmark
url *stringURL of the bookmark
parent_idOptional ID of the folder to create it in. It must be a folder; a bookmark or separator ID is refused.

bookmarks_create_folder

Create a new bookmark folder profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
title *stringTitle of the folder
parent_idOptional ID of the folder to create it in. It must be a folder; a bookmark or separator ID is refused.

bookmarks_update

Update a bookmark or folder's title and/or URL profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
bookmark_id *stringID of the bookmark or folder to update
profile_id *integer
titleNew title (optional)
urlNew URL (optional, only for bookmarks not folders)

bookmarks_move

Move a bookmark or folder into another folder, or to another position The bookmark keeps its ID, unlike deleting and recreating it. A folder moves with everything in it. Give at least one of parent_id and index. Use bookmarks_list to find IDs and the current index of each entry. Firefox refuses to move the hidden bookmark root, or a folder into itself or one of its own subfolders. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
bookmark_id *stringID of the bookmark or folder to move.
profile_id *integer
indexPosition in the destination folder, counting from 0. It is the final position: in the same folder, moving index 0 to index 2 leaves it third. An index past the end means the last place. Omit it to put…
parent_idFolder to move it into. It must be a folder; a bookmark or separator ID is refused. Omit it to reorder within the current folder.

bookmarks_delete

Delete a bookmark profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
bookmark_id *stringID of the bookmark to delete
profile_id *integer

navigation_back

Navigate back in browser history for a tab profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
params *objectParameters for navigating back
profile_id *integer

navigation_forward

Navigate forward in browser history for a tab profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
params *objectParameters for navigating forward
profile_id *integer

navigation_reload

Reload a page in a tab Use this to refresh the tab's current URL; use navigation_go_to_url to choose a different URL. Reloading may discard unsaved page state and triggers new network requests. bypass_cache requests a fresh load. Returns as soon as the reload is issued, not when the page has finished loading. Code that watches for what the reload does - a request monitor, a content read - has to wait for the page itself. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
tab_id *integerID of the tab to reload
bypass_cachebooleanWhether to bypass cache when reloading (default: False)

navigation_go_to_url

Navigate to a specific URL in a tab profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
tab_id *integerID of the tab to navigate
url *stringURL to navigate to

content_load_file

Load a server-local file for website uploads/imports; does not submit it. Waits for downloading to finish, then returns JSON with file_id and metadata. In the SAME tab, use content_execute_script or a predefined script: const file = globalThis.foxmcpFiles.get(file_id); For file inputs, use cloneInto(file, window), the page's window.wrappedJSObject.DataTransfer, and input/change events. Return metadata, not the File. Release: globalThis.foxmcpFiles.delete(file_id). Handle expires five minutes after loading or on navigation; assigned inputs remain valid. Download timeout: 110s. Private tabs uns…

ParameterTypeDescription
path *stringRegular file on the server's machine; only its basename reaches the tab.
profile_id *integer
tab_id *integerTarget tab ID.
mime_typeOptional MIME override; otherwise inferred from the filename, falling back to application/octet-stream.

content_get_text

Read the current page body's rendered text (document.body.innerText). Use this for readable page content, or content_get_html for markup. Reads the main document without changing it; does not include iframe documents or wait for future lazy-loaded content. Restricted Firefox pages that block content scripts cannot be read. max_length slices the extracted text by character count and adds an ellipsis when truncated; omission returns all extracted text. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
tab_id *integerID of the tab to get content from
max_lengthOptional maximum length of text to return (default: unlimited)

content_get_html

Read the main document's current HTML, limited to 2,000 characters. Use this for markup, or content_get_text for rendered text. Reads document.documentElement.outerHTML without changing the page; adds an ellipsis if truncated. Does not include iframe documents. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
profile_id *integer
tab_id *integerID of the tab to get HTML content from

content_execute_script

Execute JavaScript code in a tab An optional extension setting requires user approval per tab/origin. Each approval prompt expires after 60 seconds; queued tabs wait in turn. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
code *stringJavaScript code to execute
profile_id *integer
tab_id *integerID of the tab to execute script in

content_execute_predefined

Execute a predefined external script and run its JavaScript output in a tab Generated JavaScript obeys the extension's per-tab/origin script consent. Each approval prompt expires after 60 seconds; queued tabs wait in turn. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile. Available scripts: - dom-summarize.sh [onscreen [withpos]]: List the page's visible interactive elements as an indented tree, tagging each with a persistent dsid attribute to select it by later - gcal-cal-event-js.sh "Event Title" day time:…

ParameterTypeDescription
profile_id *integer
script_name *stringName of the script to run, one of those listed above
tab_id *integerID of the tab to execute script in
script_argsstringJSON array of strings to pass to the external script (e.g., '["arg1", "arg2"]') or empty string for no arguments

requests_start_monitoring

Start capturing future web requests matching URL patterns in a profile. Start before triggering navigation or other traffic. Each call starts a monitor; use requests_list_captured to read an existing one instead. Keep the returned monitor_id for requests_list_captured, requests_get_content and requests_stop_monitoring; monitors cannot be listed. Omit tab_id to capture matching traffic across this profile. Capturing uses memory. Stop when finished; summaries remain readable until the profile disconnects, but only the latest 200 response bodies across all monitors are kept. Client disconnectio…

ParameterTypeDescription
profile_id *integer
url_patterns *arrayList of URL patterns to monitor (e.g., ["https://api.example.com/*", "*/api/*"])
optionsOptional configuration for monitoring: - capture_response_bodies: bool (default: True) - max_body_size: int (default: 50000) — bytes kept per body; the full size is reported either way - content_t…
tab_idOptional tab ID to monitor (if not provided, monitors all tabs)

requests_stop_monitoring

Stop one monitor immediately and return its capture totals. Use the monitor_id returned by requests_start_monitoring when no more traffic needs capturing. drain_timeout is ignored: this does not wait for in-flight requests. Already captured records remain available to requests_list_captured and requests_get_content until the profile disconnects, subject to the response-body limit. An unknown monitor_id returns a "not found" error. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
monitor_id *stringID of the monitoring session to stop
profile_id *integer
drain_timeoutintegerAccepted and ignored; the monitor stops at once

requests_list_captured

List all captured request summaries from a monitoring session A request appears here once it has completed, so a page navigation started a moment ago will not be in the list yet. Start with requests_start_monitoring, then reuse its monitor_id here. This reads stored summaries without starting or stopping capture. Use a returned request_id with requests_get_content to inspect its stored body. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never reuse them in another profile.

ParameterTypeDescription
monitor_id *stringID of the monitoring session
profile_id *integer

requests_get_content

Read a captured request's stored metadata and text body. Use monitor_id from requests_start_monitoring and request_id from requests_list_captured. This reads captured data, without making a new network request. Bodies can be truncated by the monitor's max_body_size option. The response carries **response_body.included** and **note**: a body that was not text, or not one of the monitored content types, comes back with `content: null` and its size filled in. `request_headers` is always empty. profile_id is required: obtain it from profiles_list. All object IDs are local to that profile; never…

ParameterTypeDescription
monitor_id *stringID of the monitoring session
profile_id *integer
request_id *stringID of the specific request
include_binarybooleanAccepted and ignored; binary bodies never come back
save_request_body_toAccepted and ignored; nothing is written to disk
save_response_body_toAccepted and ignored; nothing is written to disk

debug_websocket_status

Read the server's connected Firefox profile IDs and names. Use this for a quick connection check, including when no extension is connected. It reads server connection state without changing browser state or reconnecting anything. Use profiles_list for windows/tabs and target discovery before browser commands.