Every configuration write goes through one engine:
confirm=false): returns before, after, diff, warnings, errors, used_by, the request that
would be sent, a fingerprint and, if applying would be refused, apply_blocked_reason. Previews are always allowed.confirm=true with the fingerprint): the object is re-read; if it changed since the preview the write is
refused. The attempt is written to the journal before anything is sent.verified, lists any mismatches, shows the diff, and
gives the exact rollback call. Nothing is retried automatically.UNIFI_CONSOLE_ENABLE_WRITES=true in the server’s own environment.UNIFI_CONSOLE_WRITE_ENTITIES (default: none).confirm=true with the matching fingerprint.approval_note, stored in the journal.Tiers: A reversible, local effect. B changes how traffic or names resolve for several clients, or diagnostic settings. C can cut connectivity or expose the network.
rest/* endpoints: send only the changed fields (arrays are replaced whole, so member helpers compute the
full array).port_overrides): read, change, send the whole object.set/setting/<key>): send the whole group.~/.unifi-console-mcp/journal/YYYY-MM.jsonl, two lines per write (attempt, then result). If the journal
cannot be written, nothing is sent. Secret fields are redacted, so a rollback never restores a secret.before, delete what was created, or recreate what was
deleted.Unit tests run against an in-memory fake console that reproduces known console behaviour (for example rejecting a PUT
that omits a required key). Live checks touch only throwaway zz- objects, or one nominated client restored afterwards.