wayland-computer-use-mcp

v0.2.0
wayland-computer-use-mcp Checked 1 day ago Published 18 days ago

FastMCP server for interactive Wayland window/desktop streaming, semantic UI inspection, boundary-clamped input injection, and desktop integration.

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

launch_app Launch App

Launches a Python GUI script or system app with auto-focus and portal session binding. If restart=True or if the app is already running, gracefully terminates the old process and launches a fresh instance.

ParameterTypeDescription
target *string
args
cwd
restartboolean

restart_app Restart App

Gracefully terminates and re-launches an active process launched by this MCP session, preserving its original launch command, arguments, and working directory. NOTE: Only applications launched by this MCP server can be restarted. External applications or user-opened windows cannot be restarted by the MCP server.

ParameterTypeDescription
pid

terminate_app Terminate App

Terminates an owned application process and closes idle virtual windows.

ParameterTypeDescription
pid

get_app_logs Get App Logs

Retrieves captured stdout and stderr execution logs for an application process.

ParameterTypeDescription
linesinteger
pid

list_managed_apps List Managed Apps

Lists all active application processes managed by this MCP session.

inspect_ui_tree Inspect Ui Tree

Inspects semantic accessibility tree and returns functional hierarchy + 1D interactive nodes. Includes compact functional component hierarchy, actionable elements, screen bounds, and process health by default. Set include_raw_tree=True only when debugging raw AT-SPI nodes.

ParameterTypeDescription
include_raw_treebooleanInclude the unpruned raw AT-SPI node tree (D-Bus paths, layout wrappers). Defaults to False for a compact functional hierarchy and interactive elements.
max_depthinteger
pid

interact_with_node Interact With Node

Interacts with an interactive UI widget by 1D node ID (e.g. 'b1', 'e1') or label. Executes Level 1 AT-SPI actions silently (without moving the cursor), falling back to Level 2 coordinate/keyboard input only when AT-SPI is unsupported, and returns the post-action UI tree delta (modified/appeared widgets). Optional ``role`` narrows name matches like Playwright's ``getByRole``. Supports actions: click, type, set_value, clear, select_all, select_range, copy, paste, cut, drag_select, double_click, right_click, hover.

ParameterTypeDescription
actionstring
end_offsetinteger
node_idDeprecated alias for 'target'; prefer passing 'target'.
pid
roleOptional accessible role filter (e.g. 'push button', 'entry').
settle_timeout_msinteger
start_offsetinteger
targetPrimary target: compact element ID (e.g. 'b1', 'e1') or widget label.
text
value

batch_actions Batch Actions

Executes a sequence of consecutive UI interactions with fail-fast reporting. Supported step schemas: - {"action": "interact"|"click"|"double_click"|"right_click", "target": "b1"} - {"action": "type"|"set_value"|"clear", "target": "e1", "text": "hello"} - {"action": "click", "x": 100, "y": 200, "button": "left"} - {"action": "key", "keys": ["ctrl", "a"]} - {"action": "hover", "target": "b1"} - {"action": "wait", "ms": 200}

ParameterTypeDescription
actions *array
pid

watch_ui_events Watch Ui Events

Awaits UI settlement by monitoring real-time AT-SPI2 D-Bus mutation events. Returns captured mutations and whether the UI has settled, eliminating the need to re-query the full accessibility tree after triggers.

ParameterTypeDescription
pid
timeout_msinteger

click Click

Dispatches a mouse click clamped within the active window boundaries.

ParameterTypeDescription
x *integer
y *integer
buttonstring
pid

double_click Double Click

Dispatches a double-click within the active window boundaries.

ParameterTypeDescription
x *integer
y *integer
buttonstring
pid

right_click Right Click

Dispatches a right-click within the active window boundaries.

ParameterTypeDescription
x *integer
y *integer
pid

hover Hover

Positions cursor at coordinates without clicking to trigger hover states or tooltips.

ParameterTypeDescription
x *integer
y *integer
duration_msinteger
pid

drag Drag

Performs a clamped drag-and-drop gesture from start to end coordinates.

ParameterTypeDescription
end_x *integer
end_y *integer
start_x *integer
start_y *integer
pid

scroll Scroll

Dispatches discrete mouse wheel scroll deltas (positive dy=down, negative dy=up).

ParameterTypeDescription
dx *integer
dy *integer
pid

type_text Type Text

Injects keyboard characters. If coordinates (x, y) are provided, clicks first to focus.

ParameterTypeDescription
text *string
pid
x
y

key_combination Key Combination

Dispatches allowed key combinations (e.g. ['ctrl', 'c']) after security filtering.

ParameterTypeDescription
keys *array
pid

capture_window_frame Capture Window Frame

Captures window frame as in-memory ImageContent (saves PNG when save_artifact=True).

ParameterTypeDescription
crop_box
pid
save_artifactboolean

clipboard_read Clipboard Read

Reads current text contents from the Wayland clipboard.

clipboard_write Clipboard Write

Writes text into the Wayland clipboard.

ParameterTypeDescription
text *string

window_control Window Control

Controls window state across any active Wayland compositor (KDE, GNOME, Hyprland, Sway). Supported actions: - 'minimize': Minimizes the target application window. - 'maximize': Maximizes the target application window. - 'restore': Restores or unminimizes/unmaximizes the target application window. - 'focus': Activates and brings the target application window to the foreground. - 'close': Requests a clean close of the target window.

ParameterTypeDescription
action *stringThe desired window management action.
pidThe target application PID. Defaults to the active managed application.

preset_workflow Preset Workflow

Manages and executes reusable multi-step interaction macro presets. Actions: - 'list' (default if name is None): Lists all saved presets with descriptions. - 'run' (default if name is provided): Executes the preset sequence atomically. - 'view': Returns the full step sequence and metadata for the specified preset. - 'save': Saves or updates a preset sequence to .agents/artifacts/presets/<name>.json. - 'delete': Deletes a preset artifact. Step schema matches batch_actions: - {"action": "interact", "target": "b1"} - {"action": "type", "target": "e1", "text": "value"} - {"action": "click", "x":…

ParameterTypeDescription
actionstring
description
name
pid
steps
target_app