The macp Command Line
One binary to start the stack, watch a session, ask what a different policy would have done, and check a decision receipt. Every check answers in its exit code.
By Ajit Koti
Last week you ran your first session. This week is a short one, about a tool that shipped with runtime 0.10.0: macp, the MACP command line. It does five things, and each has come up earlier in this series.
cargo install macp-cliIf you do not have a Rust toolchain, there are binaries for macOS and Linux, on arm64 and x86_64, on the runtime releases page, with a SHA256SUMS file to check them against.
Start the stack, without a clone
macp up # runtime, control plane, console, playground, auth service, Postgres
macp status # lists the containers
macp down # stops them; --volumes also deletes every recorded runmacp up carries the same compose file as git clone … && docker compose up, pinned to the same images. It waits until every container is healthy, then prints the addresses. Open http://localhost:3000 and launch the Showcase. As before, this stack is for evaluation, not production: its auth runs on a throwaway development key.
Watch a session
For this part and the next, use the standalone runtime from the quickstart (image 0.10.0), and the Python script from last week with one extra line at the end, print("session:", session.session_id). Then:
macp session tail <session_id> --token coordinator#1 2026-10-26T19:04:50.155Z coordinator SessionStart 67b9e793-… SessionStartPayload { intent: "pick a deployment plan", participants: ["coordinator", "alice", "bob"], … }
#2 2026-10-26T19:04:50.168Z coordinator Proposal 768b542e-… ProposalPayload { proposal_id: "p1", option: "deploy v2.1", rationale: "tests passed", … }
#3 2026-10-26T19:04:50.169Z alice Evaluation 5e4f8843-… EvaluationPayload { proposal_id: "p1", recommendation: "APPROVE", confidence: 0.94, reason: "low risk" }
#4 2026-10-26T19:04:50.169Z bob Vote 1e057ee9-… VotePayload { proposal_id: "p1", vote: "APPROVE", reason: "ship it" }
#5 2026-10-26T19:04:50.170Z coordinator Commitment 64a7e424-… CommitmentPayload { action: "deployment.approved", authority_scope: "release-management", reason: "winner=p1", … }
macp: session ba670cd2-42ed-4277-a763-d4ef57605d40 is Resolved (5 shown)(I have shortened the IDs and payloads to fit.) That is the session's accepted history, in order, with the sender the runtime authenticated for each message. On a session that is still running, tail prints the history and then follows new messages until the session ends. --token coordinator works here because the development runtime takes the bearer token as the sender's name. Any identity that can read the session will do: the initiator, a participant or an observer.
Ask "what if?"
The second post said the rules a session runs under are bound when it starts, so the same history replays to the same outcome. That also makes a useful question answerable: would this session have ended the same way under a different policy?
Here is a candidate policy that requires a unanimous vote, saved as unanimous.json:
{"policy_id":"policy.cli.unanimous","mode":"macp.mode.decision.v1","description":"all must vote","schema_version":1,"rules":{"voting":{"algorithm":"unanimous"}}}macp replay --session <session_id> --token coordinator --policy unanimous.jsonrecorded policy.default Resolved by Commitment 64a7e424-… at #5
candidate policy.cli.unanimous Open
diverges at #5 Commitment 64a7e424-…: recorded applied (Resolved), candidate refused POLICY_DENIED
denied #5 64a7e424-…: threshold_not_met: unanimous vote failed: 1 approve, 0 reject out of 3 participants
outcome changedThe runtime replays the recorded messages under the candidate policy and reports the first place the two runs part ways. Under the stricter rule, the Commitment at message 5 would have been refused, and the session would still be open. The command exits 1, because the outcome changed. Without --policy it replays the session under its own recorded policy, which is an integrity check: it prints integrity ok and exits 0 when the history still ends where it did.
This is RFC-MACP-0012 §8.1 what-if replay. It is read-only: it never alters the session or its history.
Check a receipt
The third post showed a decision receipt being checked from Python. The command line does the same with no code:
macp verify receipt.json --key example-1=TDVzkxaSf6_Oxu7mmn5TbCkF80s8Ulh33qKQsi0gnZMintegrity match
attestation 0 jws valid
verdict attestedThat is the spec's signed example receipt, receipt_001_attested. Without the --key, the signature cannot be trusted, so the verdict is integrity_only. Edit the commitment's reason and the verdict is unverified.
Run the conformance fixtures
macp conform runs the spec's conformance fixtures against an implementation and reports the level it reached. It takes the same arguments as the macp-conform runner, and the conformance page says what the levels mean.
Exit codes you can script against
Every macp command uses the same three exit codes:
| Code | Meaning |
|---|---|
| 0 | It worked, or the check passed. |
| 1 | The check ran and failed: a receipt below the verdict you required, an outcome that changed under a candidate policy, a failed fixture. |
| 2 | It could not run: bad usage, an unreadable file, an unknown session, Docker missing. |
Keeping "it failed" separate from "it could not run" is what makes these commands safe to put in CI. A policy change can be gated on macp replay against a set of recorded sessions, and a pipeline that receives a decision can refuse it unless macp verify exits 0, without a broken network connection being mistaken for a bad decision.
The full reference, with every flag, is the macp-cli README.