PrufGate MCP
OfficialThis server lets an agent run PrufGate's deterministic static checks against a repository—and optionally against a live service—to catch fabricated code, fake tests, suspicious diff changes, broken contracts, and authorization holes.
Fast scan (
prufgate_fast_scan): runs engines 1–5 (anti-fabrication, test integrity, diff guard, contract guard, static BOLA) on changed files.Full scan (
prufgate_full_scan): runs engines 1–5 over the whole workspace plus the diff reviewer; adds the live two-token BOLA probe only whentarget_urlis set.Anti-fabrication (
prufgate_anti_fabrication): flags canned fallbacks, simulated return values, stub handlers and other faked production logic.Test integrity (
prufgate_test_audit): flags zero-assertion tests, tautologies, self-mocked units and weakened assertions.Diff guard (
prufgate_diff_guard): flags skipped tests, suppression comments, unsafe casts and weakened lint/CI config added in the diff.Contract guard (
prufgate_contract_check): flags undeclared or hallucinated imports, undocumented env vars and frontend/backend route mismatches.BOLA check (
prufgate_bola_check): finds routes/queries lacking auth or tenant scoping, with an optional live two-token probe.Diff review (
prufgate_review): deterministic review of the diff against a base ref.Summary (
prufgate_summary): reads the last SARIF/Markdown report without running a scan.Explain rule (
prufgate_explain): explains what a rule catches, how to fix it, and how to record a false positive.All tools are read-only, idempotent and non-destructive; only
prufgate_full_scanandprufgate_bola_checkreach the network (only whentarget_urlis set).
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., "@PrufGate MCP audit my last commit for fabricated fallbacks and hollow tests"
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.
Linters check that code compiles. PrufGate looks for code that compiles, passes review at a glance and still does not do the job. This is the kind of code an AI coding agent (or a hurried human) writes to make a task look finished:
a
catchblock that returns a hard-coded success object;a click handler that does nothing;
a test that asserts
true, or mocks the very function it tests;a
.skip,@ts-ignoreor lowered coverage threshold slipped into a diff;an import of a package that is not declared anywhere;
an API route that loads a record by ID without checking who owns it.
PrufGate is deterministic: plain Python, no network calls and no LLM unless you ask for one. It runs in seconds on a pull request, and writes SARIF for code scanning and Markdown for humans. It is meant to sit next to your linters and SAST tools, not replace them.
The six engines
# | Engine | What it catches |
1 | Anti-fabrication ( | Canned success on error paths, simulated return values, |
2 | Test integrity ( | Tests with no assertions, assertions that cannot fail, tests that mock the unit under test, swallowed exceptions, assertions deleted or weakened in a diff, test files deleted or test cases removed in a diff, production code special-casing a test's literal input. |
3 | Diff guard ( | Skips and focus ( |
4 | Contract guard ( | Imports not declared in |
5 | BOLA / IDOR ( | Route handlers that look up a record by a client-supplied ID with no auth guard or no tenant/owner scoping, across Express, Next.js, NestJS, FastAPI, Flask, Django, Go (net/http, Gin, Echo, Chi), Spring, Rails and Laravel. Optional live two-token probing of a running service you own. |
6 | Diff reviewer ( | High-precision rules on changed lines (SQL built from strings, shell injection, disabled TLS verification, hard-coded credentials, unsanitised HTML, ignored Go errors, credential logging), GitHub suggestion blocks, and optional delegation to an AI CLI or API you choose. |
Details, rule IDs, supported languages and known limits for each engine: docs/ENGINES.md.
PrufGate uses pattern and structure heuristics, not a full parser for every language. It will miss things and it will sometimes flag correct code. Every finding names its rule, and inline prufgate-ignore: rule -- reason comments, exemptions and baselines let you record why.
Related MCP server: system-brain-mcp
Quick start
PrufGate needs Python 3.9 or newer and Git.
The documentation home covers this checkout. For unreleased options, install/build a reviewed checkout and keep CLI, Action and image implementations aligned; see installation and upgrading. Published 1.4.0 artifacts retain that release's behavior.
pipx install prufgate # or: pip install prufgate (the `prufgate` and `prufgate-mcp` commands)
prufgate --self-check # every engine against its built-in fixtures
uvx prufgate --version # or run it without installing, with uvOr download one file, prufgate.pyz, from the latest release (releases after 1.0.0). It is a zipapp with PyYAML (pure Python) inside, so it needs nothing but Python 3.9 or newer:
curl -LO https://github.com/GuardianVigil-Labs/Prufgate/releases/latest/download/prufgate.pyz
curl -LO https://github.com/GuardianVigil-Labs/Prufgate/releases/latest/download/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
gh attestation verify prufgate.pyz --repo GuardianVigil-Labs/Prufgate
python3 prufgate.pyz --self-check
python3 prufgate.pyz check .The hooks that prufgate init --hooks writes call prufgate on PATH, so for them install the file as a command: install -m 755 prufgate.pyz ~/.local/bin/prufgate. The zipapp runs every command a pip install has except mcp (use pipx install prufgate for the MCP server). Like a pip install, it does not include the shell batteries (./prufgate.sh fast / full with ast-grep, gitleaks and zizmor); prufgate.pyz fast and full run the Python engines only. For the full battery use the container image or a checkout. There are no native per-OS binaries: they would need a build on three operating systems for every release, and the zipapp covers the same need. python3 scripts/build_pyz.py builds the same file from a checkout; it downloads the hash-locked PyYAML sdist from PyPI and refuses one that does not match requirements.txt.
Or run the signed container image, which adds the full gate with ast-grep, gitleaks and zizmor:
docker run --rm -v "$PWD:/workspace" ghcr.io/guardianvigil-labs/prufgate:1.4.0 # the fast gate on this repository
docker run --rm -v "$PWD:/workspace" ghcr.io/guardianvigil-labs/prufgate:1.4.0 prufgate check .Or add the GitHub Action to a pull-request workflow, pinned to the commit SHA of the v1.4.0 tag (full example):
- uses: actions/checkout@<commit-sha>
with: { fetch-depth: 0, persist-credentials: false }
- run: python3 -m pip install "PyYAML>=6.0"
- uses: GuardianVigil-Labs/Prufgate@<commit-sha-of-v1.4.0>Every release is signed and carries build provenance and an SBOM: Verify a release.
Or add it to your pre-commit configuration, .pre-commit-config.yaml (details):
repos:
- repo: https://github.com/GuardianVigil-Labs/Prufgate
rev: v1.4.0
hooks:
- id: prufgate # changed files, on every commit
- id: prufgate-full # whole repository, before a push (pre-commit install --hook-type pre-push)Then, in your project:
prufgate check . # engines 1-5 on the whole repository
prufgate check --changed --base origin/main # only what this branch changed
prufgate init --hooks # starter config + coding-agent hooks
prufgate baseline # record existing findings; only new ones are reportedExit codes are the same everywhere: 0 clean, 1 blocking findings (P0/P1), 2 PrufGate could not run (bad config, bad base ref, unreadable file, engine crash). A crash never reads as a pass.
Ways to run it
Want | Use |
A quick check while coding |
|
What a finding means and how to fix it |
|
Adopt it on a codebase that already has findings |
|
Findings inline in VS Code | The VS Code extension (source): runs |
One engine |
|
The full gate with SARIF and Markdown reports |
|
A pull-request gate on GitHub | The composite action in this repository: docs/CI_INTEGRATION.md |
The result where reviewers look | The action writes a short summary (verdict, top findings, what the change touched) to the job summary, and with |
A coding agent sent back to fix its findings before it stops |
|
A coding agent stopped from skipping hooks, force-pushing or deleting tests and CI config |
|
Base-branch tests run against the head code (executes repository tests: sandbox or CI only, opt-in) |
|
Mutation smoke test on the changed lines with an installed mutmut, Stryker, PIT, gremlins, go-mutesting or cargo-mutants (executes repository tests: opt-in) |
|
PrufGate as a Claude Code plugin (hooks plus a |
|
Other agents and AI reviewers (Cursor Bugbot, Copilot review) told to use PrufGate's findings |
|
An AI second opinion on PrufGate's own low-confidence findings only (opt-in, sends a few lines of code to a provider you choose) |
|
Tools for an agent over MCP |
|
A service that scans on webhook |
|
The full command and option reference is in docs/GETTING_STARTED.md, and every configuration key is in docs/CONFIGURATION.md.
Configuration in one look
PrufGate works without configuration. To tune it, add .prufgate/config.yaml:
version: 1
packs: [core, web-ui, ai-safety] # cti is an opt-in domain pack
exclude: ["dist/**", "vendor/**"]
auth_guards: [requireUser, get_current_user]
tenant_keys: [organization_id, account_id]
exempt:
src/legacy/adapter.ts:
route-canned-fallback: "#104: legacy fallback until the payments API migration"
known_debt:
stub-click-handler: 0 # a ceiling that can only go downIn a pull request (any run with a base ref) PrufGate reads this file as it is on the base branch, so configuration changes take effect after merge: a change cannot exempt its own findings.
AI adjudication
PrufGate is deterministic by default and sends nothing anywhere. Two opt-in modes use an AI provider you choose (a claude CLI, OPENAI_API_KEY, ANTHROPIC_API_KEY or OLLAMA_HOST; --ai-provider names another):
prufgate review --aiasks the model to review the whole diff.ai_adjudicate: truein the trusted configuration plus explicitcheck --ai-adjudicateconsent asks one yes/no question per low-confidence finding (mediumtoo if configured): is this real? A local gate can usePRUFGATE_ALLOW_EXTERNAL_AI=1; the Action usesallow_external_ai: 'true'. Configuration alone sends no code. The prompt holds the rule, the finding message and a bounded code window; windows with detected credentials are skipped.
An adjudication verdict can only hide noise. A finding judged not real stops blocking and moves to an "AI-dismissed" list with the model's reason: a section of prufgate check output and of the Markdown report, and a SARIF suppressions entry of kind external (AI-dismissed: <reason>). High-confidence findings are never sent; nothing is ever added or raised. A provider error, a timeout, a reply that is not exactly {"real": true|false, "reason": "..."}, a run over its budget, or code that addresses the judge (a comment naming the AI, LLM, judge, reviewer or PrufGate) keeps the finding as it would be without AI. Verdicts are cached outside the repository. Settings: docs/CONFIGURATION.md.
Documentation
Documentation home: complete user, integration, operation and developer guides
User guide: local scans, adoption policies, dismissals, PR review and evaluation
Installation and upgrading: published releases versus checkout features and matching implementation versions
Developer and PR workflow: GitHub Checks, reviewed dismissals, gradual enforcement and actionable summaries
Detection quality: evaluation provenance, local accuracy dashboard, syntax analysis and cross-file impact
Support matrix: supported checks, limitations, deployment and complementary tools
Scan results, coverage and privacy: common clean/findings/incomplete/error states, explanations, matching integration profiles, and AI destinations
Getting started: install, commands, reports, exit codes
Configuration reference: every key, suppressions, environment variables
The engines: rules, languages and limits
CI and agent integration: GitHub Action, other CI, agent hooks, MCP, REST API
Custom rules: your own ast-grep rules and hooks
Benchmark: measured precision and recall on a labelled corpus, and how to add a case
Contributing and security
Contributions are welcome: see CONTRIBUTING.md and the maintainer guide AGENTS.md. Please report vulnerabilities privately, as described in SECURITY.md.
PrufGate is published by GuardianVigil under the Apache License 2.0. The name and logo are trademarks: see TRADEMARKS.md.
Available Tools
10 toolsprufgate_anti_fabricationCRead-onlyIdempotent
Engine 1: canned fallbacks, simulated return values, stub handlers and other fabricated production logic.
Inputs: base_ref, changed_only, workspace_path.
prufgate_bola_checkBRead-onlyIdempotent
Engine 5: routes and queries without auth or tenant scoping; the live two-token probe runs only when target_url is set.
Inputs: target_url, workspace_path.
prufgate_contract_checkCRead-onlyIdempotent
Engine 4: undeclared or hallucinated imports, undocumented environment variables and frontend/backend route mismatches.
Inputs: base_ref, changed_only, workspace_path.
prufgate_diff_guardCRead-onlyIdempotent
Engine 3: skipped tests, suppression comments, unsafe casts and weakened lint/CI config added in the diff.
Inputs: base_ref, workspace_path.
prufgate_explainARead-onlyIdempotent
What a rule catches, how to fix it, and how to record a false positive. Pass the rule ID a finding names.
Inputs: rule (required).
prufgate_fast_scanARead-onlyIdempotent
Run engines 1-5 (anti-fabrication, test integrity, diff guard, contract guard, static BOLA) on changed files.
Inputs: base_ref, workspace_path.
prufgate_full_scanARead-onlyIdempotent
Run engines 1-5 on the whole workspace plus the diff reviewer; adds the live BOLA probe only when target_url is set.
Inputs: base_ref, target_url, workspace_path.
prufgate_reviewCRead-onlyIdempotent
Engine 6: deterministic review of the diff against base_ref (default: resolved like prufgate check --changed).
Inputs: base_ref, workspace_path.
prufgate_summaryARead-onlyIdempotent
Read the last SARIF/Markdown report written by ./prufgate.sh without running a scan.
Inputs: workspace_path.
prufgate_test_auditCRead-onlyIdempotent
Engine 2: zero-assertion tests, tautologies, self-mocked units and weakened assertions.
Inputs: base_ref, changed_only, workspace_path.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool has a distinct role: individual engines, composite scans, rule explanation, and report reading. There is minor overlap between fast_scan/full_scan and the engine-specific tools, but the descriptions clarify scope as changed files vs whole workspace vs single engine.
All ten tools use the same prufgate_ prefix and snake_case formatting, with no mixed conventions. Whether the name is action-oriented or an engine label, it follows the same predictable namespace pattern.
Ten tools map cleanly to six engines plus aggregate scans, explanation, and summary reporting. The count is well-scoped, with no obvious filler or redundant tools.
The surface covers individual engines 1-6, aggregate scans, rule explanation, and summary report reading. Minor gaps remain around programmatic findings access, false-positive recording, and rule listing, but core scanning workflows are covered.
Maintenance
Related MCP Connectors
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Run verified read-only code tools: quant diagnostics + agent-ops preflight, no source exposure.
Security tools for coding agents: dependency advisory audits and evidence for remediation.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to scan code for security and quality issues and receive machine-readable reports with suggested fixes and verification criteria.80 npm2MIT
- AlicenseAqualityDmaintenanceRead-only MCP tools for coding agents to audit deployment targets, detect fabricated code, review backlog, database schema, analytics, ML models, architecture docs, and decision lenses.1113 npmMIT
- AlicenseNot gradedqualityCmaintenanceExposes repository reconnaissance tools — file listing and verbatim reading, regex search, dependency-tree parsing across Python/Node/Rust/Go, and test-coverage ingestion — so agents can gather line-numbered evidence from real source files. This lets an audit pipeline physically re-verify every claim and drop findings that cannot be located in the code.MIT
- AlicenseBqualityCmaintenanceEnables AI coding agents to perform evidence-based, read-only audits of supported software projects by exposing bounded project inventory and static-analysis findings for discovery, code review, integration tracing, security, and tests. Reports are returned as Markdown or JSON directly in the tool response, with no code executed or files written.817 npmMIT