closure_drift
This MCP server provides read-only git checks for version-label consistency and closure drift.
Check before tagging whether the version declared at HEAD would reuse a label already naming other code (
would_tag).Audit all version labels/tags to see whether each names exactly one code state (
check_versions), with optionalstrictandpublished_filefilters.Explain a label in drift by listing paths that differ between the first tag using it and each other tag using it (
explain_label).Compare any two tags or commits for version labels, closures, and differing paths (
compare).Run only local git reads, with no network, returning exit codes 0/1/2 plus a JSON report or refusal text.
Operates on local git repositories, reading the tag history read-only to check whether each version label names exactly one code state. Tools audit the whole tag history, compare any two tags or commits and list differing paths, explain which paths differ under a drifted label, and check before tagging whether HEAD's declared version would reuse a label that already names other code (exit 1 = do not tag).
Provides a GitHub Actions step (luizfnsilva/closure_drift@v1.2.2) to gate releases in CI, running the version-label check on a checkout (with full history) before a tag is created, so drift is caught in the pipeline.
closure_drift
A version label should name one state of your code. closure_drift checks that it does.
One Python file, no dependencies, read-only, no network.

Try it
git clone -q https://github.com/luizfnsilva/closure_drift
python3 closure_drift/examples/demo.py # the three answers, on tiny repositories
python3 closure_drift/closure_drift.py /path/to/your/repoNeeds Python 3.9+ and git. Before you tag: --would-tag. After you tag, before you push: --tag v1.2.0.
In CI: docs/CI.md. With an agent: the skill in
skills/closure-drift/, or the MCP server in integrations/.
Related MCP server: mcp-git
What it says
verdict | exit | |
| 0 | every version label names one state of the code |
| 1 | a label names more than one |
anything else | 2 | nothing decided; the report says why |
With --tag: tag_matches (0) or tag_mismatch (1).
$ git clone -q https://github.com/psf/requests && cd requests
$ closure-drift --compare v2.16.0 v2.16.1
...
DIFFERS UNDER ONE LABEL: both declare 2.16.0, and the code differs
in 2 path(s). If both were published, that label names two things.Every report records the commit it measured and the hash of the checker, so anyone can run it again and get the same answer.
Limits
It reads git, not a package index: it shows what the tags contain, not which commit a published
package was built from. It attests and signs nothing. More: SCOPE.md.
More
docs/START.md: does it fit, which mode, what the answer means, what nextdocs/USAGE.md: every option, the GitHub Action, pre-commit, agents, testsRESULTS.md: measurements by others, including results that are not cleanclosure-verify report.json --repo .: checks a--json --evidencereport without the detector's code (docs/USAGE.md)docs/FAILURES.md: every failure of the tool found so farThe measurement record behind it: 10.5281/zenodo.21765404
Apache-2.0. Cite as 10.5281/zenodo.21763931.
Available Tools
4 toolscheck_versionsMeasure all version labelsARead-onlyIdempotent
Use to audit the whole tag history: does each version label name exactly one code state? For a single release about to be tagged, use would_tag. With one release only, the answer is not decided (exit 2). Returns exit 0, 1 or 2 and the JSON report. Exit 2 is not a pass: nothing was decided, and output says why (no label found, a file not read, a tag not compared). Read-only: it runs git reads only, on the local repository, with no network.
Inputs: repo (required), strict, published_file. Returns: exit, output, meaning
compareCompare two referencesARead-onlyIdempotent
Use to compare any two tags or commits you name: their version labels, closures and the paths that differ. Publication points play no part. Exit 1 when both declare one label and the code differs. Returns exit 0, 1 or 2 and the JSON report. Exit 2 is not a pass: nothing was decided, and output says why (no label found, a file not read, a tag not compared). Read-only: it runs git reads only, on the local repository, with no network.
Inputs: a (required), b (required), repo (required). Returns: exit, output, meaning
explain_labelExplain a label in driftARead-onlyIdempotent
Use after check_versions reports drift: lists, for one label, the paths that differ between the first tag that used it and each other tag that did. For two references you choose, use compare. Returns exit 0, 1 or 2 and the JSON report. Exit 2 is not a pass: nothing was decided, and output says why (no label found, a file not read, a tag not compared). Read-only: it runs git reads only, on the local repository, with no network.
Inputs: repo (required), label (required). Returns: exit, output, meaning
would_tagCheck before taggingARead-onlyIdempotent
Use BEFORE creating a release tag: would the version that HEAD declares reuse a label that already names other code in the tags? Exit 1 means do not tag; bump the version first. Returns exit 0, 1 or 2 and the JSON report. Exit 2 is not a pass: nothing was decided, and output says why (no label found, a file not read, a tag not compared). Read-only: it runs git reads only, on the local repository, with no network.
Inputs: repo (required). Returns: exit, output, meaning
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The four tools have largely distinct scopes: would_tag is for a forthcoming single release, check_versions audits all tag history, explain_label drills into one drifted label, and compare examines any two refs. The main possible confusion is between would_tag and check_versions, but their descriptions explicitly separate pre-tag single-release checks from full-history audits.
Three tools follow a verb_noun pattern (would_tag, check_versions, explain_label), while compare is a bare verb. This is a minor deviation and still readable, with no mixed casing styles.
Four tools are well-scoped for a focused read-only version/tag drift audit server. Each tool earns its place and covers a distinct step in the workflow.
The surface covers pre-tag checking, whole-history auditing, drift explanation, and arbitrary ref comparison. Minor gaps remain, such as listing tags or labels directly, but the core read-only lifecycle for this domain is covered.
Maintenance
Related MCP Connectors
MCP Drift Observatory: has a public MCP server's declared tools changed? Free check, archive, feeds.
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
Related MCP Servers
- AlicenseCqualityDmaintenanceMCP server providing Git-related functionalities, primarily a tool to generate diffs for Git merge commits against their first parent.4MIT
- AlicenseNot gradedqualityCmaintenanceA local git MCP server. It exposes 12 git operations to an MCP client over stdio, allowing the client to inspect and work with a git repository on your machine, including status, diffs, log, branches, staging, and commits.1MIT
- AlicenseAqualityBmaintenanceCoordination protocol for parallel coding agents, built above Git. The MCP server exposes the full 17-tool lifecycle over stdio: register agents, publish intents with semantic scopes and declared operations, claim work, check for conflicts before code is written, publish ChangeSets, run trusted named verification checks, and record accepted work. Deterministic rules raise findings when two agents'18410Apache 2.0
- AlicenseNot gradedqualityBmaintenanceIt introspects a repository and exposes guarded MCP tools over stdio, enabling clients to query code and optionally perform mutating operations when explicitly allowed.13 npmMIT