Labsco
MCP SERVER

papercheck

by cgarryZA

Audit a LaTeX maths paper under gates that refuse hallucinated findings and out-of-order edits.

Academic Literature & Citations
Summary
The gates are in code, which is what makes the audit worth reading.

Three failure modes of "review my paper" are handled structurally rather than by prompting: a fabricated finding is rejected because its quote does not match the source, a premature rewrite is refused because the state machine has not reached adjudication, and a skipped verdict is impossible because the gate is computed. The limits are stated as plainly: it is not a theorem prover, and catching a semantic error still depends on the model driving it.

What it is

A reproducible audit harness for mathematical LaTeX papers, with a deterministic Python core and two front ends — a CLI and an MCP server. The harness itself never calls a model; the reasoning stays in the agent driving it or in your hands.

What you get
  • An MCP server exposing 29 tools plus the audit prompt pack, walked through by the agent in order: `init_audit`, `run_scan`, `propose_segments`, `submit_issue`, `adjudicate_issue`, `run_gate`
  • LaTeX-AST structure extraction — theorems, labels, references, citations, equations, draft markers — into `structure.json`
  • Quote verification at intake: a finding whose quoted text is not in the source is rejected as `REJECTED_SOURCE_TARGET_INVALID` before it reaches the ledger
  • A stage-gated state machine from `INIT` through `ADJUDICATED` to `GATED` that refuses out-of-order operations — patches are refused unless the state is adjudicated and the issue accepted
  • Domain packs generated per paper through `scaffold_domain_pack` and `create_domain_pack`, with generic packs for stochastic analysis, PDE, numerical analysis, optimization and machine-learning theory
  • A final gate computed from mechanical signals and accepted blockers, a self-contained HTML report, and a local web UI
Requirements

The PyPI package papercheck, version 0.3.4 — `pipx install papercheck` or `pip install papercheck`. Python 3.10+. Register the server with `claude mcp add papercheck -- papercheck-mcp`; the CLI entry point is `papercheck` and the server runs over stdio. No API keys: the harness makes no network calls of its own and runs no models.

Setup effort

One command — pipx install papercheck