# AdversaryGate [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/Sanflow10/adversary-gate  
**GitHub Stars:** 4  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/adversarygate

## Description
Fail-closed merge gate an agent calls before saying done: MERGE, BLOCK or INCONCLUSIVE.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "adversarygate": {
    "command": "uvx",
    "args": ["adversary-gate-mcp"]
  }
}
```

## Documentation

## What the AdversaryGate MCP server does

The AdversaryGate MCP server acts as a verification gate for AI coding workflows. It examines a baseline and a patch, runs relevant tests, and emits one of three decisions: `MERGE`, `BLOCK`, or `INCONCLUSIVE`. The design treats uncertainty as a distinct result rather than converting missing evidence into a pass.

A merge requires all evaluated claims to pass, the full repository suite to pass on the patch, measured diff coverage of at least 80%, and sufficient suite strength when that metric can be calculated. A failing claim or a collateral regression produces `BLOCK`. Harness errors, missing measurements, weak tests, and a baseline that was already failing produce `INCONCLUSIVE`.

## How it works

The gate uses a baseline-versus-patch model. Tests that existed on the baseline are restored when needed so the patch cannot change its own oracle. This protection also applies to test helpers and declared test-support paths. When a patch changes an existing test file, the collateral suite can run the baseline version against the new code as well.

Evidence classifications distinguish a test that failed before and passes after the patch (`fixed`) from one that passes on both sides (`no_regression`) or a newly added test (`discarded`). The resulting evidence records whether a claimed fix was actually proven. Decision precedence is `BLOCK`, then `INCONCLUSIVE`, then `MERGE`, so direct failure outranks missing evidence.

## Setup and configuration

Install the package with pip:

```bash
pip install adversary-gate
```

The gate is intended for Python/pytest repositories. For another stack, provide a `--test-command`; the command can be run, but the resulting decision remains `INCONCLUSIVE` rather than `MERGE`.

Coverage evidence must be measured to clear the coverage requirement. The documented demonstration uses diff and coverage JSON inputs, with both artefacts hashed using SHA-256. The repository also includes a demonstration script that runs three scenarios as subprocesses and checks their exit codes.

## Tools and capabilities

The AdversaryGate MCP server supports these documented capabilities:

- Run the repository’s test harness against baseline and patch states.
- Detect failed claims, collection errors, syntax errors, missing files, timeouts, and other unverified harness results.
- Require measured diff coverage and evaluate suite strength before allowing a merge.
- Protect baseline tests, helpers, and configured test-support files from being replaced by the patch under review.
- Report structured evidence, including test outcome classifications, `claims_fixed`, `fix_proven`, and oracle information.
- Return process outcomes that distinguish mergeable, blocked, and not-yet-verifiable work.

## Limitations and notes

AdversaryGate MCP server coverage is explicitly strongest for Python/pytest repositories. Other language stacks may execute their test command but cannot receive `MERGE` according to the provided documentation. `INCONCLUSIVE` is an intentional safety result and uses exit code 2, allowing CI to treat the work as not ready rather than as a successful run.

The provided material does not document a transport, named MCP client, environment variables, or a separate configuration service. It also does not establish that every test framework or repository layout is supported. A legitimate behavior change that rewrites existing tests may be blocked because the baseline tests are treated as the contract requiring human review.

_Full upstream README: https://allmcps.com/mcp/adversarygate/readme_

