GitPin
Summary: GitPin's MCP server is a read-only evidence toolkit that turns an agent's factual claim about committed code or docs into a re-checkable citation — path, line, full SHA and content hash — verifiable by anyone with plain git.
Discover repos:
pin.cataloglists registered Git roots with HEAD SHAs, doc counts and staleness (repositories,sync,staleviews).Find candidates:
pin.search_docsandpin.search_codereturn ranked candidates (never claims) with a forced next step.Prove claims:
pin.proveproduces a one-path evidence pack (slice, line, full SHA, content hash, handle, verify next-step);pin.prove_setbuilds a 1–8 cite set spanning multiple repos.Read pinned content:
pin.get_docreads one committed doc page;pin.readreads a HEAD-only source slice — sensitive paths are blocked.Verify:
pin.verifyre-checkspath@SHAwithgit show(optionalmustContain, reports HEAD match andclaimVerdict);pin.verify_setbatch-re-checks up to 8 citations, optionally bound to anevidenceSetIdfor CI gates.Decide:
pin.analyzereturns anEvidenceBrief— known facts, gaps, documentation gaps and a stableevidenceSetId— rather than a raw dump.Inspect and diff:
pin.inspectshows HEAD-pinned status, commits, manifests, tests or recent changes (dirty work excluded from evidence);pin.comparediffs changed paths between two revisions.Workflow loop: search → prove → verify → human
git show <sha>:<path>.Guarantees: all 12 tools are read-only, idempotent and offline (no embeddings, database or reindex); uncommitted/untracked content is never evidence and the manifest cannot cite itself.
Provides tools for proving and verifying agent claims against Git repositories, pinning answers to HEAD commits, full SHAs, and specific files and lines, with read-only access and support for local Git roots.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitPin Prove the claim that the API key is loaded in src/config.ts:42 and verify the SHA."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Archived 2026-10-15. Superseded by Assay, a reference architecture for deterministic agent control. Why: the same agent writes both the change and its evidence manifest, so the gate proves coverage and hash pinning, not that a claim is true. Assay moves the decision into deterministic code instead. The last release, 0.6.4, stays on npm. The rest of this README is unchanged.
GitPin
Agent-authored pull requests must show exact evidence before they merge.
A read-only PR gate and local MCP server that ties every claim an AI agent makes about its change to an exact committed line that anyone can re-check with plain git.
Quickstart · Watch the film · Use it in your repo · How it works · Guardrails · Status
Why it exists
Coding agents now open pull requests with confident descriptions: "added retry logging", "updated the protocol doc", "no other files touched". A reviewer who wants to trust one of those sentences has to open the file and hunt for the line, then do it again for the next sentence. Most reviewers stop checking, and an agent can change a file it never mentions.
GitPin turns the description into evidence. The agent commits a small manifest
in which every material claim names the paths it covers and points at an exact
line slice with a SHA-256 of its text. A required check compares that manifest
with the real diff. Any changed file that no claim covers fails the build, and
every claim that passes can be re-checked by a human with git show, without
GitPin, without the agent and without a hosted platform.
Related MCP server: weavatrix-git
Quickstart: the gate in 30 seconds
git clone https://github.com/shmindmaster/gitpin.git && cd gitpin
corepack enable && pnpm install --frozen-lockfile
pnpm demo:gatedemo:gate builds GitPin, creates a throwaway synthetic repository in a temp
folder, and runs the real gitpin gate twice. The agent's first commit changes
docs/protocol.md without claiming it, so the gate fails with exit 1. The
agent adds one evidence locator (line 5, hashed) and the same gate passes with
exit 0:
$ gitpin gate --base <base> --head <agent-commit>
status: failed exit code: 1
violation: uncovered-change: Changed path has no material claim: docs/protocol.md.
covered: synthetic-service/docs/overview.md:3 @ <agent-commit> (verified)
$ gitpin gate --base <base> --head <locator-commit>
status: ok exit code: 0
covered: synthetic-service/docs/overview.md:3 @ <locator-commit> (verified)
covered: synthetic-service/docs/protocol.md:5 @ <locator-commit> (verified)Nothing is written outside the temp folder, and the folder is removed afterward.
See it run
Watch the 90-second film → · The 30-second cut →
Use it in your repo
1. Install the trusted policy on your default branch (a separate, reviewed change, so a pull request can never weaken its own gate):
mkdir -p .gitpin
curl -fsSL https://raw.githubusercontent.com/shmindmaster/gitpin/v0.6.4/templates/gate.yml -o .gitpin/gate.yml2. Make it a required check:
name: Agent delivery assurance
on: pull_request # never pull_request_target
permissions:
contents: read
jobs:
evidence:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- uses: shmindmaster/gitpin@514799cb0eae55e965e51d510d5e7a0a7604c9cc # v0.6.4
with:
base-sha: ${{ github.event.pull_request.base.sha }}
head-sha: ${{ github.event.pull_request.head.sha }}3. Each agent PR commits .gitpin/change-evidence.json, starting from
templates/change-evidence.json. The full
setup, including rulesets, is in docs/pr-evidence-gate.md.
Give your agent the evidence tools. The local MCP server lets Claude Code, Codex, Cursor and other MCP clients find candidates and produce the evidence packs the gate checks:
# Run inside any committed Git repository
npx -y gitpin@0.6.4 init --client codex # or claude-code, cursor, windsurf, zed, continueinit writes ~/.gitpin/repositories.yaml outside the repository, runs
doctor, prints a first evidence line with a full SHA, and prints paste-ready
MCP config. It never edits the repository it registers.
How it works
flowchart LR
subgraph BASE["Trusted: base commit"]
POL[".gitpin/gate.yml<br/>policy"]
end
subgraph HEAD["Submitted: head commit"]
MAN[".gitpin/change-evidence.json<br/>claims → path, lines, sha256"]
end
DIFF["git diff merge-base..head<br/>the real change"]
POL --> GATE{"gitpin gate<br/>read-only, never runs PR code"}
MAN --> GATE
DIFF --> GATE
GATE -- "uncovered path, wrong hash,<br/>sensitive path" --> FAIL(["exit 1: check fails"])
GATE -- "every changed path covered,<br/>every slice re-hashed" --> PASS(["exit 0: report with full-SHA citations"])
PASS -.-> HUMAN(["Reviewer: git show <sha>:<path>"])The gate reads policy only from the trusted base commit and the manifest only
from the head commit, through git show, never from a working tree. It compares
the merge-base diff, re-hashes every cited line slice, and emits a report whose
citations carry full SHAs.
The MCP side follows one loop. Search returns candidates, never answers. Proof
turns a candidate into an evidence pack. Verification re-checks it with
git show:
pin.search_docs / pin.search_code candidates only, with a forced next step
→ pin.prove evidence pack: path, line, full SHA, content hash
→ pin.verify independent git show re-check, HEAD match report
→ you: git show <sha>:<path>Job | Tools (12, all read-only) |
Discover |
|
Find candidates |
|
Prove |
|
Verify |
|
Decide |
|
Inspect and diff |
|
Resource gitpin://catalog; prompt prove-with-git-head. Cite formats are in
docs/cite-spec.md; an agent skill template is in
templates/gitpin-skill.md.
Guardrails and non-goals
Read-only, always. GitPin never writes, commits or pushes to a repository it reads, and the gate never executes pull-request code.
A PR cannot weaken its own gate. Policy comes from the base commit; evidence comes from the head commit; the dirty working tree is never read.
Uncommitted work is never evidence. Dirty and untracked content is excluded from HEAD citations.
Sensitive paths stay sensitive. Deny rules apply to evidence, and the manifest cannot cite itself.
Candidates are not claims. Search output is labelled
evidence-candidatesand must go throughpin.prove.No embeddings, no database, no reindex. Evidence comes from Git objects, so it works offline and on private repositories.
Not goals: semantic search, writing or committing code, replacing GitHub Issues or PR automation, or treating a non-Git folder as one repository.
Status and limits
This source tree and its packed documentation describe GitPin 0.6.4 without asserting publication status. Check each channel independently: npm, the MCP Registry (io.github.shmindmaster/gitpin) and GitHub Releases.
Node 20 or later. Site: shmindmaster.github.io/gitpin.
GitPin verifies coverage, location, revision and content hash. It proves what was committed, not that a claim is true: it does not establish semantic correctness, runtime behavior, authorship, authorization or compliance. That judgment stays with the reviewer, who now reads one cited line instead of hunting for it. Planned work is in the roadmap.
Configuration
Variable | Purpose |
| Registry YAML path (legacy compatibility alias: |
| HTTP bearer token (legacy compatibility alias: |
| HTTP host allowlist (legacy compatibility alias: |
| HTTP bind address; defaults to |
Default registry: ~/.gitpin/repositories.yaml (legacy compatibility fallback: ~/.repocontext/... if present).
Formerly RepoContext 0.3.x. See migration.
Docs
Tools · PR evidence gate · Clients · Architecture · Compare · FAQ · Troubleshooting · Roadmap · Governance
Contributing, security and license
Contributing: start with an issue for bugs and proposals, then follow CONTRIBUTING.md. Good first issues are labelled
good first issue. Before a pull request:pnpm validate && pnpm build && pnpm verify:package.Security: report vulnerabilities privately through a GitHub security advisory, as described in SECURITY.md. Please do not open a public issue.
License: MIT.
Created and maintained by Sarosh Hussain. Related open source: Assay keeps an agent's decision out of its side effects; CrewScore checks whether an agent's prompt writes its safeguards down.
Available Tools
12 toolspin.analyzeCRead-onlyIdempotent
EvidenceBrief (knownFacts/gaps/evidenceSetId), documentation gaps, or coverage compare. Decision evidence—not a dump.
Inputs: no named parameters.
pin.catalogARead-onlyIdempotent
Call first to discover registered Git roots (HEAD SHAs, doc counts, stale). Not a content claim. Use before search/prove.
Inputs: view.
pin.compareARead-onlyIdempotent
Diff changed paths between two hex revisions. Bounded change evidence for reviews—not semantic search.
Inputs: base (required), head (required), repository (required).
pin.get_docARead-onlyIdempotent
Read one committed documentation page as a pinned evidence slice with full SHA. Prefer pin.prove for claims.
Inputs: repository (required), sourcePath (required).
pin.inspectARead-onlyIdempotent
Inspect HEAD-pinned status, commits, manifests, tests, or recent changes. status shows dirty work excluded from evidence.
Inputs: operation (required), repository (required), limit.
pin.proveARead-onlyIdempotent
Primary product tool: one-path evidence pack (slice, path, line, full SHA, content hash, handle, verify next-step). Prefer for every factual claim.
Inputs: repository (required), sourcePath (required), claim, lineEnd, +1 more.
pin.prove_setARead-onlyIdempotent
Multi-cite evidence set (1–8 paths, multi-repo OK). Use when an answer needs several citations. Next: pin.verify_set.
Inputs: items (required).
pin.readARead-onlyIdempotent
Read a HEAD-only source slice (path, lines, full SHA). Sensitive paths blocked. Prefer pin.prove when making a claim.
Inputs: repository (required), sourcePath (required), lineEnd, lineStart.
pin.search_codeARead-onlyIdempotent
Find code candidates via git grep at HEAD. Never treat hits as final claims—pin.prove then pin.verify (or prove_set/verify_set).
Inputs: query (required), repository (required).
pin.search_docsARead-onlyIdempotent
Find documentation candidates (not claims). Before any factual assertion call pin.prove or pin.prove_set, then pin.verify.
Inputs: query (required), repository.
pin.verifyARead-onlyIdempotent
Close the prove loop: re-check path@SHA with git show; optional mustContain for claim-text. Reports HEAD match and claimVerdict.
Inputs: sha (required), repository (required), sourcePath (required), line, +1 more.
pin.verify_setARead-onlyIdempotent
Batch re-check up to 8 citations (from pin.prove_set or a pack). For multi-repo answers and CI citation gates.
Inputs: items (required), evidenceSetId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a distinct purpose: reading source vs docs, searching code vs docs, single vs multi evidence creation, single vs batch verification, plus analysis, inspection, and comparison. No two tools overlap in function.
All tools share the 'pin.' prefix and use lowercase snake_case. The names follow a predictable verb or verb_noun pattern (e.g., prove, prove_set, search_docs, get_doc), creating a clean, uniform naming convention.
At 12 tools, the set is well-scoped for its domain. Each tool serves a distinct role in the evidence workflow, and the count is comfortably within the ideal 3-15 range, neither sparse nor bloated.
The server covers the full evidence lifecycle: discovery (catalog), search (search_docs/search_code), reading (read/get_doc), evidence creation (prove/prove_set), verification (verify/verify_set), analysis (analyze), inspection (inspect), and diffing (compare). No obvious gaps or dead ends for the stated purpose.
Maintenance
Related MCP Connectors
Repository evidence for agents before they adopt dependencies, enter codebases, compare, or merge.
Read-only release evidence for coding agents: findings, deliveries, source and runtime data.
Read-only verifier for 25 ProofRelay MCP tools and non-confidential evidence bundles.
Read-only agent identity index with provenance, historical evidence and explained coverage.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes code graphs across multi-program repositories via MCP, enabling humans and agents to query the fleet with evidence.MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for fast, bounded, read-only Git evidence, enabling AI agents to query commit history, diffs, status, and snapshots by parsing repository storage directly.345 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides bounded repository context and edit-grant MCP tools to coding agents such as Codex, indexing local repositories and enabling fingerprint-checked patch application.23Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA local-first MCP server that provides read-only access to Git repository history, exposing commit metadata and optionally content patches via configurable policies, with optional AI-powered analysis while never modifying Git state.2 npmApache 2.0