PySide6 MCP
v0.1.1Playwright-style MCP to inspect, control, and debug PySide6 desktop GUIs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
screenshot Screenshot
Capture a screenshot of the app window (or a specific widget by ID). Returns the image so you can see the current UI state. Call this first to orient yourself.
| Parameter | Type | Description |
|---|---|---|
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
widget_id |
get_widget_tree Get Widget Tree
Get the full widget hierarchy of all visible windows as JSON. Each widget has: id, class, object_name, visible, enabled, geometry, text, children. Use widget IDs from this tree in other tools.
| Parameter | Type | Description |
|---|---|---|
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
get_widget_info Get Widget Info
Get detailed properties and state of a specific widget. Includes geometry, text, enabled/visible state, and dynamic Qt properties.
| Parameter | Type | Description |
|---|---|---|
widget_id * | string | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
get_app_state Get App State
Get app-level state: active window, focused widget, screen info. Useful to understand focus before sending keyboard events.
| Parameter | Type | Description |
|---|---|---|
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
find_widget Find Widget
Search for widgets by class, objectName, text content, or visibility. Returns a list of matching widgets with their IDs. Examples: find_widget(class_name="QPushButton") find_widget(text="Apply Mods") find_widget(object_name="enabledCheckBox")
| Parameter | Type | Description |
|---|---|---|
class_name | ||
object_name | ||
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
text | ||
visible |
click Click
Click a widget or screen coordinate. - widget_id only: clicks the center of that widget - widget_id + x/y: clicks at (x, y) relative to the widget's top-left - x/y only: clicks at (x, y) relative to the main window button: 'left' (default), 'right', or 'middle'
| Parameter | Type | Description |
|---|---|---|
button | string | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
widget_id | ||
x | ||
y |
double_click Double Click
Double-click a widget. Sends two rapid left-clicks.
| Parameter | Type | Description |
|---|---|---|
widget_id * | string | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
x | ||
y |
type_text Type Text
Type text into a widget (focuses it first) or the currently focused widget. For special characters use press_key instead.
| Parameter | Type | Description |
|---|---|---|
text * | string | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
widget_id |
press_key Press Key
Press a key on the currently focused widget. Named keys: enter, return, escape, tab, backtab, backspace, delete, up, down, left, right, space, home, end, pageup, pagedown, f1–f6 Single characters: pass the character directly, e.g. 'a', 'A', '1'
| Parameter | Type | Description |
|---|---|---|
key * | string | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
scroll Scroll
Scroll a widget. dy > 0 scrolls down, dy < 0 scrolls up. dx: horizontal scroll (positive = right). widget_id: target widget; omit to scroll the main window.
| Parameter | Type | Description |
|---|---|---|
dy * | integer | |
dx | integer | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
widget_id |
get_logs Get Logs
Get the last n log messages captured from the app's Python logging system. Includes timestamp, level, logger name, and message.
| Parameter | Type | Description |
|---|---|---|
n | integer | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
get_app_output Get App Output
Get the last n lines of the launched app's real stdout/stderr: print() output, uncaught tracebacks, and Qt/console warnings. This is the app's actual console output, captured because launch_app redirects it to a log file. Use this to debug crashes or startup failures. For structured Python logging records use get_logs() instead. Only works for apps started via launch_app on this server.
| Parameter | Type | Description |
|---|---|---|
n | integer | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
eval_python Eval Python
Evaluate a Python expression or execute a statement inside the app process. Context provides: - app: QApplication instance - widgets: dict mapping widget_id → QWidget Examples: eval_python("app.activeWindow().windowTitle()") eval_python("widgets['3'].isEnabled()") eval_python("list(app.allWidgets())") WARNING: runs arbitrary code in the app — use only for debugging.
| Parameter | Type | Description |
|---|---|---|
code * | string | |
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
get_launch_help Get Launch Help
Return how to call launch_app — especially the script parameter. Call this before launch_app when you are unsure which entry .py to use or whether script should include a subfolder path.
launch_app Launch App
Launch a PySide6 app with the MCP bridge injected, then wait until the UI is ready.
| Parameter | Type | Description |
|---|---|---|
cwd * | string | REQUIRED. Absolute path to the PySide6 project root — the folder that contains pyproject.toml (same directory you would cd into before running the app). Example: C:/dev/my-app or /home/dev/my-app |
app_args | Optional CLI arguments forwarded to the script, e.g. ['--verbose']. | |
command | DEPRECATED — ignored. Do not use. Older MCP schemas listed this as required; pass cwd instead. | |
script | string | Entry .py path RELATIVE to cwd (not absolute). Default: main.py. Omit or keep default when main.py is at project root. Use script='app.py' if the entry has another name at root. Use script='src/run.py… |
timeout | integer | Seconds to wait for UI readiness. Default 45; use 60–90 for cold starts. |
wait_until_ready Wait Until Ready
Wait until the app UI is ready: a visible top-level window that has been quiet (no layout/paint activity) for `quiet_ms` milliseconds. Use after an action that reloads or rebuilds the UI. Returns the readiness snapshot. Does not launch anything — the app must already be running.
| Parameter | Type | Description |
|---|---|---|
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
quiet_ms | integer | |
timeout | integer |
wait_for_idle Wait For Idle
Wait until the app's UI has been quiet (no layout/paint activity) for `quiet_ms` ms, or until `timeout` seconds elapse. Call after a click or action that triggers async work, before taking a screenshot.
| Parameter | Type | Description |
|---|---|---|
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
quiet_ms | integer | |
timeout | number |
get_app_status Get App Status
Report combined health of a launched app: whether the process is alive, its exit code, whether the bridge responds, and whether the main thread is likely blocked by a modal dialog (process alive but bridge unresponsive).
| Parameter | Type | Description |
|---|---|---|
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
list_actions List Actions
List all QActions (menu items, toolbar actions) in visible windows with their name, text, shortcut, and enabled/checked state.
| Parameter | Type | Description |
|---|---|---|
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |
trigger_action Trigger Action
Trigger a QAction directly by objectName (`name`) or visible label (`text`), without clicking through menus. Useful to avoid opening modal menus and to reach toolbar/menu actions reliably. Provide at least one of name/text.
| Parameter | Type | Description |
|---|---|---|
name | ||
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. | |
text |
list_apps List Apps
List apps launched by this MCP server. Each entry is {pid}. Pass pid= to other tools when more than one app is running.
stop_app Stop App
Stop a previously launched app (started via launch_app). Omit pid to stop the last launched app.
| Parameter | Type | Description |
|---|---|---|
pid | App pid from launch_app. Omit to target the last launched app. Required only when several apps are running and you need a specific one. |