AdversaryGate logo

AdversaryGate

Verifies Python patches against a Git baseline with tests, coverage, claims, and mutation testing before merge decisions.

Install AdversaryGate

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "adversarygate": {
      "command": "uvx",
      "args": [
        "adversary-gate-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Claude Code command
claude mcp add --transport stdio adversarygate -- uvx adversary-gate-mcp

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

uvx adversary-gate-mcp

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

AdversaryGate MCP server verifies changes in Git repositories and returns MERGE, BLOCK, or INCONCLUSIVE decisions. Its verify_repo tool compares the working tree with a baseline, runs Python/pytest tests under coverage, checks claims, and mutation-tests changed lines. gate_policy exposes the configured floors, baseline, interpreter, and caller-controlled options before verification. Use it after an agent edits code and before reporting the task complete.

Use cases

  • Verify an agent-written Python patch before reporting completion
  • Compare a working tree with a pinned Git baseline
  • Check whether named pytest claims detect changed behavior
  • Find surviving mutants in newly changed lines
  • Explain an inconclusive or blocked merge decision

Key features

  • Fail-closed MERGE, BLOCK, or INCONCLUSIVE decisions
  • Baseline-versus-working-tree verification
  • pytest execution with coverage.py
  • Claim verification using pytest node IDs
  • Mutation testing of changed lines
  • Policy inspection through environment-backed settings

Tools2

What AdversaryGate lets your agent do. Expand a tool for its parameters.

Verified live~946 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 48d

What it can do

From the 2 tools this server returned when we ran it; 2 declare their own safety hints.

Runs commands · 1Can delete or modify data · 1Makes network requests · 1Read-only tools · 1
Network at startup2 connections
Files written at startup10

Observed 2026-10-30 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · adversary-gate-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
Last commit13d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Tools exposed2Callable tools this server registers over MCP.

How AdversaryGate works

What AdversaryGate does

AdversaryGate is a fail-closed verification gate for Python repositories using pytest. It evaluates an agent's working-tree changes against a Git baseline and produces one of three outcomes: MERGE, BLOCK, or INCONCLUSIVE. MERGE indicates that the configured checks cleared and permits human review; it is not a release approval. BLOCK indicates that the code or its verification evidence failed. INCONCLUSIVE means that a required measurement was not established.

The gate considers more than whether the test suite exits successfully. It evaluates claims, checks coverage of changed lines, examines the strength of the test evidence, and mutation-tests the lines changed by the patch. Tests rewritten by the patch are judged using the baseline version as the oracle. Nothing is committed or reverted.

How it works

Call gate_policy before verify_repo when you need to inspect the verification contract. This read-only tool reports the configured policy floors, baseline selection, Python interpreter, operator flags, defaults, and the arguments the caller may choose. Policy values come from the server environment and cannot be changed through an MCP tool.

verify_repo accepts a repository path, optional pytest paths or node IDs, claims, and a baseline reference when the operator has not pinned one. It writes the baseline tree, compares it with the working tree, and includes uncommitted and untracked changes in the comparison. The coverage run uses the repository as its working directory; temporary gate files are removed afterward.

Claims can be supplied as pytest node IDs such as tests/test_auth.py::test_expiry. If claims are empty, the server can discover tests that executed changed lines when the relevant coverage contexts are available. The result includes per-claim outcomes and the oracle used, diff coverage, suite strength, a reason, next steps, and the full artefact.

Setup and configuration

Install the Python package with:

Terminal
pip install adversary-gate coverage

Run the MCP server in an environment where it can access the target Git repository and execute its tests. The repository should contain the agent's changes in the working tree. New files may need to be visible to Git for the diff, for example by using git add -N.

Operators configure policy through ADVERSARY_GATE_POLICY, ADVERSARY_GATE_BASE_REF, and ADVERSARY_GATE_PYTHON. The policy determines the floors and other verification settings, while the base-ref variable can pin the comparison baseline and the Python variable selects the interpreter. gate_policy reports the resulting configuration and returns an error for an invalid operator policy.

Tools and capabilities

  • gate_policy: Shows the active floors, baseline behavior, interpreter, operator flags, defaults, and caller controls without running tests.
  • verify_repo: Runs the verification process and returns a merge decision with evidence and remediation steps.
  • Executes the repository's pytest suite under coverage.py.
  • Checks claims against the baseline and patch, including baseline copies of rewritten tests.
  • Mutation-tests changed lines to assess whether the named tests detect relevant regressions.
  • Includes uncommitted and untracked working-tree changes in the patch evaluation.

Limitations and notes

Python and pytest repositories are the supported measured target. Changes in other languages are returned as INCONCLUSIVE rather than MERGE. Test execution runs repository code and can have the same side effects as running pytest directly.

Verification can take minutes. A run exceeding timeout_seconds returns INCONCLUSIVE, never a pass; the response identifies the limit that should be raised. Where bubblewrap is unavailable, tests run without that sandbox and retain the surrounding network and file access. The gate does not ask callers to edit existing tests, harness files, or verification floors, and changing those does not provide merge evidence.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about AdversaryGate

AdversaryGate is an MCP server that connects AI agents to Git repositories for fail-closed Python verification. Its main tools, verify_repo and gate_policy, run and assess pytest coverage, claims, baseline comparisons, and mutation testing, then expose MERGE, BLOCK, or INCONCLUSIVE results with evidence and next steps.

Install the package with `pip install adversary-gate coverage`. The package also provides the `adversary-gate` command-line interface; the MCP server must run in an environment with access to the repository and its Python test tooling.

AdversaryGate measures Python repositories that use pytest. Changes in other languages may have their suites run through the broader tooling, but the MCP verification result is INCONCLUSIVE rather than MERGE.

AdversaryGate returns INCONCLUSIVE when a required measurement was not established, including a run that exceeds `timeout_seconds`, unsupported-language changes, insufficient evidence, or a change too small to measure at the configured floor. The response explains the reason and lists next steps.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAdversaryGate AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/adversarygate?style=directory)](https://allmcps.com/mcp/adversarygate)
HTML Embed
<a href="https://allmcps.com/mcp/adversarygate"><img src="https://allmcps.com/api/badge/adversarygate?style=directory" alt="AdversaryGate on AllMCPs" /></a>