Acta MCP Server: Build Specification
Status: build specification, December 2026. Companion to PROPOSAL.md, which carries the design and its reasons. This document carries the construction: what the server is, piece by piece, and the order it is built in.
Purpose
Acta's installable form is an MCP server. Any agent that speaks MCP (Claude Code, Claude, other vendors' agents) connects to it and coordinates with the rest of its team through one store, changed only by named transitions, with effects subscribed to slices of state. The server enforces the discipline, so the discipline no longer depends on the virtue of the operators.
Thesis, unchanged: coordination is a function of the state, when the components interpret.
Architecture
One server process owns the store. State is divided into named slices. Every write is a transition: a named, validated operation applied through a single commit queue, appended to an append-only log, and assigned the next state version. After each commit, the effects subscribed to the changed slices run, once per version. There is no other write path.
The store
- Slices are declared in configuration: a name, a JSON schema for its content, and its initial value.
- The store is a single file (JSONL log plus snapshot) in v0; SQLite is the named successor when a real workload asks for it. One writer: the server process. The single commit point is literal, not a metaphor.
Transitions
- A transition is declared with: a name, the slice it writes, an input schema, the seats allowed to call it, and an optional guard (a precondition over the current slice value).
- Through MCP, each transition is exposed as a tool. Calling the tool proposes the transition: the server validates the seat, the schema and the guard, then serializes it through the commit queue. A rejected call returns the reason as data, never a silent failure.
- Every committed transition is a log record:
{ seq, version, at, seat, transition, slice, payload, baseVersion }.
Reads
- Slices are exposed as MCP resources (
acta://state/<slice>), each read stamped with the state version it reflects. An agent never asks another agent how things are; it reads the slice.
Effects
- An effect is declared server-side, in the server's configuration code, not over MCP: the slice it reads, the work it depends on (named beside the work, per the proposal), and its handler.
- Execution semantics: after commit, once per state version, over at-least-once delivery, with the idempotency key
(effect, version). An effect's output is itself a transition, called through the same commit path. An effect's failure is a transition too: the failure enters the state, where other effects and seats can see it. - Effects run in the server process in v0 (handlers are local modules). Remote effects are an open question in PROPOSAL.md, not a v0 feature.
Deadlines
- A transition may carry a deadline registration: at commit time, the server records a deadline (an instant and the transition to write if it passes unfulfilled). When the instant passes, the server itself commits the expiry transition. An absence becomes a fact in the state, with its own transition, never a silence that a poller must interpret.
Seats
- A seat is a named caller identity with a manifest: the transitions it may emit and the slices it may read. Each seat authenticates with its own token; the server refuses calls outside the manifest.
- A human is a seat like any other, with one declared difference: a human seat's work has no bounded execution time, so work waiting on a human is a state with its own deadline, never an invisible wait.
The log and replay
- The log is append-only. A CLI (
acta replay) folds the log from any snapshot and prints the state at any version, for audit and for debugging a team after the fact. acta inspectprints the current version, the slices, the registered transitions, effects and seats, and the last N log records.
Configuration shape (code-first, TypeScript)
import { defineActa } from "@acta/server";
export default defineActa({
slices: {
queue: { schema: QueueState, initial: { fronts: [] } },
pulse: { schema: PulseState, initial: {} },
},
transitions: {
deposit: { slice: "queue", seats: ["builder"], input: DepositInput },
land: { slice: "queue", seats: ["coordinator"], input: LandInput },
stop: { slice: "pulse", seats: ["watcher", "coordinator"], input: StopInput },
},
effects: [
{ reads: "queue", after: ["deposit"], run: verifyDeposit },
],
seats: {
builder: { token: env("ACTA_SEAT_BUILDER") },
coordinator: { token: env("ACTA_SEAT_COORDINATOR") },
watcher: { token: env("ACTA_SEAT_WATCHER") },
},
});
The names in this sketch are the reference operation's own vocabulary, as an example. A team's domain names its own transitions; Acta supplies the mechanics.
Transports
- v0: stdio, the transport every MCP client already speaks.
- Second: streamable HTTP, for teams whose agents run in different processes and machines. The commit point stays one server either way.
Build order
- S1, core: store, commit queue, transition registry, log, replay and inspect CLI. Acceptance: the configuration sketch above runs; two scripted callers commit transitions concurrently and the log shows them serialized, each with its version; replay reproduces the state at any version.
- S2, MCP surface: transitions as tools, slices as resources, over stdio. Acceptance: Claude Code connects, reads a slice with its version stamp, calls a transition, and a second client sees the new version on its next read.
- S3, effects: subscriptions by slice, once per version with idempotency keys, effect output and effect failure as transitions. Acceptance: the deposit example: a deposit transition fires the verification effect exactly once per version, and a forced effect failure appears in the state as a failure transition.
- S4, seats and deadlines: manifests enforced, deadline registration and expiry transitions. Acceptance: a call outside a seat's manifest is refused with the reason; a deadline passing without its deposit writes the expiry transition by itself.
- S5, first real user: the Mandato reference operation's launcher hook writes its deposit through the server, and the verification effect replaces the clock-scheduled watchdog for that deposit. Acceptance: a live build session's deposit is verified in minutes from the event, with the deadline transition standing as the only clock in the path.
- S6, public demo and v0.1: a five-minute demo, two agents and one shared bug, the scenario the field keeps describing without a mechanism; npm publication as v0.1 with the demo in the README.
Non-goals for v0
- No multi-writer distribution. One commit point is the thesis, not a limitation to apologize for.
- No user interface. The state is the interface; clients already render resources.
- No exactly-once guarantee across a server crash mid-effect beyond the idempotency key discipline: at-least-once delivery, once-per-version effect bookkeeping, and failures written back as state.
- No remote effect handlers, no plugin marketplace, no hosted service.
Carried open questions
From PROPOSAL.md, unchanged: effect ordering when several effects read the same slice; slice granularity guidance; exactly-once across mid-effect crashes; how a human seat's silence deadline is set without becoming a nagging machine. The build answers them in the order real use raises them, and each answer lands here as an amendment with its case.
Construction notes (amendments from the build)
- S1 (2026-12-05): the transition's reducer is named
apply. The configuration sketch above declares a transition's name, slice, seats and input schema, but does not say who computes the slice's next value. The build names that piece: every transition declaration carriesapply(current, payload), a pure function returning the next slice value. The commit path validates the result against the slice schema before committing; an invalid result is a refusal, returned as data. There is still no other write path. - S3 (2026-12-05): the effect declaration, completed. An effect declares
name(its idempotency identity),reads(the slice it subscribes to), optionalafter(only these transitions trigger it),seat(the seat its emitted transitions are proposed as), optionalfailureTransition, andrun. Bookkeeping for the (effect, version) keys persists beside the log (<log>.effects.json), so a restart never re-runs a completed pair, and versions committed before a crash, or before the effect existed, are caught up at boot: at-least-once, made safe by the keys. A failure is committed through the declaredfailureTransitionwith payload{ effect, version, error }; if even that commit is refused, the bookkeeping entry is the failure's record. One guard the sketch did not anticipate: an unbroken cascade of effects retriggering each other is capped at 64 runs, and anything past the cap is recorded as failed with the cap as its reason, never silently dropped. - S4 (2026-12-05): seat manifests, tokens, and the deadline registry. A seat declaration may now carry a
tokenand amanifest(the transitions that seat may ever emit). A proposal as a tokened seat must present the token (the MCP server presentsACTA_SEAT_TOKEN), and a proposal outside the manifest is refused with the reason, even where the transition itself would allow the seat;defineActarejects a manifest that promises a transition which does not allow the seat. A deadline is registered at runtime against the current version: it names the awaited transition, an optionalmatchPayloadsubset the awaited record's payload must carry (one front's deposit does not satisfy another front's deadline), the expiry transition and the seat that emits it. Satisfaction is derived from the log, so it survives restarts with no bookkeeping to trust; the registry itself persists beside the log (<log>.deadlines.json). The server's one clock act is explicit:checkDeadlines(), called by the embedder on its own cadence, writes each due, unsatisfied deadline's expiry through the commit queue, exactly once; a refused expiry stays open and is retried at the next check, in the open.
The canonical text of this specification lives in the repository at github.com/george-veras/acta/SPEC.md, where the build amends it. This page is a reading copy.