aiui-mcp

v0.12.0
aiui-mcp Checked 1 day ago Published 1 month ago

MCP server for aiui — native desktop dialogs on macOS and Windows from any Claude Code session, local or remote.

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

ask

Show a native choice dialog on the user's machine and return the pick. Use it instead of listing options in chat and waiting for a typed reply (deploy strategy, migration path, file to act on …). Per-option `description` carries the trade-off; `multi_select` and `allow_other` cover the rest. WHEN TO USE: 2–6 mutually-exclusive options where per-option context helps. For yes/no, use `confirm`. For mixed inputs, use `form`. For a visual choice ("which of these images?") add `thumbnail` per option — same `src` rules as everywhere else (data: URL, http(s) UR…

ParameterTypeDescription
options *array
question *string
allow_otherboolean
header
multi_selectboolean
session

form

Show a native form on the user's machine and return the entered values. Use it when the user needs to provide ≥ 2 related inputs, or any single input that doesn't belong in chat (secret, date/datetime/range, bounded number, sortable ranking, multi-select, color pick, table-row triage with column context, picking from many images), instead of asking one by one in chat. For a yes/no on one image use `confirm` with `image`. WHEN TO USE: ≥ 2 related inputs, or one input plus context/confirmation. For yes/no, use `confirm`. For a single choice, use `ask`. ACTIO…

ParameterTypeDescription
title *string
actions
cancel_label
description
fields
header
height
session
size
submit_label
tabs
width

confirm

Show a native yes/no dialog on the user's machine and return the decision. Use it instead of a yes/no question in chat, especially before an irreversible step (delete / drop / force-push / rollback / prod deploy); pass `destructive=True` there for a red confirm button. WHEN TO USE: irreversible or high-stakes step where "just proceed" is unsafe. For pure information, respond in chat. For 3+ options, use `ask`. For visual sign-off ("is this generated image OK?"), pass `image`. `image` follows the same `src` rules as elsewhere (data: URL, http(s) URL, or absolut…

ParameterTypeDescription
title *string
cancel_label
confirm_label
destructiveboolean
header
image
message
session

upload

Pull a file FROM the user's machine INTO this agent session. Calling this opens a native file picker on the user's machine; the file they choose is streamed back over aiui's channel and written to `target_dir` on YOUR host (the machine you run on — the remote for an SSH session). This is the counterpart to the user having to `scp` a file over: reach for it whenever the user says "take this file", "upload …", "here's the file/screenshot/PDF", or triggers `/aiui:upload`. WHEN TO USE: the user wants to give you a file from their own machine. Do NOT ask them w…

ParameterTypeDescription
session
target_dir

compare

Side-by-side A/B (or A/B/C) compare: render 2+ variants as full-content panes next to each other and let the user click ONE to pick. WHEN TO USE: "which draft is better", "which image edit", "before vs. after", "which of these three headlines". Use this instead of `ask` with `thumbnail` (which only shows a small icon per option, not the full content) or `gallery` (per-item batch review — approve/revise/skip each, not a single pick). Each variant needs a stable `value` (the key returned as `selected`) and at least one of `content` (markdown text — drafts, d…

ParameterTypeDescription
variants *array
cancel_label
columns
description
header
height
session
size
submit_label
sync_scrollboolean
title
width

notify

Fire a native OS notification and return immediately — use this for an async-completion signal to a user who isn't watching this session ("tests green", "deploy finished", "merge conflicts, need you"). Unlike `confirm`/`ask`/`form`/`gallery`, this tool does NOT wait for the user: it hands the notification to the OS and returns `{ok: True}` right away, with no dialog, no window, no response to parse. WHEN TO USE: the point is exactly that the user doesn't have to be looking at this session to notice — a long-running task just finished, something needs th…

ParameterTypeDescription
body *string
title *string
sound
subtitle

aiui_health

Reachability + token check against the aiui companion. Use this first if dialogs hang or fail — it distinguishes a companion that is not running or unreachable (e.g. the SSH tunnel is down) from a rogue local process holding the port with the wrong token. Answers fast; does not wait out a cold start. The companion's body is returned on *any* HTTP status: a 503 carries ``reason``, ``hint``, ``pending``, ``oldest_age_secs`` and ``lifecycle_phase``. ``ok`` is true only for HTTP 200, so a degraded-but-serving companion comes back as ``ok: true`` with ``ready…

version

Report aiui companion version, build info, binary path, and updater endpoint. Not free: it asks the companion over HTTP (through the SSH tunnel on a remote host) and, like the dialog tools, first waits up to 30 s for a companion that is still starting. Call it once, not in a loop.

update

Check for an aiui update on the user's machine and install it silently. Responds BEFORE the companion goes away, so the caller receives `{updated, current, available, note}`. Next agent call hits the new version. Two outcomes are not installs and need no retry logic: `updated: false` with `note: "already on latest"`, and `updated: false` with `note: "dialog in flight — update deferred"` — the companion refuses to restart out from under a dialog the user is filling in, so ask them to finish it and call again. Runs the updater against the *user's own machine…