MCP server
mtui-mcp is a Model Context Protocol server
that exposes mtui’s functionality as tools an LLM client can call. Its tool
surface is synthesised from the same command registry the mtui REPL uses:
each non-denied command becomes one tool, with a JSON input schema derived from
the command’s clap argument spec, dispatched through the same engine as the
REPL. Adding, renaming, or removing a command changes the MCP tools
automatically. Two commands, get and put, are denied synthesis and
re-served under the same names as hand-written tools that carry file content
in-band (see File transfer tools) — a path on the
server’s filesystem would be meaningless to a remote --transport http client.
put can still upload a file that already sits on the server, by source=, on
either transport, gated by [mcp] put_dirs. The underlying semantics of each tool are the command semantics in
the Command reference.
Building and running
The server lives behind the mcp feature, enabled by default alongside the
mtui REPL’s cli feature (see Installation):
cargo run -p suse-mtui --bin mtui-mcp -- --help
Two transports are served:
-
stdio (default) — one process == one client. Use this for a local LLM client that spawns the server as a subprocess.
mtui-mcp # stdio -
streamable HTTP — many clients, with per-client session isolation.
mtui-mcp --transport http --host 127.0.0.1 --port 8000--host/--portbind the HTTP listener and are ignored under stdio. The bind address is not restricted, but rmcp’s DNS-rebinding guard checks each request’sHostheader, which must belocalhost,127.0.0.1or::1; anything else gets a 403. Keep the listener on loopback or behind an authenticated boundary (see Security boundary).
Logs go to stderr; stdout is the transport, so never write to it.
set_log_level changes the level of that log, which belongs to the server: under
--transport http a call from any client changes it for every session, and none
of it reaches the client. A runtime level replaces the whole startup filter,
per-target RUST_LOG directives included. The OTLP tracing diagnostics keep
the startup level.
Tool profiles
The advertised tool surface can be narrowed with [mcp] profile:
full(default) — every synthesised tool.core— a curated everyday subset; the rest are filtered out before they reach the wire.
Fine-tune with [mcp] tools_allow (add specific tools on top of the profile) and
[mcp] tools_deny (remove specific tools; deny wins last). See the [mcp] table
in Configuration for these and the resource caps
(max_output_bytes, max_active_jobs, session budget, …).
Agent clients should prefer core: the full surface (78 tools) is sent on
every request, while core (45 tools) covers the everyday flow — load →
inspect → run/install → fill the report → approve/reject — without the host
bookkeeping and server-tuning tail. If a workflow never lists the queue or
polls openQA, deny those on top:
[mcp]
profile = "core"
tools_deny = ["updates", "openqa_overview"]
Security boundary
Profiles are not authentication or authorization. They reduce the advertised tool surface; they do not gate callers. HTTP session isolation is likewise not caller authentication. Keep the HTTP transport on its default loopback interface, or place it behind an authenticated boundary you trust to operate the remaining maintenance tools. Audit records attribute to a session, not a person (see Audit log). The audit trail such a deployment leaves is local-only unless shipped: see Shipping the audit log.
Permanent deny-list
Some commands are never synthesised into MCP tools, under every profile — this
cannot be re-enabled with [mcp] tools_allow. The permanent-deny criterion is
stated once, beside the list it governs — see the MCP_DENYLIST docs in
crates/mtui-core/src/registry.rs — and each entry below names the reason it
meets it.
- The interactive/REPL-only commands, which require a controlling terminal or
have no headless meaning:
quit,exit,EOF,switch,shell,help,edit. config_set: it writes operator config — endpoints, credentials, identity, timeouts — retargeting the infrastructure the session trusts, with no operator-visible artifact.config_showstays exposed, so a client can still verify the posture it operates under. Aconfig_setcall is refused as an unknown tool.- The path-based transfer commands
getandput, replaced by the hand-written in-band tools of the same names (#434): their synthesized forms exchanged server-local paths a remote client cannot read or create. (Only the synthesized command forms are permanently gone; the replacement hand-writtenget/putare ordinary tools — present infull, restorable undercoreviatools_allow, removable viatools_deny.) teregen_login: every call spends one of ~20 challenges/60s for the principal, so a looping client would lock the tester out ofcommitandapprove. REPL-only; the REPL operator runs the check deliberately.
Local process execution and terminal launching are not on this list because they
are not in mtui at all. The former lrun (run a command as the local process
user) was removed outright — an MCP client already has its own local execution,
and a REPL user is already at a shell. The former terms (spawn a terminal
emulator per refhost) went the same way: it duplicated shell (#566).
The deny-list is intersected with the live registry and consistency-tested; a renamed or removed command that leaves a stale deny-list entry is warned about at boot, so the boundary cannot drift silently.
config_show filtering
config_show prints less over MCP than at the REPL (#410). The REPL operator
owns the machine and can read mtui.toml directly, so it prints every resolved
value verbatim (secrets as <set>). A headless client gets only what it needs
to operate the session: endpoint URLs with embedded userinfo stripped and the
operational tunables/flags. The no-argument bulk dump is refused headlessly —
name the attribute(s) explicitly — as are the operator-local values
(session_user, template_dir, refhosts_path, and a ssl_verify CA-bundle
path; its true/false form is shown). Values config show never lists
(the oscrc location, the OBS API URL, lock/history paths) reach neither surface
through this tool.
whoami prints the oscrc principal and signing-key fingerprint on both
surfaces by design: it is the remote auth identity the server sees (not
operator-local paths), and a refused assign or commit is triaged against
it. Key/oscrc/store file paths stay REPL-only.
Session state and isolation
Session state is isolated per client. Under stdio one process serves one
client, so there is exactly one config / loaded template set / group of connected
hosts. Under HTTP each connected client gets its own isolated session (its own
config view, loaded templates, and hosts), so concurrent clients never see each
other’s state. Clients load their own state at runtime via the load_template and
add_host tools — mtui-mcp takes no boot-time update/host flags (see
Invocation).
The HTTP registry refuses to create more than [mcp] session_cap concurrent
sessions and reaps a session after [mcp] session_idle_timeout seconds of
inactivity (disconnecting its hosts, for a client that vanished without ending
its session).
A session’s teardown releases its pool claims, removes its operation locks
(with or without a lock -c comment) and disconnects its hosts. It runs when
the session ends: on stdin EOF, SIGINT, SIGTERM or SIGHUP under stdio;
under HTTP when the client ends the session (DELETE), when the transport’s
keep-alive gives up on it, at the idle sweep, and for every session at server
shutdown on the same signals. A teardown gives up after 45 seconds. Nothing runs
on SIGKILL or a crash: those holds stay until a later session reaps them
past [lock] stale_age / pool_stale_age (one day by default) or someone runs
unlock -f / unlock -p -f. list_refhosts --free names the holder, start
time and comment of every lock it finds, without attaching or reaping.
list_refhosts with summary: true answers “is there a free host for this
product, version and arch” per slot instead of per host: with testplatform
and free: true each requested arch gets one row with its free hosts and a
free/busy/unknown/none verdict, none naming an arch the inventory has
no host for. With json: true each row is
{"slot": {"product": "sles", "version": "15-SP6", "arch": "x86_64", "addons": []},
"hosts": 2, "free": ["host-a"], "locked": 0, "pool": 1, "unreachable": 0,
"verdict": "free"}
Every key is always present: without free: true, free, locked, pool
and unreachable are null and verdict is "none" or null. The counts
never overlap: an operation-locked host counts as locked even when also
pool-claimed. The reply is a bare array unless rows were cut; then it is
{"rows": [...]} plus "window": {"kept", "total"} for limit/offset,
"truncation" for the row budget, and "probe": {"probed", "total"} when
free left hosts unprobed. A verdict is a snapshot of one testplatform: it
does not reserve the host, a host your own update pool-claimed shows as taken,
and one host can be the only free candidate for slots of two testplatforms.
This isolation depends on rmcp’s legacy Mcp-Session-Id session lifecycle, so
over HTTP mtui-mcp advertises protocol revisions 2024-11-05 through
2025-11-25 and declines 2026-07-28: that revision removes protocol-level
sessions, and rmcp’s transport layer classifies any non-initialize request
carrying complete 2026-07-28 metadata as stateless regardless of config, mints
a throwaway server for it, and serves it inline — which would tear down and
rebuild the per-client McpSession (its SSH connections, pool claims) on every
such request. A client asking for it over HTTP falls back to the latest
revision mtui-mcp does support.
Over stdio there is one client per process and no per-request session to
protect, so that inline lifecycle is harmless: mtui-mcp advertises
2026-07-28 there too, so a client that opens with server/discover at that
revision succeeds instead of being refused.
Multiple templates: scoping and fan-out
A session can hold several loaded templates at once (call load_template more
than once; loading an already-loaded RRID reloads it). list_templates lists the
set, and each template keeps its own test report and SSH host group.
Every command that acts on a loaded template carries the shared -T/--template
and --all-templates flags, so its synthesised tool exposes two optional
parameters. The session-level tools — load_template, unload,
list_templates, list_refhosts, updates, review_state, config_show,
whoami, set_log_level — expose neither, and regenerate exposes only
template:
template="<RRID>"— scope this one call to a single loaded template (the analogue of the REPL-Tflag). An unknown RRID returns a clean error.all_templates=true— force fan-out across every loaded template.all_templates=false— suppress fan-out on a tool whose command fans out by default, narrowing it to one template instead.
A client still sending template/all_templates to unload, list_templates,
list_refhosts, updates, whoami or set_log_level, or all_templates to
regenerate, has the call refused with unknown argument(s): … (they were
ignored with a server-log warning in 26.4).
load_template never accepted them; config_show never took them.
Omitting both parameters resolves per command: a read/annotate tool
(list_* other than the session-level ones above, show_*, openqa_*,
checkers, checkout, export, set_workflow, comment, analyze_diff,
reload_openqa, reload_products, set_host_state, set_timeout) fans out
across every loaded template, prefixing each template’s
output with an === <RRID> === banner. A host-mutating or remote-write tool
(update, prepare, downgrade, install, uninstall, set_repo, run,
reboot, lock, unlock, add_host, remove_host, approve, reject,
assign, unassign, request_review, commit, plus the hand-written get/
put transfer tools) never implicitly fans out: with several templates
loaded and neither parameter set, the call is refused rather than guessed at —
the error names the loaded RRIDs and the template=/all_templates=true
escape hatches. This is the same rule the report_* tools use for their own
required-with-several-loaded template parameter (below).
A fanned-out call that fails on one template keeps running on the others and reports an aggregate failure at the end.
switchis not an MCP tool (moving the active-template pointer is REPL-only navigation): over MCP you target a template per call withtemplate=.load_templateandunload <rrid>are exposed — each names its own RRID.list_templatesis available as a read-only listing.
What approve reports on OBS
After an OBS approval (maintenance and PI requests) succeeds, approve reads
the request again and, below approved <rrid>, prints one line per review
still new that belongs to a QA group (a group whose name starts with qam)
or to the acting user: still open: review by group <group>, or
still open: review by user <user>. The automation groups qam-auto and
qam-openqa are named too, as still open: review by group <group> (automated),
because an open automated review also keeps the request from releasing. At most
ten are named; a still open: <n> more line counts the rest. Only when none is
open does it print no QA review left open on <rrid>. If that read fails, the one line is
approved <rrid>; could not re-read its reviews (<cause>), check them: the
approval stands and the call succeeds, but never with the all-clear line. A
refused or failed approval makes no read. The Gitea path prints only
approved <rrid>, since its bot posts the official review asynchronously.
The reply is text only: a command tool returns one text block, so there is no
structured open_reviews field. The REPL prints the same lines.
Non-interactive prompt behaviour
MCP sessions run with no interactive prompter installed, so a command that would prompt at the REPL never blocks waiting for input:
approverefuses non-interactively on a Gitea checkout-hash mismatch (at the REPL it prompts for confirmation, default no) unlessaccept_headnames the PR head as Gitea reports it now — the refusal prints that head. The value is a pin, checked even when the report is not stale, and the LGTM is refused again if the head moves before it is posted. A missing Gitea token or a failed Gitea call refuses on every surface, since the check never produced a verdict to confirm. The reviewer and document checks, the Slack gate and the backend’s own checks (Gitea: hash gate, assignment, already decided; OBS:-g, assignment) all run beforereviewerrecords or uploads anything, so a refusal from them publishes nothing. The verdict check, on OBS and Gitea alike, cannot: it reads TeReGen’s copy of the document after the upload, immediately before posting (approveneedsPASSED;rejectneedsFAILEDand a non-blank topcomment; an unreadable document refuses), and a Gitea head that moves during the upload is refused at the LGTM with the reviewer already stored. A document changed on TeReGen after that read is not noticed. On Gitea ajob_cancelthat lands during the read stops the call with nothing posted. Withoutreviewer, both refuse while the loaded document has uncommitted edits. PI requests skip the verdict check.load_template’s interactive “Force continue loading template ?” fallback — for a stale checkout hash that TeReGen also refuses to regenerate (already hand-edited) — is exposed as the--force-continueargument; without it the load is unconditionally abandoned, since the question’s non-interactive default is “no” (openSUSE/mtui#517). A force-continued load neither repairs nor bypasses the recorded mismatch, so it does not touchapprove’s refusal above — andcommit,export,reject --reviewerandrequest_reviewrefuse the same way, unless given their own--allow-stale, so a stale-loaded report cannot be published or overwritten non-interactively either.approve’scheck_hash()re-query is live (asks Gitea again, every call) and replaces that load-time verdict forapprove -r; the others instead read whether the load itself saw a mismatch, so a report that loaded clean and only goes stale once the session is already open (a maintainer pushes to the PR whilemtui-mcpstill holds it loaded) passes them silently —commitis the one where that gap is most likely to matter, since it is the publish step.- A command timeout aborts immediately instead of offering the REPL’s wait/retry prompt.
commentandcommittake their text/message as a required argument (no editor/stdin prompt), andregenerategates overwrite on the--forceflag rather than a prompt.- On a Gitea pull request,
commentrefuses text containing@<group>-review:(anywhere in the text, any letter case) before sending it: the review bot (group-review) reads such a line as an approval or, whatever else follows the colon, a decline, and a decision goes throughapprove/rejectand their checks.rejectrefuses the same in itsmessage, before the reviewer upload. - On a Gitea pull request,
assign/unassignaccept auseroverride only if it is a Gitea login (letters, digits,-,_,., starting with a letter or digit), since it is written into the assignment comment.
SSH authentication is public-key only in every surface. A failed key auth reports
the host as unreachable; mtui-mcp never falls back to a password prompt.
File transfer tools
The hand-written get and put tools replace the synthesized commands of the
same names (#434), carrying content in-band in both directions. The REPL
get/put commands work on literal paths instead, with downloads landing in
{report_wd}/downloads/{name}.{host}.
With no template loaded, both tools act on the hosts added with add_host, as
the REPL put does, so a fleet pass needs no update loaded. A template that
is not loaded is still refused. Such a transfer runs on the session itself, so
it first waits for every call already running, such as a list_refhosts --free
or updates, and holds new calls back until it finishes. A slow reply is that
wait, not a lost call; do not send the transfer again.
get (read-only)
Downloads remote (an absolute file path; folders are not supported in-band)
from every enabled host and returns, per host, the remote size, a
truncated flag, and the content: UTF-8 as content, binary as content_b64
(standard base64). Reads are capped per host at [mcp] max_input_bytes,
enforced while reading — a host never buffers more than the cap (0 disables
it and reads the whole file) — and each host gets an equal share of the
[mcp] max_output_bytes wire budget. With a cap set, size is the file size
the server reports when the file is opened, so it can differ from the returned
bytes if the file changes during the read; a server that reports no size fails
the call, naming the host, rather than being read without a bound. Without a
cap, size is the number of bytes read. Truncation never splices a notice into
the content: the truncated flag and size are the signal. Pass hosts (a
list of connected hostnames) to retry or page a subset when one host’s file was
truncated; unknown or disabled names refuse the call. Any host failure fails the whole
call with the host named — partial content is never returned as success.
put
Uploads a payload — content (UTF-8), content_b64 or source, exactly one
of the three — to <target tempdir>/<filename> on every enabled host, the same
destination the REPL put uses. filename must be a bare name (no path
separators); with source it defaults to the basename of the path you named.
A payload above [mcp] max_input_bytes is refused outright: truncating an
upload would corrupt it. Any host failure fails the call with the host named.
Pass hosts (a list of connected hostnames) to write to a subset; unknown or
disabled names refuse the call before anything is written, and the reply lists
only the hosts written.
put neither takes nor checks the operation lock (/var/lock/mtui.lock): it
writes to a host even when another owner holds that host’s lock, because an
upload is not a zypper transaction. To leave such a host out, name the others
in hosts, or disable it with set_host_state first.
source is an absolute path of a file on the machine running mtui-mcp, so the
bytes never pass through the model. It works on both transports and is off
until the operator lists directories in [mcp] put_dirs; without it the call
is refused. The file must be a regular file whose resolved path (symlinks
followed) lies strictly inside a listed directory, in any depth; anything else
is refused before a lock is taken or a byte is sent, and a path outside every
listed directory is refused the same way whether or not it exists. The refusal
lists put_dirs. The file is read once, so the bytes that are size-checked,
hashed and uploaded are the same buffer. The reply gains
source: {path, bytes, sha256} — the resolved path, the byte count and the
SHA-256 of what was uploaded.
List only directories whose contents may leave the machine and that only the operator can write. A file that someone else can place or swap in a listed directory (or in one of its parents) is uploaded to every host. Final symlinks are refused at open, but a directory component swapped between the check and the read is not defended against.
The destination path is unchanged, but a file is
published atomically (see Uploads): readers
of <filename> see the whole old file or the whole new one, an existing
symlink or hardlink at that name is replaced rather than written through, and
the file ends up mode 0770. A host whose server lacks posix-rename@openssh.com,
or whose destination directories other users could swap, is refused by name
and nothing is written there.
Command behaviour notes
-
Every tool schema sets
additionalProperties: false, so an argument the tool does not declare is refused withunknown argument(s): …. -
review_state(read-only) takes one or more RRIDs or Gitea pull request URLs inupdateand needs no loaded template. It only reads: no assign, no lock, no regeneration, no load. Each row names the holder of each QA group’s review (owner), the state of that review (gate), when it got there (since), when the update was created, the pull request head and base branch, and the template (current,stale,generating,missing: <first error line>, orn/afor a bare pull request URL, which names no RRID).- SLFO: the gate comes from the group’s latest review on the pull request
that carries a verdict and is not dismissed — a later comment or draft
does not count:
owed(review requested, or the group only commented, which carries no verdict but clears Gitea’s request),approved,changes-requested,…, staleafter a push,closedwhen the pull request was closed with the review owed,-when the group has no review. A review whose state, reviewer,dismissedorstalecannot be read makes the gate?with the reason; a team review request is not the group’s and is skipped.approve,rejectandassigncount a decision comment as “already decided” only while these reviews do not show the group’s review owed again, yet the two can still disagree: a pull request approved with no decision comment isapprovedhere but still open toapprove, andassign’s review-requested guard reads the requested reviewers. - OBS: per qam group
new,new (assigned)(an assign accepted the group review and its user review is open) oraccepted, or the request’s own state once it left review. Automation groups (qam-auto,qam-openqa) are in--jsonwith"automated": trueand left out of the table. - An SLFO RRID’s pull request is the one its published document names (its number must be the RRID’s); without that document the row fails and asks for the URL. The base branch is shown as Gitea names it: mtui has no mapping from a codestream to a branch, so it does not judge it.
- A value that cannot be read is
?,-means nothing (nobody, no review),n/adoes not apply. A source that fails is named under the table (gitea,obs,teregen,document) and the call is then a tool error carrying the partial table; a cancel prints the rows already read and failsread N of M updates— unless a lookup had already failed, which the error then names first. An owner the open reviews and the review history disagree on is?with anote:, and--mineis then?too. --jsonprints{"rows", "failed", "notes"}; each row’s values are typed objects ({"status": "known", "value": …},{"status": "unknown"}, …), so a client never parses?orapproved, stale.
- SLFO: the gate comes from the group’s latest review on the pull request
that carries a verdict and is not dismissed — a later comment or draft
does not count:
-
coverage(read-only) answers, per declared test-platform slot of each loaded report (a platform ininstall.test_platformsand one of its archs), whethertesting.install.checksholds a check from a host the refhosts inventory resolves for that slot with the testplatform queryadd_hostbuilds:checked(with the host),no-refhost,owed,not expected(an uncovered slot in the kernel workflow, which records no install check) orunreadable(the platform’s base, addon or archs could not be read back, so nothing is matched against it; a warning line comes first). Unlikeadd_host, which draws one host for identical queries, every declared platform and arch gets its own row. A check counts for one slot at most; the checks that count for none are listed with the reason: the inventory is unavailable, the host is not in it, the host serves no declared slot, or every slot it serves is counted for another check. It contacts no host and does not judge what a check shows. A report with no declared platforms is an error, never “nothing owed”; when the inventory cannot be read or holds no hosts, the first line says so and no slot ischeckedorno-refhost. In the auto workflow openQA install jobs are not counted against the slots. -
list_metadataandupdatesshow the QEM Dashboard’s embargo flag, read from its incident list (/api/incidents):yes,no, orunknownwith a reason.nocomes only from an incident that was read, paired with the update and carriesembargoed: false; no paired incident, a missing or non-boolean flag, a failed read and a cancel are allunknown, neverno. An incident is paired by its dashboard number (the review id for SLFO, the maintenance id otherwise), its type, and its project when that can be derived: always for a classic update, and for a git one from a pull request URL that names the update’s own pull number (openqa_jobsandopenqa_overviewtake the project from any pull request URL). Without a project the number and type must match exactly one incident, and since pull request numbers repeat across repositories that incident must also share a source package with the update, or the state isunknown; when the URL names another pull number the reason says so (its pull request URL names another pull request, …). A Product Increment has no incident and is alwaysunknown.list_metadataputsEmbargoedfirst and reads the dashboard once per template; a failed read showsunknown (<reason>)and the call still succeeds.list_metadata --jsonprints{"rrid", "embargoed", "embargoed_reason", "metadata": [{"label", "value"}]}for one template (it never fans out: passtemplatewith several loaded);embargoed_reasonisnullunless the state isunknown. A git update without a pull request URL of its own pull number isunknown: with no repository to check, the incident cannot be confirmed as its own.updatesreads the dashboard only when asked, withfield: ["Embargoed"]orembargoed, and then once for the whole queue, never per row.embargoed(yes,no,unknown,all) filters beforelimit/offset;nonever matches an unknown row,unknownmatches every row whose state could not be read,allkeeps every row and only adds the state. Every row shows the state: the default layout appendsembargoed=<state>, and afieldlist withoutEmbargoedgets it added last. Withjson, rows gainqem_embargoedandqem_embargoed_reasonwhenever the dashboard is read, which withjsonmeansembargoedwas passed (fieldcannot be combined withjson); a row without them means the dashboard was not asked. A queue row names no workflow, so its RRID kind stands in: a Maintenance id is paired as a classic incident, an SLFO review id as a git pull request number. An SLFO row whoseurlis a pull request URL of that number on the configured Gitea origin ([gitea] url) is paired within the repository the URL names, as a loaded git update is; a missingurl, one that is not such a URL, one on another origin, or one naming another pull number leaves the row unpaired by repository, and then the number must be unique and share a package with the row’ssrcrpms. When the dashboard cannot be read (or no HTTP client can be built for it) every state isunknown, the text listing opens with awarning:line, and the call fails after the listing.
-
updateswithlive: truereads each shown row’s review gate, owner and template asreview_statedoes, afterlimit/offset.review_grouplists a row in any of its groups, so a row is judged on thereview_groupgroups its own review groups also name (all of them when the row names none); withoutreview_group, on the qam groups TeReGen lists it for. Automation groups (qam-auto,qam-openqa) never count, and the call is refused, before any request, whenreview_groupnames one. The output starts with the summary (live: read N of M shown rows: …), thedropped N rows whose verdict is no longer owed: …line in the unassigned andmineviews, and the line saying the untracked list was not read, so a capped reply keeps them; each row’s live cells are one bounded line. Rows held by someone the view does not admit, rows not concluded (no review of a group, or groups that disagree) and rows whose read failed are listed apart; a failed read makes the call a tool error carrying the listing and naming those rows. Withjson: trueit is one document,{"summary", "rows", "held", "unsettled", "live_failed", "dropped", "untracked", "notes", "truncation"?}; each row’sliveobject carriesstanding,owner,gate,since,createdandtemplateas the row shows them (unknown isnull) and the typed read underreview. It fails the same way. Withoutlivethe tool’s output and cost are unchanged. The tool is still advertisedread_only: false;liveadds only reads.- Together with
embargoed(orfield: ["Embargoed"]) the embargo filter runs first, beforelimit/offsetand the row budget, so a row it drops costs no live read. The default layout showsembargoed=<state>before the live cells; a filter that leaves no row gives the empty live document (withjson) or its message and the untracked line; a dashboard that cannot be read fails the call after the listing, named ahead of any live failure and outranking a cancel.
- Together with
-
The
openqa_overviewandopenqa_jobstools hide their operator override flags (--url-openqa,--url-dashboard-qam,--url-qam,--test-pattern,--no-fetch, #410): a headless client uses the operator’s configured endpoints, and a sent one is refused as an unknown argument. The REPL keeps every flag. -
openqa_jobsends each red row with its failed modules from the listing it already reads. Itshistory(0-50, default 0) costs one or more openQA requests per distinct red scenario among the rows it prints (at most 100 scenarios, up to 51 pages each, four at a time, two minutes in all): a failed or timed-out lookup is named on its row and in awarning:line ahead of the summary, and fails the call after the listing, so a missing history never reads as “fails nowhere else”. Ajob_cancelkeeps the listing printed and marks the unread scenariosnot read: cancelled. -
install,uninstall,prepareanddowngraderesolve each checked host’s transaction with a dry run first and fail by name a host where it would remove a protected package the call did not name, or where the dry run fails (a104“not found” dry run is not a failure; see Removal guard); other removals come back as<host>: the transaction also removes ….updatedoes the same in both its prepares: a host its first prepare refuses is left out of the patch, its reason comes back once as<host>: its prepare was refused: …however the update ends, and the failed result names the host; a host its--newpackageprepare refuses comes back in anewpackage prepare after update failed (…)warning while the update stands. Transactional, SLE 11 andYUMhosts are not checked, and each comes back once as<host>: no dry run exists for this host, ….allow_removal: trueskips the check.runand the rollback of a failedupdateare not checked. -
check_hostsruns up to four root commands per host (rpm -q,df -Pk /,systemctl --failed, and agrepof the section headers of/etc/zypp/repos.d/*.repo), so it is not advertisedreadOnlyHintand writes an auditintentrecord. It takes neither the operation lock nor a pool claim, writes no history row, keeps its probes out of the host log (show_logandexportnever see them), changes no package or repository, and runs no zypper: zypper takes the ZYpp lock while it runs, and mtui’s update script does not wait for that lock, so a zypper probe overlapping another tester’supdateorpreparewould make their zypper exit7and fail their run. The probes run in parallel across hosts and one after another on each host, each bounded to 60 s. It fails when any host’s verdict isfailorunknown, after printing every host. After a cancel it still fails, naming the hosts, rather than reporting a cancel, when any host could not be checked (disabled, unconnected, YUM) or any check that ran endedfailorunknown; only the checks the cancel stopped are left out. In text output the first line is the overall verdict, so it survives truncation;--jsonis one document (summary, thechecksit ran, the ones it leavesunchecked:dependencies,patches,reboot), and a truncated JSON reply is not valid JSON — raisemcp_max_output_bytesor narrow withhosts. Withjsonthe tool never fans out: it covers thetemplatenamed, or the only template loaded; with several loaded and notemplateit is refused as ambiguous rather than reporting on one the client cannot see, andall_templatesis refused, so a reply is always one document.failed_unitsdoes not apply to SLE 11 and is listed in that host’snot_checkedwith a reason, without making itunknown; a YUM-family, disabled or unconnected host isunknownwith areason. With a report loaded, its own test repositories are not reported as left over. The probe outputs are verified on SLES 15-SP6, 12-SP5 and 16.0 x86_64 hosts; SLE 11, transactional hosts and other architectures are not yet. -
The
preparetool fails — instead of reporting success — when the loaded report’s metadata names no package versions, and when no prepare command could be built for a connected host (#396), so automation keying onprepare’s success does not see a false positive on a metadata-empty report. -
On a report whose metadata carries a
binariesblock,preparenarrows the package list per host to what that host’s products compose, and fails by name a host whose products compose none of it — rather than sending a list zypper refuses with “capability not found” (104). An architecture a product declares but the metadata never mentions composes nothing, not the full list, so it gets the same named refusal.updateexcludes such a host from its patch, scopes its own lock/repository/package-check to the hosts that do compose it, and reports a failure naming it, instead of patching a host its own prepare established no baseline on. On every report kind,updatealso excludes by name, before anything runs on it, a host the update’s repositories do not reach (no repository of this update matches the host's products (…); it was excluded from the update,its products could not be read; …for a host whose system was never read, orthis update has no repository to add; …when the update has none): the patch would find nothing to install there and pass. A host either exclusion leaves out is left out of the automatic rollback too: when a patched peer fails its check, the rollback reaches only the hosts the patch was dispatched to.preparewithupdateset fails such a host by name the same way (…; nothing was installed), before anything runs on it, instead of installing from the repositories it already had; the other hosts are prepared. The refusal is in the tool’s error, once, also when a peer stops the prepare before its verdict: then oneprepare failed on <hosts> (…)summary carries both. -
update’s tool result carries diagnostics for every non-fatal degradation of the run — a composition refusal, a host excluded because its test update repository genuinely failed to register, or because its refresh failed on a read-only root (its partial add is undone and its lock released before the patch reaches its peers; when that undo fails too on a read-only root, the entry ends with whattransactional-update -n rollbackdid:…: staged snapshot dropped,…: nothing was staged, or that it failed and a staged snapshot could remain), a host excluded because the update’s repositories do not reach it, a repository refresh that may have left stale metadata on a read-write host that still gets patched, a prepare host failure it continues past, a failed--newpackagestep, a failed update naming the hosts it did not complete on and whether it rolls back or leaves their test repositories configured, a read-only-root host the rollback left out because its refresh failed while its repository removal succeeded, and which the reset put back (<host>: refreshing repos failed: …; no downgrade was run: staged snapshot dropped, or…: nothing was staged), a failed automatic rollback, and the three ways the post-update test-repo cleanup can fail — on both the success and the failure path. The server’s tracing goes to its own stderr, not the tool result, so atracing::warn!alone would never reach an MCP client. -
On each host
updatecompleted on, it also names every tracked package that did not end at the update’s version, one degradation each, from the version queries made before the patch and after it (on a transactional host, after its reboot). The state after the patch decides the finding: unchanged (including a package already at or above the update’s version before the patch), lower than before, raised but still below the update’s version, raised above it, no longer installed, or a version query before or after the patch that did not answer. Each line names what was observed and all three versions:<host>: pkg was already above the update's version before the patch, which did not change it (before the patch: 2.1-1; after it: 2.1-1; the update's version: 2.0-1). When the update’s version of a package could not be read from its metadata, the package is still judged unchanged, lower or removed (the update's version: could not be read), but not as below or above it. A package with several installed copies (a kernel) is judged on its newest copy. Not judged: a package not installed before the patch (one new to the host) unless the query after the patch did not answer, one the host does not track, one the update does not compose for the host’s products, and disabled, excluded or refused hosts. At most ten packages are listed per host, then<host>: N more tracked packages with a version finding, not listed here (see `list_packages`), which counts as one degradation. These qualify the confirmation like any other degradation; the update still counts as completed on the host. -
Every workflow fan-out (
install,uninstall,prepare,downgrade,update) confirms success as<verb> completed on <hosts>, so a clean run is never an empty tool result.update’s confirmation is printed above its diagnostics — the head of the buffer is what survivesmax_output_bytes— and is qualified whenever the run recorded a degradation:update completed on h1: the patch passed its checks, with 2 degradations reported below. The count is of degradations only; a check’s own recognised sections (the vendor-support notice, extra rpm output) ride in the same diagnostics and are routine on a healthy update, so they leave the confirmation bare. A partial run — one that failed on some hosts and completed on the rest, with nothing rolled back — still fails, naming the hosts it failed on, but first prints the confirmation for the hosts it completed on, so they need no second run. A host counts as completed only when it passed its check and, if transactional, came back from its reboot with the new snapshot active. Anupdateis partial when it excluded a host (its products compose none of the update’s packages, or its test update repository failed to register), or when a peer’s patch never ran, could not work out what to patch, or did not come back from its reboot. On the last three it first finishes the peers whose patch passed as a successful run would: it reboots the transactional ones, then runs the--newpackagestep, records the post-update package versions and removes the test update repositories on every host it completed on. Its degradation names the hosts it did not complete on, and for each says what the host’s record shows about the test update repositories: “still configured on” (the script stopped before its cleanup, reported a failed removal, or has none, as on yum), “may still be configured on ” (the removal is not confirmed: nothing reported it, or the host is transactional and its staged snapshot may still list them), or nothing when the script reported them removed or this session added none. A rollback leaves out a peer that could not work out what to patch, since no patch ran there, and a peer whose patch never ran to completion, which it may be unable to reach or would hit with a second transaction; the degradation names each with its reason. The hosts the rollback reverts are named, from the same record, in a separate after the rollback, …degradation once it has run. A patch that failed its check rolls back the patched hosts, those two kinds of peer apart, and names no host as completed. So does a reboot that did not take on a reachable host, but only when every reboot that failed is on a reachable host and no peer’s patch never ran: the rollback cannot reach a peer lost to its reboot, and would start a second transaction on a peer whose first was never observed to end. Otherwise nothing is rolled back and the hosts whose reboot failed are named among the failures. A cancelled run names none as completed either. A rollback that fails itself names the hosts it did not restore. -
add_hostwithout-tfollowsadded <hosts>(orno reference hosts resolved/connected) with one line per test-target slot or testplatform it left without a host and why: no matching refhost, an arch of the testplatform no reference host covers, every candidate claimed by another RRID, every candidate already serving another slot of the update, or a mix of the two, no candidate connected (unreachable, claimed remotely,operation lock held by <user> since <time>for another owner’s live operation lock, or refused because the update workflow cannot drive it:no command set for <Product version>, <root mode>with the root mode as detected, such astransactionalortransactional-update.conf but root mode unknown, an unrecognised product, or an unreadable base product), the retry budget spent, or the refhosts inventory unavailable. The call still returnsOkin that case, so these lines are the signal to check. -
With an update loaded,
add_host -trefuses a host the update workflow cannot drive:could not attach any requested host: <host> (<reason>)when none attached. With nothing loaded it attaches such a host forrun,getandput.load_templateprints no unserved-slot lines, but printsskipped <host>: <reason>for each host it refused this way or skipped for another owner’s operation lock, including a pool host whose slot a sibling then served.add_hostprints the same line for a refused host whose reason no unserved-slot line gives. -
exportemits oneWARNING:line per host whose install-result block it left unverified in the report:WARNING: no package of this update is tracked for <host>...when the host tracks none (for example, the update ships packages for none of its products), andWARNING: no package version data recorded for <host>...when the host’s tracked packages were never checked (noupdateran in this session). -
exportnames thetesting.install.checksrows it did not rewrite. With-tit rewrites the selected hosts’ rows only and keeps every other row, including that of a host no longer connected:testing.install.checks: kept the rows of the hosts not selected: <hosts>. Without-tit rewrites the checks from the connected hosts:testing.install.checks: dropped the rows of the hosts not connected: <hosts>. The rows are ordered by host. -
reload_productsfollows<host>: reloaded products (<base>), for a host whose products changed, with<host>: tracked packages: +crmsh, ~smc-tools (required 1.0-1 -> 1.2-1), -foo (kept for their recorded checks: bar)—unchangedwhen nothing was gained, lost or required at a new version, and; no package of this update is tracked there nowwhen the host tracks none — then<host>: N newly tracked packages were never checked; run `update` before `export`. Untilupdatechecks them,exportleaves that host’s verdict undecided without a warning of its own. -
runprints its own verdict above its per-host output, for the same head-survives-max_output_bytesreason:run completed on h1 (exit 0), h2 (exit 1)names every host it ran on with its exit code, followed byFAILED on h2 (exit 1)when any host exited non-zero.runreturnsOkon a non-zero remote exit — a non-zero exit is often expected — so this verdict, not the tool’s success/failure status, is the signal to check. -
The
runtool’scommandis argv tokens, not a shell line: the tokens are re-quoted before dispatch, so["cat /etc/os-release"]reaches the host as one quoted word (exit 127) and["zypper","lr","|","grep","x"]passes a literal|as an argument. Split the words yourself (["cat","/etc/os-release"]), and for anything needing a shell — pipes, redirection,;— ask for one explicitly:["sh","-c","zypper lr | grep x"]. -
checkerslists the checker runs TeReGen holds for the update, not the report’sbuild_checks/logs, whichreport_fileslists. TeReGen serves checker results for SLFO ids only, so for any other id the tool does not ask it and answersNo checker results for <id> (TeReGen serves checker results for SLFO ids only). For an SLFO id,No checker results for <id>means TeReGen answered with an empty list. A lookup that failed fails the tool withChecker lookup for <id>: TeReGen …, naming the cause: TeReGen unreachable, a body that is not JSON or carries nocheckersarray, or an error status with TeReGen’s own reason, as inTeReGen answered 404 Not Found: SMELT does not know update …. A 404 is TeReGen’s “nothing to give”; a 502 or 504 means SMELT failed or timed out, so the results are unknown. TeReGen’s text is stripped of terminal control sequences and cut to 500 characters.rrid="<RRID>"reads the checker runs of an update that is not loaded: it runs once whatever is loaded, loads nothing and touches no host, takes no template lock: like a session-level command it takes the registry gate shared, so a call scoped to one loaded template does not hold it up, but a call that holds the session exclusively, or is queued to — a fan-outupdateover several loaded templates,load_template,add_hostwith nothing loaded — delays it. It is audited under the RRID it reads, and refusestemplate/all_templatesalongside it. The id must parse as an RRID whose maintenance component is letters, digits,.,_and-only. -
show_update_reposwithcheck: truefetches the repository of each of the report’s install targets (repodata/repomd.xml, then its primary metadata, gzip or zstd) from the server mtui runs on — no refhost is needed — and gives each a status:ok,missing,empty,not published(a 404 onrepomd.xml) orno answer(anything else that stopped the metadata being fetched or fully read, with the reason). A repository that could not be read is never reported asemptyormissing, and only redirects that stay inside the repository are followed. The tool fails when any repository is notok, after listing all of them, and when there is nothing to check. A cancel lists only the repositories already checked: the tool then fails with an ordinary error ending “; stopped after K of M” when one of them was notok, and as cancelled otherwise. Withjson: trueas well the reply’s first content block starts with one JSON object on one line:{"source": "install.targets", "total": 2, "checked": 2, "not_ok": 1, "ok": false, "repositories": [{"product": "SLES", "version": "15.5", "arch": "x86_64", "repository": "https://***@host/path/", "status": "missing", "packages": 12, "missing": ["foo"], "reason": "12 packages; not published at …: foo"}]}sourceisupdate_reposwhen the report has no install targets (each is then checked for being published and non-empty only);checkedis belowtotalafter a cancel;packagesisnullwhen the metadata was not read. On failure the error summary follows the object on the next line.jsonnever fans out: with several templates loaded, passtemplate; withall_templates: truethe call is refused. Repository URLs are masked like every other URL mtui prints, and reasons and names are reduced to one printable line. -
report_check(read-only) lists what the report document still owes before it can be approved.sourceislocal(default: the loaded document, uncommitted edits included) orserver(TeReGen’s stored copy, the oneapprovereads, fetched without credentials). Errors:unanswered(an owed field that isnull, or a string that is empty or only whitespace:verdict; each issue’sreproducer,statusandcommentunless a tester filed it; withreview, its three source questions, the build-logtest_suite_present,test_suite_sufficientand both comments, andtest_suite_passedonly whiletest_suite_presentis true;verdictandcommentoftesting.installandtesting.regressionwhere present),missing-section(testing.installandtesting.regressionon the manual workflow,testing.regressionon the kernel workflow, nothing on auto; and, under any workflow,reviewon a maintenance or SLFO report, which the schema requires and only a PI report lacks),contradiction(aPASSEDreport over aFAILEDinstall or regression verdict) andreject-reason(aFAILEDreport with no comment). Warnings:install-row(a row whose verdict is notPASSED, that lists no package, changes no version or loses a package),export-only(a regression comment holding only the kernel export’s block),openqa-running(one finding for aPASSEDreport over exportedopenqa_overviewrows stillrunning, naming how many and the first three) andno-install-log(install checks but no install log). The topcomment, the reviewer andnew_issuesare not owed, and nothing judges whether an answer is right.The workflow is the loaded template’s, set at load: auto for
load_template -a, switched to manual when the QEM Dashboard has no install results (or cannot be read); kernel for-k;set_workflowchanges it (it is in thecoreprofile). The document does not store it, so the same copy can owe sections under one workflow and none under another; eachtestingmissing-sectionmessage names the workflow it was judged under, and so doesapprove’s refusal when one of its findings is one, even past the five it lists. A missingreviewdoes not depend on the workflow, andcommitcannot add it: the refusal says to regenerate the document or report it to TeReGen. An install log is a*.logfile other thancheckers.log: locally in the install logs directory, read ascommitcollects it (absent or not a directory holds none); on the server ininstall_logs/oruploads/, or, from a server that names no directory, an uploaded one.uploads/also holds the committedresults/files, so a.logamong those counts as well: the warning can miss a report whose only logs are results, never the other way round.With
json: truethe reply is one JSON object, counts first:{"ok": false, "errors": 1, "warnings": 0, "id": "SUSE:Maintenance:1:2", "source": "server", "workflow": "manual", "verdict": "PASSED", "etag": "\"abc\"", "dirty": false, "listed": 1, "omitted": {"errors": 0, "warnings": 0}, "findings": [{"code": "unanswered", "severity": "error", "pointer": "/testing/regression/comment", "message": "not answered"}]}okis true only when the check ran and found no error. At most 50 findings are listed, every error before any warning;listedsays how many andomittedhow many of each were left out, and the counts cover all.etagis the server copy’s, or forlocalthe one the loaded copy was read or committed at, andnullwhile the loaded copy has uncommitted edits. A server read that fails (a 404, an error status, a transport error, a body that does not parse, or a failed artifact listing) fails the tool naming the cause; it never answersok. Withoutjsonthe reply is the same as text, the summary first, as forshow_update_repos.jsonnever fans out, as forshow_update_repos. With no document loaded it refuses like the report tools.
Report document tools
Eleven hand-written tools work on the loaded report as a document: nine read
and edit it as named sections and issues rather than lines of text, and two list
and read its files. Each accepts an optional
template="<RRID>" selecting which loaded template to act on; with more than
one template loaded an unscoped call is refused — the same “one template, or
refuse” rule described under Multiple templates: scoping and
fan-out — and with zero or one loaded
it may be omitted. All refuse cleanly when no report is loaded.
The sections are verdict, comment, people, update, install, issues,
new_issues, testing and review; review is absent from a PI report, and
new_issues from a report whose teregen predates it. Reads never change
the report.
report_sections (read-only)
- Parameters:
template(optional). - Returns
{ "id", "dirty", "sections": [{"name","size","has_unanswered"}], "complete", "unfilled": [...] }.sizeis the byte length of the section’s compact JSON (advisory).unfilledholds the RFC 6901 pointer of everynullleaf in the whole document, in sorted key order, leaving out tester-filed (new: true) issues, which start out unanswered by design;completeis true when there is none.dirtyis true while edits awaitcommit.
report_section_read (read-only)
- Parameters (required):
section. Plus optionaltemplate. - Returns
{ "id", "section", "data" }. A section the report lacks refuses.
report_section_write
Replaces one tester section with value.
- Parameters (required):
section(verdict,comment,people,issues,new_issues,testingorreview),value(declared as an object, array or string). Plus optionaltemplate. A string holding a JSON object or array is decoded for every section exceptverdictandcomment, whose strings are always taken literally. Any other string for those sections is refused without echoing it: one that is not valid JSON names the parse error and its position (trailing characters at line 1 column 572), and one holding a JSON scalar names its kind. - No string sets
verdictorcommentback to unanswered:"null"is not a verdict and is refused, and"null"or""is stored as the comment’s text. Usereport_section_clearfor that. A JSONnullvalueis still accepted for these two, but the declared schema has no null arm, so a client that builds its call from the schema cannot send one. updateandinstallare pipeline-owned and refused. A section the report lacks refuses. Anissueswrite must keep exactly the same issue keys; usereport_issue_writefor one entry. Anew_issueswrite replaces the whole list of tester-filed bugs ([{"id","title","comment"?}]); an id that clashes with a pipeline issue or repeats is refused.- The whole candidate document is re-parsed against the typed schema, and a
value carrying a key the schema would drop (an unknown key in a closed
object, or
nullon an optional field) is refused. A refusal lists the offending pointers and leaves the report untouched. String patterns and array minimums are not checked locally, so the server can still refuse atcommit. - A write changes local state only and marks the report dirty;
commituploads it. A laterexportoverwrites the checks intesting.install(with-t, only the selected hosts’ rows),testing.openqaandpeople.testers. - Returns
{ "id", "section", "dirty": true, "size" }. - To set one field without sending the rest of its section back, such as
testing.regression.commentnext to the check rowsexportwrote, usereport_field_write.
report_section_clear
Sets verdict or comment back to unanswered (null), so report_sections
lists it in unfilled again.
- Parameters (required):
section(verdictorcomment). Plus optionaltemplate. It takes novalue. - Any other section is refused, as none of them can be unanswered as a whole.
A
nullinside one, such astesting.regression.verdict, is written withreport_section_write. - Applied to local state like
report_section_write: it marks the report dirty, andcommituploads it. - Returns
{ "id", "section", "dirty": true, "size" }.
report_field_write
Sets one field of the report document, addressed by its RFC 6901 pointer as
report_sections lists it under unfilled, and keeps the rest of its section
as it is. A product increment’s testing.install.checks can run to tens of
kilobytes; this tool never sends them.
report_field_write pointer=/testing/regression/comment value="zypper ps clean"
report_field_write pointer=/testing/install/verdict value="PASSED"
report_field_write pointer=/testing/install/checks/1/verdict value="PASSED"
- Parameters (required):
pointer,value(declared as a string or a boolean). Plus optionaltemplate.valuereplaces the field as given: a string is stored literally, so"null"or"{}"is text, and a JSONnullclears the field back to unanswered, but the declared schema has no null arm, so a client that builds its call from the schema cannot send one: such a client clears a nested field withreport_section_write, where thenulltravels inside the section’s value, andverdictorcommentwithreport_section_clear. A yes/no field, such as/issues/<key>/reproduceror/review/build_log/test_suite_passed, takestrueorfalse. - Only the fields the REPL report editor (
edit) lets a tester change are accepted, from one shared list:verdict,comment,people.reviewer.name, an issue’sreproducer/status/comment, a tester-filed bug’stitle/commentundernew_issues, theverdictandcommentoftesting.installandtesting.regression, a check row’sverdict, and thereviewanswers and comments. Anything else is refused as read-only, notably a check row’srefhost,beforeandafter, and all oftesting.openqa: those areexport’s. The nextexportrewrites every covered host’s check row, itsverdictincluded. When the report has anew_issueslist, a tester-filed bug is changed there, not underissues. A pointer to an object or list that holds such fields, such as/testing/regression, is refused as not a field. - A pointer under an absent
testing.regressioncreates it with its keysnull, then sets the field. An absenttesting.installcannot be created this way, as itscheckscome fromexport. - The changed section goes through the same validation as
report_section_write, and the write likewise changes local state only and marks the report dirty;commituploads it. - Returns
{ "id", "pointer", "section", "dirty": true }.
report_issue_read (read-only)
- Parameters (all optional):
issue_id(such asbsc#1234567),template. - Without
issue_id, returns{ "id", "issues": [{"id","title","status", "severity","new"}] }, wherenewistruefor a bug a tester filed andnullotherwise; with it,{ "id", "issue_id", "issue" }.
report_issue_write
Replaces one existing issue with value; the set of issues cannot grow or
shrink. Validated and applied exactly like report_section_write. value is
declared as an object; a string holding a JSON object is decoded.
- Parameters (required):
issue_id,value. Plus optionaltemplate. - Returns
{ "id", "issue_id", "dirty": true }.
report_new_issue_write
Files a bug found while testing, or updates one already filed. teregen keeps
such a bug as an issue with new: true, so it also shows in report_issue_read.
- Parameters (required):
issue_id(bsc#…,bnc#…,boo#…,jsc#…orijsc#…),title. Optional:comment,template. - An existing tester-filed bug gets the new
title/commentand keeps its reproducer and status (answer those withreport_issue_write); an emptycommentclears it. A pipeline issue is refused. - Applied to local state like
report_issue_write;commituploads it. - Returns
{ "id", "issue_id", "dirty": true }.
report_new_issue_delete
Removes a bug filed with report_new_issue_write.
- Parameters (required):
issue_id. Plus optionaltemplate. - A pipeline issue, or an id the report does not have, is refused.
- Returns
{ "id", "issue_id", "dirty": true }.
report_files (read-only)
Lists the report directory’s files — build_checks/, the install_logs
directory, results/ and checkers.log — matched with the files teregen holds for the
report, by name and server directory.
- Parameters:
template(optional). - Returns
{ "id", "files": [{"path","name","size","server"}], "server_only": [{"name","dir","path","origin","size","at"}] }, plus"server_error"when the server listing failed.filesare the local regular files, sorted bypath(report-directory-relative; subdirectories and symlinks are skipped).serveris{ "dir", "origin", "size", "at" }for the server copyreport_file_readwould read for that path (originispipelineoruploaded;dirisuploads,install_logsorbuild_checks,nullfrom a server that does not say), ornullwhen it has none; sizes differ untilcommituploads.server_onlylists server files with no local copy, one perdirwhen several directories hold the same name.pathis the pathreport_file_readreads that copy from, ornullwhen no path does: a same-named copy inuploadsis read in place of theinstall_logsone, and a copy whosediris missing or is notbuild_checks,install_logsoruploads, or whose name is not a plain file name, cannot be read on its own. - A failed server listing (not found, still generating, unreachable) never
fails the call: the local list is returned with
server_errorset.
report_file_read (read-only)
Reads one of those files as text.
-
Parameters (required):
path, relative to the report directory — eithercheckers.logor a file directly insidebuild_checks/, theinstall_logsdirectory orresults/. Optional:offset(1-based first line, default 1),limit(maximum lines),template. -
Returns
{ "id", "path", "total_lines", "content" }; a windowed read also carriesoffsetandreturned_lines.contentis bounded by[mcp] max_output_bytes, and the read stops at[mcp] max_input_bytes(0disables the cap), cutting a line that crosses it. A capped read ends with a notice, andtotal_linesthen counts only the lines read up to the cap; the size of the unread rest is unknown. -
A file the report directory lacks is read from the server instead, and the result then carries
"source": "server"(a local read has nosourcekey). The listing decides where the file is: mtui takes the first of these server directories that lists the file’s name.Local path Server directories, in order build_checks/<name>build_checks<install_logs>/<name>uploads, theninstall_logsresults/<name>uploadscheckers.loguploadsThe tester’s committed copy in
uploadswins over the pipeline’sinstall_logsfile of the same name. With[mcp] max_input_bytesset, mtui sendsRange: bytes=0-<cap>and so fetches at most one byte past the cap, which makes the usual capped-read notice appear; with0the whole file is fetched. The fetch is anonymous, like the listing. -
Refuses a path that escapes the report directory (
.., an absolute path, a symlink out), one outside the readable set, and a file that is neither local nor listed by the server. A server that lists the file but does not tag it with a directory (a teregen without artifact download) is refused with a message saying so; a report that is still generating is refused with a retry hint.
A result larger than [mcp] max_output_bytes comes back as { "truncated": true, "size", "content" }, where content is the capped JSON text, rather than
as clipped (invalid) JSON.
Published report tools
Three hand-written read-only tools read TeReGen’s published copy of a report
by rrid, with nothing loaded: a status table over several updates, a
second tester reviewing a colleague’s report, a look before picking an update
up. They never touch the loaded templates, the active template or a host, and
send only anonymous GET requests to [url] teregen_api_v2. An rrid is
refused before any request unless it parses and its maintenance component is
letters, digits, ., _ and - only; a short spelling (S:M:…) reads the
canonical id, which every result carries as rrid.
Every result also carries "source": "published". When this session has the
same update loaded with report-document edits not yet uploaded by commit, it
adds a note saying the published copy does not include them (or, when the
loaded report is busy, that this is unknown); local files not yet uploaded are
not tracked. A client cancel stops the call at its next request. Each call
briefly locks the session to read its config and that flag, so a call that
holds the session exclusively (a fan-out update, load_template,
add_host with nothing loaded) delays it until it ends. These tools take no
registry gate. Short server strings (id, kind,
workflow, generated_at, a file’s name and dir) come back as one printable line, as error text does;
section data and file content are returned as stored and may contain
control characters, exactly as report_section_read and report_file_read
return the loaded copy’s.
published_report (read-only)
- Parameters:
rrid(required),section(optional, one of the section names above). - Without
section, returns{ "rrid", "published": true, "id", "kind", "workflow", "generated_at", "sections": [{"name","size","has_unanswered"}], "complete", "unfilled": [...] }, the fields asreport_sectionsgives them (there is nodirty). With it,{ "rrid", "published": true, "id", "section", "data" }; a section the report lacks is refused. - TeReGen’s 404 on the document is an answer, not an error:
{ "rrid", "published": false, "message": "No report is published for <RRID>" }. Every other outcome is an error naming its cause: still generating, committing an earlier upload, stale, the id rejected, a transport failure or other status, a body that is not a report document (or a schema version this mtui does not read), or a document filed under another id.
published_files (read-only)
- Parameters:
rrid(required). - Returns
{ "rrid", "source", "count", "files": [{"name","dir","path","origin","size","at"}] }in the server’s order.pathis whatpublished_file_readreads the file from, by the table underreport_file_read; it is null when a same-named copy in a preferred directory answers every such path, thediris missing or not one ofbuild_checks,install_logsanduploads, or the name is not a plain, printable file name. A failed listing is an error, never an empty list; whether a 404 here means no report is published is not established, so it is an error naming the 404.
published_file_read (read-only)
- Parameters (required):
rrid,path(checkers.log, or one plain file name directly underbuild_checks/, theinstall_logsdirectory orresults/). Optional:offset,limit, as forreport_file_read. - Returns
{ "rrid", "source", "path", "dir", "total_lines", "content" }, plusoffsetandreturned_linesfor a window. The path rules, the server directories, the byte caps and the decoding arereport_file_read’s: the fetch asks for one byte past[mcp] max_input_bytesand ends a cut read with the same notice, andcontentis cut so the whole result fits[mcp] max_output_byteswith every other field kept. - Only a name the server’s listing holds is fetched; any other path is refused
after the listing and before any file request. A path with
.,.., an empty or absolute component, or outside the readable set is refused before any request. A file listed without adiris refused with a message saying so. - An empty file has
"total_lines": 0,"empty": trueand amessagesaying it is empty. Bytes are decoded as lossy UTF-8, asreport_file_readdecodes them.
Like the report document tools, a published_report or published_files
result larger than [mcp] max_output_bytes comes back as { "truncated": true, "size", "content" }.
Background jobs
Long-running commands run as background jobs so a tool call returns promptly with
a job id you can poll. The slow host commands — run, check_hosts, update,
downgrade, prepare, install, uninstall, set_repo, reboot, regenerate,
add_host, load_template and request_review — accept a background=true parameter. Instead of
holding the request open for the minutes the operation takes, the call returns
immediately with the job id(s); when the command fans out across several
templates it mints one job per template, each independently pollable and
cancellable.
add_host and load_template -a connect to a whole batch of reference hosts, and
one unreachable candidate among them can hold the call open far past any client’s
patience — backgrounding is the only way to keep such a call cancellable via
job_cancel.
Four job-control tools manage them:
job_list(read-only) — every job in the session and its state.job_status(job_id, wait_seconds=0)(read-only) — one job’s state (running/done/failed/cancelled) and elapsed time;wait_secondsblocks for a terminal state first.job_result(job_id, wait_seconds=0)(read-only) — a finished job’s captured output; it errors while the job is still running (or wait for it withwait_seconds) and surfaces the command’s failure envelope if it failed.job_cancel(job_id)— cancel a running job. (A command already executing on a host may run to completion there even after cancel returns — the same caveat as Ctrl-C on a foregroundrun.) Two commands treat a cancel as a normal ending rather than a failure:request_review --watchstops watching (the request stays posted) andregeneratestops waiting (the server keeps building). Both return success, so their job endsdone, notcancelled, with the reply text saying what was and was not finished. That coversregenerate’s wait only: a cancel while it reloads the finished report ends the jobcancelled, as does a cancel whileload_templatewaits for TeReGen.
wait_seconds (0-120, default 0) turns a poll loop into one held request:
job_status and job_result park until the job is terminal or the budget
lapses, then reply exactly as a plain poll would — the running snapshot, the
output, or a “still running” error that now points at wait_seconds. Keep it
under the client’s own request timeout; a value above 120 is refused, not
clamped. While parked the call emits progress heartbeats if the client supplied
a progressToken, and a notifications/cancelled interrupts it. Over HTTP rmcp
additionally pings the per-request SSE stream every 15s; a client that silently
disconnects instead leaves the wait to run out its budget server-side, holding
nothing.
A job blocked mid host-operation cannot stop at a checkpoint, so cancelling it
force-aborts the dispatch — which skips the operation’s own unlock(). A forced
cancel therefore releases /var/lock/mtui.lock on the job’s behalf and reports
the outcome in its reply.
What it releases is deliberately narrow: only the locks the cancelled job’s own
host group actually took, and never a comment-marked (exclusive) hold such as a
Product Increment assignment lock or an operator’s lock -c <text> reservation.
Locks are owned per user + PID on the wire, so a broader sweep would remove a
sibling template’s — or another MCP session’s — live hold on a shared refhost and
report it as released.
The reply distinguishes: which hosts are now unlocked; which are still locked and
by whom (check with list_locks; unlock --force releases the whole group of
every loaded template); which release failed (check with list_locks and retry
unlock once the host is reachable); and which
templates could not be reached inside the release budget, whose lock state is
therefore unknown. A cancel with no held lock to act on says nothing extra.
The release covers the templates the job’s dispatch resolved once it held its
lock, so a job that ran on one template leaves the others alone; a job cancelled
before it got that far uses the scope recorded when it was minted. A dispatch
run with nothing loaded releases only the hosts added with add_host, even if a
template was loaded since. One that resolved no template at all — a
session-level command — falls back to every loaded template and the hosts added
with add_host, the conservative reading for a dispatch that may have run
across all of them.
Nothing else is done at the hosts. The remote command may still be running there;
where it is a package transaction, the package manager’s own system-wide lock
keeps serialising it, but a run or reboot has no such second layer and the
release is purely mtui-side bookkeeping.
A cooperative cancel — a body that unwound at a checkpoint — is unchanged: it ran its own unlock discipline, and the cancel does not second-guess it.
Jobs are scoped to the session (under HTTP, the caller’s isolated session, so one
client never sees another’s jobs). The per-session job budget
(max_active_jobs, max_completed_jobs) and the single-result size cap
(max_output_bytes) bound resource use so one client cannot exhaust the server or
dwarf the client’s context.
Audit log
mtui-mcp executes consequential actions with nobody watching, so a configured
server keeps a durable record of what ran. Set [mcp] audit_log to a file
path; unset (the default) disables auditing and leaves behaviour byte-identical.
The sink is versioned JSONL, one object per line, opened O_APPEND with mode
0600 and fsynced before the response returns — entries survive a server
restart and are never truncated. The open is O_NOFOLLOW and the resulting
descriptor is vetted: anything that is not a regular file owned by the serving
user is refused, so a planted symlink or FIFO cannot divert the append (or the
0600 tightening) onto another file. O_NOFOLLOW covers the path’s final
component only — the sink’s directory must be writable by the serving user
alone. A same-user hardlink is allowed on purpose; it crosses no boundary.
The record is durable and append-only but not tamper-evident: there is no
hash chain and no HMAC, so anyone writing as the owner can rewrite history
undetected. Tamper evidence means shipping each record off-host as it lands —
see OTLP log export. Every record carries principal: null, reserved for a future authenticated caller identity (#412): under
HTTP every client acts with the server’s credentials, so records attribute
to a session, never a person, and nothing client-declared (a header, a tool
argument, an initialize client name) may ever populate it. An outcome
record carries the schema version, the arrival timestamp, the sequence
number, the session id, the transport, the reserved principal, the tool
name, the (redacted, see below) arguments, the outcome (ok / error /
unknown-tool), the duration, and the RRIDs and host names the call
resolved to. An intent record carries the same header and the same
arguments, and nothing that only exists afterwards. A terminal record
carries no arguments at all.
With no template loaded, a call that acts on a report, such as run, lock or
put, names the hosts added with add_host, and its rrids stay empty. A call
that addresses no template (whoami, the job tools) names no host. The scope is
the one the call ran under, so a call that waited for a load_template names
the template it then ran on.
Host names on a record are best-effort: they are empty when the session is
busy with an exclusive background job (a backgrounded load_template or
add_host), because a record write never waits on the work it
records; rrids are always recorded.
[mcp] audit_log_max_bytes (default 256 MiB) bounds the sink: the first
open that finds the file at or over the cap rotates it to <path>.1, shifting
.1….4 down one and discarding what was .5. That is usually an append, but
the start-up probe opens the sink the same way, so a server can rotate before it
answers anything. Archiving beyond .5 is the operator’s job. 0 disables rotation altogether; any other value below 4096 is
raised to it with a warning, because a cap under one record’s worth rotates the
trail away.
Rotation is housekeeping and never a gate: it neither blocks the dispatch worker
nor refuses a call. Two servers may share one path, so it is serialised by an
advisory lock on the file itself — taken without waiting. A writer that finds
the lock held, or a filesystem that cannot take it at all (an NFS export without
lockd answers ENOLCK), appends past the cap and rotates on a later call. A
rename it cannot perform warns and keeps appending too, and that warning is not
repeated until a rotation succeeds. Two consequences worth knowing when reading
the files back: a writer that opened the sink just under the cap lands its line
in <path>.1, so seq is monotonic overall but the order across the boundary
file is not; and on NFS, Linux emulates flock with per-process POSIX locks, so
two HTTP sessions in one process do not serialise there — at worst a second
shift, never a refused call.
A tool that is not advertised readOnlyHint writes an intent record
before it runs — schema version, arrival timestamp, sequence number, session,
transport, reserved principal: null (see Audit log),
event: "intent", tool, (redacted) arguments, and the trace correlation
when the client supplied one. The bounded vendor tracestate rides alongside
when it validates (1..=512 bytes, key=value members, at most 32; keys at
most 256 characters — tenant 241, system 14 — values at most 256); malformed
or oversized values are dropped, never stored. Nothing else, because nothing
else exists yet. Its outcome record then carries intent: <seq>, and its
duration_ms — measured from arrival, like ts — includes the intent record’s
own write. Read-only tools skip the intent and write only the outcome record, so
a poll loop still costs one record per call.
Both fields are an untrusted correlation key only: whatever the client sent, never an identity or an authorisation, reaching no shell and changing no dispatch or output byte — the same call with and without them answers identically, and the records differ only by those fields.
A backgrounded call therefore writes three records: the intent, a dispatch
record naming the started job_ids, and a terminal record when the job reaches
done / failed / cancelled, joinable by job id. The terminal record carries
no arguments and no intent — it joins its dispatch by job_id, which also
matters because a terminal record’s seq is not ordered against the calls
around it in either direction: neither against its own dispatch record, since
a job that settles at once can be minted first, nor against a
job_result(wait_seconds) reply that waited for it. Join by job_id, never by
seq. The terminal record also carries no trace context: the job outlives
the call whose _meta supplied it.
A configured sink is probed once at start-up, before the OTLP probe: if it cannot be opened the server refuses to start and names the path on stderr, rather than loading quietly and failing on the first tool call.
Afterwards the sink fails in two different ways, on purpose. If the intent
write fails the call is refused and nothing ran — the guarantee the sink
exists to make. If the outcome write fails the work has already happened, so
the executed result is still returned with
[audit: outcome record lost (<reason>)] appended — as a trailing text block on
a successful reply, or to the message of an error one. Discarding a result to
report a logging failure would tell the client a refusal that never happened.
The notice is always the last content block, so content[0] stays the
verbatim payload a --json caller parses, and it is not counted in the record’s
response_bytes. A failed terminal write can only warn — its dispatch already
answered.
Reading the log back: an intent that no later record points at means “started,
outcome not recorded” — a crash or a kill, or a lost outcome write whose client
was told in band (and which the OTLP stream may still hold).
A put that uploaded a source file adds upload: {path, bytes, sha256} to
its outcome record (the resolved path and a fingerprint, never the body). The
intent record already holds the requested path in args.source; a call that
failed on some host has no upload.
No tool argument carrying a credential in bulk lands verbatim. File-body
payloads (put content/content_b64,
report_section_write/report_issue_write/report_field_write value,
report_new_issue_write title/comment) each record
{bytes, sha256} over the original string, so a
credentials file or SSH key uploaded via put stays correlatable without being
persisted. Always fingerprinted, never inline, regardless of size — the same
redaction feeds the file body, the OTLP body, and the size accounting, and no
payload key is ever an indexed OTLP attribute.
Everything else is masked, not trusted. Every recorded string, at any
nesting — run and comment argv included — runs through a token scanner that
strips URL userinfo (and only that: every other byte of a URL is kept, since
the record is of what ran) and
replaces the value of a secret-named flag or key: --password secret,
DB_PASSWORD=…, x-api-key: …, Authorization: Bearer …,
Authorization: token … and '{"password":"…"}' all record <redacted>,
through the quoting a shell line or a JSON payload wraps them in, while
token_bucket=50, max_tokens=100, grep token file and ssh -p 22 host are
left legible. Bearer, Basic and token keep their place in front of the
credential they name — but only after a key that is itself a credential name,
so Basic functionality verified stays a sentence.
The scanner keys on the name beside the value, so what it does not catch is
worth knowing rather than discovering: a bare secret with no key beside it; a
single-letter flag, whose meaning is per-program (sshpass -p secret,
curl -u user:pass, psql -U user); a value attached to one (-pSECRET,
-U user%pass); and anything passed by environment variable, stdin or a file
the tool reads.
All file I/O runs on the blocking pool (spawn_blocking), so a down or slow
disk never stalls the dispatch worker or the other calls it is serving — the
one call that waits is the one whose own records are being written.
OTLP log export
The same record can also go to an OpenTelemetry collector as OTLP/HTTP LOGS
(hand-rolled protobuf over the workspace reqwest/rustls stack — no
opentelemetry-* crates): one log record per audit event, body = the verbatim
JSONL line (already redacted and fingerprinted as above). Configuration is env-only (headers must never be CLI flags), so
there are no new TOML keys:
OTEL_EXPORTER_OTLP_ENDPOINT(base URL, gains/v1/logs) orOTEL_EXPORTER_OTLP_LOGS_ENDPOINT(full URL, wins verbatim). Unset-or-empty disables export, as does an invalid endpoint or a non-http/protobufprotocol (validated only when an endpoint exists).OTEL_EXPORTER_OTLP_HEADERS/OTEL_EXPORTER_OTLP_LOGS_HEADERS(key=value,..., values percent-decoded; logs-specific wins).OTEL_EXPORTER_OTLP_PROTOCOL/OTEL_EXPORTER_OTLP_LOGS_PROTOCOL: onlyhttp/protobufor unset.OTEL_SERVICE_NAME(defaultmtui): resourceservice.name, the multi-deployment join key.
Sink matrix: file-only (audit_log set, no endpoint), OTLP-only (endpoint set,
audit_log unset — the JSONL line is still built in memory and used verbatim),
both (file first in seq order, then OTLP), neither (auditing off, dispatch
byte-identical).
Each record carries closed mtui.* attributes (tool, event, seq,
transport, session.id, plus outcome when there is one, response_bytes
when sized, and allowlisted kwarg keys) and the W3C trace ids when the client supplied a strict lowercase
55-byte traceparent via _meta (also echoed as the record’s trace field;
session.id stays server-minted). A valid tracestate rides the verbatim
JSONL body as the record’s tracestate field but is never an indexed
attribute. A startup probe posts one real diagnostics
record (~5x500 ms) before serving and latches export health; failed batches
merge into a pending audit_gap sent on recovery. Batching: 2048/stream cap,
512/batch, 500 ms interval, 10 s request timeout, 5 s shutdown flush, redirects
off, [mtui] ssl_verify TLS posture.
Export never gates a tool call. The health latch decides whether a record is
enqueued, nothing more: an unhealthy or full exporter logs a warning, merges the
record’s seq into the audit_gap it will report on recovery, and the call
still runs and still answers. The file sink stays the durable truth, so
OTLP-only mode never refuses anything. Tracing diagnostics ride a separate
best-effort queue (drop + counter; exporter/HTTP-stack targets excluded). The
endpoint value never appears in logs, records, or errors.
Shipping the audit log
The file sink above is the durable truth, but it is local and — as noted —
not tamper-evident. To get records off-host, into a SIEM, a log store, or any
OpenTelemetry backend, tail the JSONL file with a collector’s filelog
receiver. A minimal OpenTelemetry Collector Contrib setup lives in
dist/otel-collector.yaml.example (tested with otelcol-contrib 0.164.0):
- Receiver: filelog over
[mcp] audit_log.includethe audit path (plus<path>.1…<path>.5if the rotated generations should ship too),start_at: endso a first start tails only new lines instead of re-shipping history,storage: file_storageso a restart resumes from its checkpoint (no re-ship, no gap), and ajson_parseroperator so each JSON line lands as attributes — queryabletool,event,outcome,seq,transport,session,args, … (the record’s own field names; the full line stays in the body too) — not one opaque message blob. Which fields exist depends on the event:intenthas nooutcome;terminalhas noargsand carriesjob_id/job_stateinstead. - Rotation stays mtui’s job. The sink rotates by size-cap shift (
<path>→<path>.1,.1….4down one, what was.5discarded) under an advisory lock the collector never takes part in; the receiver tracks each file by fingerprint across the rename. Never point acopytruncate-style rotation at the sink — mtui only ever appends and renames, and an operator-side truncate would lose or duplicate lines. Archiving beyond.5is yours to arrange (ship-then-delete, or move aside before the next shift discards it). - Permissions: same-user sidecar. The sink is
0600owned by the serving user — created that way and re-tightened on every open, so a looser mode never survives the next write and no supplementary-group arrangement sticks. Run the collector as that same user, typically a same-user sidecar. Nevero+r, never0644: the record names consequential actions, and group/other write must stay off regardless, since the sink vetting refuses anything not owned by the serving user and a writable-by-others directory already voids the symlink/FIFO guarantee above. - Sensitivity: the file names consequential things. Every
callanddispatchrecord carries the tool name, the outcome, the RRIDs and best-effort host names the call resolved to, and the redacted arguments (secrets masked, file bodies fingerprinted as{bytes, sha256}— see above). Anintentrecord carries the same header and arguments but no outcome; aterminalrecord carries no arguments, only the tool, session, transport, duration, RRIDs and host names, the job id, its terminal state, and the outcome. Anyone who can read the shipped stream learns which hosts were acted on and how the calls ended. The example’sdebugexporter prints each shipped record — redacted arguments and host names included — to the collector’s stdout, so keep that output (journals, container logs) to the same audience. Treat the collector endpoint, its storage, and its headers/tokens with the same care as the hosts themselves. - Correlation: the
tracefield joins caller spans — when populated. A line withouttracestill ships, so never filter on its presence; records name a session, never a person. See Audit log for the field rules.
Cancelling a foreground call
A client that sends an explicit notifications/cancelled for an in-flight
foreground tool call drops the dispatch and releases the CommandLock it was
holding — a follow-up call on the same RRID is not left queued behind it. What
happens next depends on whether the call could be holding a host operation
lock.
A report_* tool, a transfer tool (get/put) or a parked
job_status/job_result wait never dispatches through the engine, so it cannot
hold /var/lock/mtui.lock: the cancel drops the dispatch immediately and the
tool call resolves to an error rather than a fabricated success.
A synthesised command tool (run, update, install, …) can be mid
host-operation when the cancel arrives, and dropping it outright would strand
that lock exactly as an unhandled job_cancel would. It instead runs the same
two-stage sequence job_cancel uses: the dispatch’s own cancellation token is
signalled first, giving it a short grace period to unwind at a checkpoint (a
body that does — for example one already watching the session’s cancel
token — returns its own verdict, success or failure, not a synthetic
cancellation error). Only if the grace elapses is the dispatch force-aborted;
the abort then best-effort releases /var/lock/mtui.lock on every host the
call’s own group actually took (never a comment-marked reservation) and the
error text names what it unlocked, what is still locked and by whom, and
what could not be reached inside the release budget.
This only helps a client that sends the notification. mtui-mcp’s default
transport is stdio, where there is no per-request connection to drop — a
client that simply stops waiting (e.g. because it hit its own timeout) sends
nothing, and the server has no way to learn the caller gave up. In that case
the lock is still released, just on the ordinary schedule: the connect_timeout
budget and the shared backup-retry budget bound how long that takes
rather than leaving it unbounded. Backgrounding a slow command
(background=true, see above) plus job_cancel remains the reliable way to
recover a stuck call regardless of transport.
Long-running calls: progress heartbeats
Many commands legitimately take minutes (a run against a slow refhost, an
update, a checkout). To keep MCP clients from timing out, mtui-mcp
emits notifications/progress while a slow tool runs — for both synthesised
command tools and the hand-written tools — provided the client supplied a
progressToken on the request. Spec-compliant clients (Claude Desktop, opencode,
the MCP Inspector, Cursor, …) reset their read deadline on each frame, so a
ten-minute command still returns cleanly. Clients that ignore progress
notifications should raise their own per-server read timeout instead. The
job-control tools emit them only while parked on wait_seconds.
Connecting a client
mtui-mcp speaks standard MCP framing. A stdio client spawns the binary as a
subprocess; an HTTP client connects to http://HOST:PORT/mcp.
Claude Desktop (stdio) — in claude_desktop_config.json:
{
"mcpServers": {
"mtui": { "command": "mtui-mcp", "args": ["--transport", "stdio"] }
}
}
opencode (remote HTTP) — start mtui-mcp --transport http --port 8765, then in
opencode.json:
{
"mcp": {
"mtui": { "type": "remote", "url": "http://127.0.0.1:8765/mcp", "enabled": true }
}
}
opencode also accepts "type": "local" with "command": ["mtui-mcp", "--transport", "stdio"] to spawn it per-session instead.