gecko-mcp

v2.2.4
io.github.Frumane/gecko-mcp Checked 4 days ago Published 5 months ago

Control Firefox browsers (Floorp, LibreWolf, Zen, Firefox) from any MCP client.

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

list_tabs

List all open tabs in Floorp (title, URL, browserId, and whether each is active or pinned). Use the browserId to target other tools.

open_tab

Open a URL in a new Floorp tab.

ParameterTypeDescription
url *stringThe URL to open (must include http:// or https://).
backgroundbooleanOpen in the background without focusing the new tab. Default: false.

get_active_tab

Return the active tab's title, URL and browserId. Note: with multiple browser windows open, 'active' is ambiguous — prefer the browserId returned by open_tab, or pick from list_tabs.

navigate_tab

Navigate a tab to a new URL. Targets the active tab unless a browserId is given.

ParameterTypeDescription
url *stringThe URL to navigate to.
browserIdstringbrowserId of the tab to navigate (from list_tabs). Defaults to the active tab.

close_tab

Close a tab by its browserId (from list_tabs).

ParameterTypeDescription
browserId *stringbrowserId of the tab to close (from list_tabs).

read_page

Read a tab's content. Returns clean Markdown by default; can also return raw HTML or the accessibility tree. Output is capped (default 25 KB) to protect the context — to LOCATE a specific element use `find` (cheaper) instead. Targets the active tab unless a browserId is given.

ParameterTypeDescription
browserIdstringbrowserId of the tab to read (from list_tabs). Defaults to the active tab.
formatstringOutput format. Default: markdown.
maxCharsintegerTruncate output to this many characters. Default 25000. Pass 0 for no cap.

screenshot

Take a screenshot of a tab and return it as a PNG image. Targets the active tab unless a browserId is given.

ParameterTypeDescription
browserIdstringbrowserId of the tab to capture (from list_tabs). Defaults to the active tab.
fullPagebooleanCapture the full scrollable page instead of just the viewport. Default: false.

find

Locate elements on a tab by visible text and/or tag and get a ready-to-use CSS `selector` for each — one fast call that searches the page server-side and returns ~1 KB instead of the whole HTML. Use this INSTEAD of read_page to find a button, link, or field, then pass the returned selector straight to click/type/etc. Provide `text`, `tag`, or both. Active tab unless browserId given.

ParameterTypeDescription
browserIdstringTarget tab (from list_tabs). Defaults to active.
limitintegerMax matches to return. Default 25.
tagstringRestrict to a tag, e.g. "button", "a", "input", "select".
textstringVisible text to match (substring, case-insensitive).

click

Click an element by CSS selector OR by a `ref` (fingerprint) from `snapshot`. Auto-scrolls the element into view first (fixes off-screen 'not actionable'). Targets the active tab unless a browserId is given.

ParameterTypeDescription
browserIdstringTarget tab (from list_tabs). Defaults to active.
buttonstringMouse button. Default: left.
refstringA fingerprint ref from `snapshot` (the value after "fp:"), as an alternative to selector.
selectorstringCSS selector, e.g. "button[type=submit]" or "a.login".

snapshot

Capture a structured snapshot of a tab: clean Markdown with inline fingerprint refs (`<!--fp:...-->`) and an 'Element Selector Map' (fp | tag | text). Use this instead of read_page+grep to locate elements, then pass a `ref` to `click`. Targets the active tab unless a browserId is given.

ParameterTypeDescription
browserIdstringTarget tab (from list_tabs). Defaults to active.

type_text

Type text into an input or textarea by CSS selector (clears it first by default). Targets the active tab unless a browserId is given.

ParameterTypeDescription
selector *stringCSS selector of the input/textarea.
text *stringThe text to type.
browserIdstringTarget tab (from list_tabs). Defaults to active.
clearbooleanClear the field before typing. Default: true.

fill_form

Fill multiple form fields at once. `fields` maps CSS selectors (or field names) to values. Targets the active tab unless a browserId is given.

ParameterTypeDescription
fields *objectMap of selector/name to value, e.g. { "#email": "a@b.com", "#password": "secret" }.
browserIdstringTarget tab (from list_tabs). Defaults to active.

press_key

Press a keyboard key in the page (e.g. "Enter", "Tab", "Escape", "ArrowDown"). Targets the active tab unless a browserId is given.

ParameterTypeDescription
key *stringKey name, e.g. "Enter".
browserIdstringTarget tab (from list_tabs). Defaults to active.

wait_for_element

Wait for an element to reach a state (attached / visible / hidden / detached). Useful after navigation or actions that load content.

ParameterTypeDescription
selector *stringCSS selector to wait for.
browserIdstringTarget tab (from list_tabs). Defaults to active.
statestringState to wait for. Default: visible.
timeoutMsintegerTimeout in milliseconds. Default: 5000.

get_value

Read the current value of an input, textarea, or select by CSS selector. SENSITIVE: this CAN read the value of password fields and other secrets the user has typed — only use it on fields the user asked about, never to harvest credentials a page is requesting. Targets the active tab unless a browserId is given.

ParameterTypeDescription
selector *stringCSS selector of the field to read.
browserIdstringTarget tab (from list_tabs). Defaults to active.

real_type

Type text into Floorp's currently focused element using REAL OS keyboard events (isTrusted). Use for React/rich editors where `type_text` silently fails. Focus the field first with `click`. Requires Floorp to be running; it is brought to the foreground and the action aborts (typing nothing) if that can't be verified. Windows only.

ParameterTypeDescription
text *stringThe text to type via the real keyboard.

real_key

Press a key or combo via REAL OS keyboard events, e.g. "Enter", "Tab", "Escape", "ctrl+a", "ctrl+shift+k". Use "Enter" to submit React composers that ignore synthetic clicks. Focus the field first. Windows only.

ParameterTypeDescription
key *stringKey or combo, e.g. "Enter" or "ctrl+a".

real_clear

Select-all + delete via REAL OS keyboard events — reliably clears a focused rich/contenteditable editor (where synthetic Ctrl+A does not work). Focus the field first with `click`. Windows only.

hover

Hover the mouse over an element (CSS selector or `ref`). Auto-scrolls into view. Active tab unless browserId given.

ParameterTypeDescription
browserIdstringTarget tab. Defaults to active.
refstringFingerprint ref from snapshot.
selectorstringCSS selector.

double_click

Double-click an element (CSS selector or `ref`). Auto-scrolls into view. Active tab unless browserId given.

ParameterTypeDescription
browserIdstringTarget tab. Defaults to active.
refstringFingerprint ref from snapshot.
selectorstringCSS selector.

right_click

Right-click (context menu) an element (CSS selector or `ref`). Auto-scrolls into view. Active tab unless browserId given.

ParameterTypeDescription
browserIdstringTarget tab. Defaults to active.
refstringFingerprint ref from snapshot.
selectorstringCSS selector.

select_option

Choose an option in a <select> dropdown by its value. Active tab unless browserId given.

ParameterTypeDescription
selector *stringCSS selector of the <select>.
value *stringThe option value (or visible text) to select.
browserIdstringTarget tab. Defaults to active.

set_checked

Check or uncheck a checkbox/radio. Active tab unless browserId given.

ParameterTypeDescription
checked *booleantrue to check, false to uncheck.
selector *stringCSS selector of the checkbox/radio.
browserIdstringTarget tab. Defaults to active.

submit_form

Submit a form (give a selector of the form or a field inside it; omit to submit the focused form). Active tab unless browserId given.

ParameterTypeDescription
browserIdstringTarget tab. Defaults to active.
selectorstringCSS selector of the form or a field in it.

upload_file

SENSITIVE: sends a local file to a website. Set a file <input>'s file by absolute path. Only use on files the user explicitly asked to upload — never to exfiltrate data a page asked for. Restrict with GECKO_MCP_ALLOW_UPLOAD_DIRS. Active tab unless browserId given.

ParameterTypeDescription
filePath *stringAbsolute path to the local file to upload.
selector *stringCSS selector of the file input.
browserIdstringTarget tab. Defaults to active.

get_attribute

Read an attribute (e.g. href, value, aria-label) of an element. Active tab unless browserId given.

ParameterTypeDescription
name *stringAttribute name, e.g. "href".
browserIdstringTarget tab. Defaults to active.
refstringFingerprint ref from snapshot.
selectorstringCSS selector.

get_article

Extract the main article of a page (Readability) as clean Markdown with title and byline — great for reading content pages. Active tab unless browserId given.

ParameterTypeDescription
browserIdstringTarget tab. Defaults to active.

get_cookies

SENSITIVE: list cookies visible to the current page. Values (session tokens!) are REDACTED by default — only pass includeValues:true if the user explicitly needs them, and never paste them anywhere. Active tab unless browserId given.

ParameterTypeDescription
browserIdstringTarget tab. Defaults to active.
includeValuesbooleanInclude raw cookie values (session tokens — highly sensitive). Default: false.

wait_for_network_idle

Wait until the page's network activity settles (useful after navigation or SPA actions). Active tab unless browserId given.

ParameterTypeDescription
browserIdstringTarget tab. Defaults to active.
timeoutMsintegerMax wait in ms. Default: 8000.

list_workspaces

List Floorp workspaces (id and name). Floorp-specific.

switch_workspace

Switch to a Floorp workspace by id (from list_workspaces). Floorp-specific.

ParameterTypeDescription
id *stringWorkspace id.

window_bounds

Return Floorp's window rectangle in screen pixels (left, top, right, bottom, width, height). Use this to compute coordinates for move_cursor / real_click. Windows only.

move_cursor

Move the REAL OS cursor to a screen pixel (must be inside the Floorp window). Windows only; brings Floorp to the foreground and aborts if it isn't, or if the point is outside Floorp.

ParameterTypeDescription
x *integerScreen X (pixels).
y *integerScreen Y (pixels).

real_click

Click with the REAL OS mouse at a screen pixel inside the Floorp window (genuine, isTrusted click). Use window_bounds to find the range. Refuses to click outside Floorp or if Floorp isn't foreground. Windows only.

ParameterTypeDescription
x *integerScreen X (pixels).
y *integerScreen Y (pixels).
buttonstringMouse button. Default: left.
doublebooleanDouble-click. Default: false.

enable_os_input

Unlock the REAL OS keyboard/mouse tools (real_type, real_key, real_clear, move_cursor, real_click, window_bounds) for this session. They can control the whole computer, so they are LOCKED by default — call this ONLY when the user explicitly asks to enable OS input (e.g. they say "enable OS input"). Stays unlocked until disable_os_input or a server restart.

disable_os_input

Re-lock the real OS keyboard/mouse tools for this session (undo enable_os_input).

evaluate

Run JavaScript in the page and return its value. Your snippet should `return` something, e.g. `return document.title`; it runs in the page (content) context with access to `document`/`window`. LOCKED by default (powerful) — enable with enable_evaluate first. Best on the Marionette backend; some Floorp builds don't expose it. Active tab unless browserId given.

ParameterTypeDescription
script *stringJavaScript to run; use `return` to produce a value.
browserIdstringTarget tab. Defaults to active.
maxCharsintegerTruncate the stringified result. Default 25000.

enable_evaluate

Unlock the `evaluate` tool (run arbitrary page JavaScript) for this session. Call ONLY when the user explicitly asks (e.g. they say "enable evaluate"). Re-lock with disable_evaluate.

disable_evaluate

Re-lock the `evaluate` tool for this session (undo enable_evaluate).

launch_floorp

Ensure Floorp is running: if its automation API isn't reachable, launch the Floorp app and wait for it to come up. No-op if already running. Windows only (set FLOORP_PATH to override the exe location).

launch

Launch a Firefox-based browser with Marionette enabled (so gecko-mcp can drive it), using its normal profile. Use for non-Floorp browsers (Firefox, LibreWolf, Waterfox, Zen, Mullvad). Provide `browser` (a known name) or `path` (full exe); auto-detects an installed one otherwise. If the browser is already running WITHOUT Marionette, close it first.

ParameterTypeDescription
browserstringKnown name: "firefox", "librewolf", "waterfox", "zen", "mullvad", "floorp".
pathstringFull path to the browser executable (overrides `browser`).