MCP server
epitrop-server serves the run record over the Model Context Protocol on stdin and stdout, for a client that starts it as a subprocess. By default its tools only read, and no tool appends to the event log or signals a job:
jobs_statuslists the configured jobs asepitropctl jobs statusdoes, includingstaleandlast_beatfor a job that declaresheartbeat.max_age_seconds. On a platform without the supervisor (anything but Linux) the tool returns the reason as a tool error.units_listlists the work units of the run record, sorted by id, optionally narrowed to one status.unit_statusshows one unit asepitropctl units showdoes, with the count of unread notes in place of the notes. Reading does not mark a note read.runs_listlists the slot runs, one per unit whose evidence pointer names a run's start file (started) or report (ended), sorted by unit id, optionally narrowed to one phase.run_statusshows one unit's slot run: the start record while it runs, the runner's report once it has ended. A report whose digest does not match the unit's evidence pointer is refused.watches_listlists the release watch routes ofrelease_watch.routeswith their sources and sink kinds.watch_statusshows one route: per source, how many releases the seen-set holds and the one seen last, and its sinks. An ntfy sink shows only its kind, since its topic is all a reader needs to read the notifications.
With server.transport: http in the config, the server serves the same tools over streamable HTTP on server.listen (default 127.0.0.1:8899) and prints the address it serves. The server has no authentication, so the config refuses a listen address whose host is not loopback, and the server refuses a request whose Host header names another host. Beside the tools at /mcp it serves:
/livez,/readyzand/startupz./readyzanswers 503 until the event log has replayed, and again whenever a replay fails; the server replays every two seconds./events, a server-sent event stream with one event per signed event-log record (id= record sequence number decimal,event= record type,data= record JSON). A client can resume the stream with aLast-Event-IDheader; an empty header streams live events from the current tail position, an unstarted tail or missing events source answers 503, a malformed header or a cursor ahead of the tail answers 400, and a cursor below the base of a compacted log answers 410. A stalled client is dropped after a 10-second write deadline, and a client whose queue fills holds back the tail for other subscribers until dropped.
With server.allow_mutations: true the server also serves three tools that change state:
jobs_startstarts one configured job and leaves a running job alone;jobs_stopstops one with its stop signal, the grace period and then a kill. The supervisor starts the job shim asepitrop-serveritself.unit_setrecords a unit's status, under the same transition rules asepitropctl units record.
Each call names a key for the request. The effect ledger runs a key with the same arguments at most once: a repeat answers skipped and changes nothing, and the same key with other arguments is a new request. A call that failed leaves its key open, and a repeat is refused until the claim is resolved with epitropctl effects resolve.
The tool names and config keys are fixed; the HTTP paths stay provisional until the first release that ships the server.