r/tlaplus • u/Scottie-2222 • 4d ago
tla-kit: TLC, SANY, TLAPS, cvc5 and ethos in one container image pinned by digest, plus an MCP server over them
tla-kit is one container image of the TLA+ tool family, so that the checker and the prover are the same build on a laptop and in CI. It also includes an MCP server over those tools, meant to be used with the writing-tla-specs-and-proofs skill.
Repo: https://github.com/scottcochran/tla-kit. Latest release: v0.5.0.
ghcr.io/scottcochran/tla-kit@sha256:5ee10d3e9b761f91020be2c6b11a16a459966a9a4cf5a105c964ae31a49ab59fWhy
I have a development with 34 TLAPS proof modules (about 13.6k obligations), and CI couldn't rerun any of them. The prover I'd pinned was an arm64-darwin build of tlapm 1.6.0-pre. Upstream rebuilds the rolling 1.6.0-pre tag under the same name, so the tarball I'd pinned is no longer served. "The proofs pass" really meant "they pass on my machine, with a binary nobody else can download."
tla-kit fixes this by keeping its own copy of each input and naming the result by digest:
The base image is pinned by digest, and
aptcomes from a dated Ubuntu snapshot.The TLAPS tarball, and cvc5's and ethos's builds, are kept in this repo's releases. Each is checked by sha256, and so is every one of the 47 files in the tlapm tarball.
Every build of one commit gives the same image digest. CI's two runners and the release workflow all agree.
Releases come with signed build-provenance and SBOM attestations, which
gh attestation verifychecks.PINS.jsonlists everything the image holds. CI fails if it disagrees with the Dockerfile, andtla-kit-selftestchecks every installed digest against it in about 30 seconds.
What's in it
| Tool | Version |
|---|---|
tla2tools.jar (TLC, SANY, PlusCal) | v1.7.4 |
tlapm | 1.6.0-pre at ff40755, with Z3 4.8.9, Zenon 0.8.4, Isabelle2025 and LS4 |
cvc5 + ethos + the CPC signature | 1.4.0 / 0.2.4. A certified run counts an SMT obligation as proved only when ethos accepts cvc5's proof of it |
| Java | Temurin JRE 25 |
The image sets TLA_JAR, TLAPM, CVC5 and ETHOS. If your run scripts already read those variables, a mounted project uses the image's tools without changes. You don't have to use the MCP server, either:
docker run --rm -v "$PWD:/work" ghcr.io/scottcochran/tla-kit@sha256:5ee1… tlc -config M.cfg M.tla
docker run --rm -v "$PWD:/work" ghcr.io/scottcochran/tla-kit@sha256:5ee1… tlapm --cleanfp --strict M_proof.tlaThe MCP server
tla-kit mcp is an MCP server over stdio. It's written with Python's standard library only and runs inside the image, with your project mounted at /work:
docker run -i --rm --user "$(id -u):$(id -g)" -v "$PWD:/work" \
ghcr.io/scottcochran/tla-kit@sha256:5ee1… tla-kit mcpIt has 14 tools:
| Tool | What it returns |
|---|---|
info | Every tool in the image, with the digest a results file would cite |
parse | SANY errors and warnings, with their locations |
symbols | A module's constants, variables, definitions (arity, parameters, level), assumptions and theorems, from SANY's XML exporter |
evaluate | A constant expression evaluated by TLC. Given a module, it can use that module's definitions |
tlc_run | One check of one property: HOLDS / COUNTEREXAMPLE / DEADLOCK / ERROR, the state count, and any counterexample as structured states (JSON, not trace text) |
simulate | Random behaviours to a depth. Its result is labelled NO-ERROR-SAMPLED, never "holds" |
coverage | Per-action counts, naming the actions that never fire |
state_graph | A small model's reachable graph as JSON, with edges labelled by action |
proof_check | tlapm --summary: whether the module parses and elaborates, and how many obligations it has. No backends run |
prove | TLAPS on a theorem or step by name, a line, a line range, or the whole module. It reports success only when every obligation in scope is proved. Otherwise it returns each failed obligation's text, the backends tried, and why each one failed |
tlc_rows | Runs a list of checks and writes a dated results file stamped with digests, only if every check is as expected |
proof_results | Writes a dated proof results file (--cleanfp --strict), only if every obligation is proved |
flip_test | A non-vacuity check: flips a hypothesis in a copy of the proof module and confirms the proof then fails where it should |
proof_sync | Reports IN SYNC / STALE / MISSING for every results file against the current modules and tool pins |
Some details on how the server behaves:
Only
tlc_rowsandproof_resultswrite into your project, and they write only results files. Every other tool keeps its scratch files outside the project, and paths outside the mount are refused.The proof tools enforce your project's prover pin (
tools/TLAPS-PIN). An unpinned run happens only if you ask for one, and its output and results file say so.Every
provecall starts a freshtlapmin its own process group. On a timeout or a cancel, the whole group is killed, so no orphaned Isabelle or Z3 processes are left behind. The server owns the fingerprint cache and allows one run per module at a time. I wrote this concurrency design as a TLA+ spec,spec/ProveRequests.tla, and model-checked it (78 checks), and there's a test that tries to break each of its properties against the real server.The proof tools follow the design of marco6/tlapm-mcp (none of its code is used). The main change is returning the failed obligation's text, not just its location.
I checked the server against the commands it wraps. On two real modules, all 84 comparisons between each tool and its command-line equivalent matched.
Does an agent actually do anything useful with it?
I ran one small test. I gave Claude Code only the 14 tools plus Read and Edit, and a 39-line fixture proof with one step broken: the step's BY LimitNat DEF TypeOK, Bounded, Next, Step, vars was cut down to BY DEF Bounded. The agent wasn't told which step was broken.
proveon the module failed at line 15. The obligation text showed onlyBoundedexpanded, so the agent added theDEFs that a sibling lemma uses.provefailed again, but the text now showedn < Limitandn >= Limitside by side. The agent concluded the prover neededLimit \in Natand addedLimitNat.provesucceeded with 19/19 obligations proved, 8 of them from the cache, in 0.5 s.
That took 28 seconds and cost $0.15, and the result matched the original byte for byte. Running tlapm --cleanfp --strict directly, outside the server, also proved it. The obligation text is what made the repair possible: a line number and a "failed" verdict would have located the step, but not shown what it was missing.
To be clear about what this shows: it was one run, one model, and an easy repair. Nothing was tried on long proof steps or on repairs that need a new lemma. The full record, with the transcript, is here, and examples/agent-repair/ reproduces it, including an Actions workflow.
Certified proofs
v0.4.0 adds cvc5 and ethos. In the published image, a certified run checked all 263 obligations of one of my proof modules. TLAPS' translation to SMT has known soundness issues (tlapm#309, #310). Having cvc5 proofs checked by ethos doesn't fix those, but it does take the SMT solver itself out of what you have to trust.
Limits
Linux x86_64 only. Upstream publishes no Linux arm64
tlapm. On Apple Silicon the image runs under emulation; my full run of 34 proof modules took under 7 minutes on a 12-CPU Mac.One prover build. The image carries
tlapmatff40755. If your project pins a different build, you're comparing obligation counts, not identical results files.About 800 MB.
Not in it yet: Apalache, TLATeX, the community modules, and a from-source arm64
tlapm.Only the latest release is supported. Old digests are never deleted, but they get no fixes.
Try it
Point your agent at a TLAPS proof with the server connected. The tool descriptions should be enough for it to work out the server on its own. For the full method (how to write specs so their properties are local, how to structure proofs, and how to keep the evidence honest), add the writing-tla-specs-and-proofs skill, which declares the server for you.
Feedback is appreciated, especially:
Where your agent got stuck, and what the tools returned at that point.
Would you use something like this in your own CI, and what would it need to have?
Is Apalache or the community modules the more useful next addition?
Code is Apache-2.0 and docs are CC BY 4.0. The bundled tools keep their own licences, and the repo includes the source of the copyleft parts.

