tb-marionette-mcp

v0.2.2
tb-marionette-mcp Checked 1 day ago Published 3 months ago

MCP server for Thunderbird UI automation via Marionette

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

thunderbird_launch

ParameterTypeDescription
profile *string
marionette_portinteger
ready_timeoutnumber
wait_readyboolean

thunderbird_terminate

ParameterTypeDescription
pid

thunderbird_status

extension_install

ParameterTypeDescription
xpi_path *string
temporaryboolean

extension_uninstall

ParameterTypeDescription
addon_id *string

extension_reload

ParameterTypeDescription
addon_id *string
xpi_path *string

extension_list

extension_trigger_command

Fire a WebExtension `commands.onCommand` event directly. Works around TB chrome-XUL windows swallowing WebDriver key events before they reach the shortcut manager. Bypasses key dispatch entirely by emitting the internal event that the shortcut manager would emit on a real key press. See issue #1.

ParameterTypeDescription
addon_id *string
command_name *string

find_element

ParameterTypeDescription
selector *string
strategy *string
contextstring
timeoutnumber

find_elements

ParameterTypeDescription
selector *string
strategy *string
contextstring
timeoutnumber

click

ParameterTypeDescription
element_id *string
contextstring

type_text

ParameterTypeDescription
element_id *string
text *string
clearboolean
contextstring

get_text

ParameterTypeDescription
element_id *string
contextstring

get_attribute

ParameterTypeDescription
element_id *string
name *string
contextstring

get_property

ParameterTypeDescription
element_id *string
name *string
contextstring

is_displayed

ParameterTypeDescription
element_id *string
contextstring

list_windows

List all TB windows. For chrome-only apps like Thunderbird (messenger.xhtml), the WebDriver `window_handles` API returns `[]` because there are no content browser tabs. Fall back to enumerating `Services.wm` in chrome context, which returns actual XUL windows (messenger, compose, etc.).

switch_to_window

Switch to a window by handle. WebDriver `switch_to_window` accepts only handles from `window_handles`, which is empty for chrome-only apps like TB. `list_windows` falls back to `Services.wm` and returns `docShell.browsingContext.id` as handle. For those, focus the corresponding XUL window via chrome-context JS.

ParameterTypeDescription
handle *string

switch_to_frame

ParameterTypeDescription
element_id *string

switch_to_default

wait_for_element

ParameterTypeDescription
selector *string
strategy *string
contextstring
timeoutnumber
visibleboolean

send_keys

ParameterTypeDescription
keys *string
element_id

send_hotkey

ParameterTypeDescription
chord *string
element_id

execute_script

ParameterTypeDescription
script *string
args
async_boolean
contextstring
timeoutnumber

wait_for_condition

ParameterTypeDescription
script *string
args
contextstring
poll_intervalnumber
timeoutnumber

screenshot

Take screenshot. WebDriver `client.screenshot()` requires a browsing context (content tab) and fails on chrome-only XUL windows like TB's messenger.xhtml with `NoSuchWindowError: Browsing context has been discarded`. When no `element_id` is given and the top-level XUL window is chrome-only, fall back to a chrome-context canvas snapshot of the active window's `documentElement`.

ParameterTypeDescription
element_id
formatstring
fullboolean

get_page_source

ParameterTypeDescription
contextstring

get_current_url

get_window_title

get_console_logs

ParameterTypeDescription
clearboolean
level

get_marionette_log