MCP server for compare-cli: contract version diff/redline and a drift gate as agent tools.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Clause-aware drift detection between two contract versions. Pre-signature gate for legal teams and agent pipelines. Single-file Node CLI, two runtime deps, deterministic by design, no LLM tier in v1.
Part of the contract-ops CLI suite: template-vault-cli (storage) β draft-cli (fill placeholders) β nda-review-cli (review, redline, negotiate) β docx2pdf-cli (DOCX β PDF) β sign-cli (signing + audit). compare-cli is the pre-signature drift gate. Showcase site.
Part of the contract-ops CLI suite. draft-cli (fill placeholders) β nda-review-cli (review, redline, negotiate) β docx2pdf-cli (DOCX β PDF) β sign-cli (signing + audit). Storage: template-vault-cli. Drift detection: compare-cli (this CLI). Showcase site.
Agent pipelines: see
mcp/README.mdforcompare-cli-mcp, the MCP server wrapping this CLI. Three tools (compare_files,compare_with_negotiation,compare_demo), stdio transport, JSON-first responses. Design contract:docs/mcp.md.
You negotiated a contract over several rounds with counterparty's counsel.
A few days later their paralegal sends you a ready-to-sign.pdf. Is the
PDF the same text you agreed to, or did something quietly shift between
"final version" and "version we put in the signing envelope"?
compare-cli answers that question with an exit code your CI can gate on:
$1,000 vs $1000, Oxford comma) drift.
Informational; the agreement didn't change.The CLI works on .docx, .pdf, .md, and plain text β including
cross-format comparisons (negotiated .docx vs ready-to-sign .pdf).
Or run without installing:
(The package is compare-cli; the installed command is compare. The
-p β¦ -- compare form tells npx which package to fetch and which bin
to run, since the two names differ.)
Requires Node β₯ 20. (Pinned by pdfjs-dist@^5.7.284, which we share with sign-cli.)
Runs against two bundled fixtures (a negotiated NDA and a candidate where the term silently shifted from "two (2) years" to "three (3) years") and exits 2. You see the headline contract β substantive drift detected, report written, exit code asserted β without authoring a file.
Same comparison, structured JSON output to stdout.
| If you are⦠| Start here |
|---|---|
| A new user evaluating the gate | Run this above, then the End-to-end transcript |
| An LLM agent driving the CLI | AGENTS.md β compare --catalog json β compare <base> <candidate> --json |
| Gating in CI | compare --check (exit-code only) or --sarif for code-scanning |
| Wiring via MCP | the compare-cli-mcp package β see docs/mcp.md |
| Adding a new CLI to the suite | The build-a-CLI playbook β the conventions every suite CLI follows |
In a CI pipeline:
| Code | Meaning |
|---|---|
0 | No drift detected, safe to sign |
1 | I/O error β input not found, unreadable, malformed .docx/.pdf |
2 | Substantive drift (or --strict/--strict-cosmetic was set and tripped) |
3 | Cosmetic-only or typographic-only drift (informational) |
4 | Clause(s) moved but content identical |
Stable across minor versions. Documented in AGENTS.md and COMPARE_SCHEMA.md.
...$1,000 vs $1000,
5.0% vs 5%), Oxford comma flips, case-only differences
(Acme vs ACME)will not vs will, two years vs three years,
clauses added or removed)The exact rules β including what is deliberately not normalized away (singular/plural, tense, negation, list punctuation) β are locked in COMPARE_SCHEMA.md Β§5βΒ§6.
--json output shapeStable across minor versions. Top-level keys: ok, exit_class,
exit_code, base, candidate, summary, differences, warnings.
See COMPARE_SCHEMA.md Β§10 for the full shape.
--why outputStructured key=value lines on stderr describing detection tiers,
alignment method, class counts, exit decision, and strict-mode state.
Same posture as draft-cli's --why.
--from-negotiationReads nda-review-cli's negotiation.json and extracts the latest
agreed text as BASE. Three-tier resolution (preferred β fallback):
top-level status: converged|signed_off|finalized, per-round
agreed: true (minimum schema), per-round clause_status all
"agreed" (historical fallback). See
COMPARE_SCHEMA.md Β§9.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/compare-cli-mcp)<a href="https://allmcps.com/mcp/compare-cli-mcp"><img src="https://allmcps.com/api/badge/compare-cli-mcp?style=directory" alt="Compare Cli MCP on AllMCPs" /></a>