プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

AdversaryGate

作者:Sanflow10バージョン 3.0.17i★ –iパソコンで動く
レジストリ名io.github.Sanflow10/adversary-gate

インストール

概要

作者による説明(英語の原文)

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

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: その他

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • 自分で入力するもの: ADVERSARY_GATE_BASE_REF, ADVERSARY_GATE_REQUIRE_PINNED_BASE, ADVERSARY_GATE_PYTHON, ADVERSARY_GATE_POLICY

必要なもの

  • PyPIPythonのuvのインストール(uvxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "adversary-gate": {
      "command": "uvx",
      "args": [
        "adversary-gate-mcp"
      ],
      "env": {
        "ADVERSARY_GATE_BASE_REF": "your-value",
        "ADVERSARY_GATE_REQUIRE_PINNED_BASE": "your-value",
        "ADVERSARY_GATE_PYTHON": "your-value",
        "ADVERSARY_GATE_POLICY": "your-value"
      }
    }
  }
}

ターミナルでこれを実行します

claude mcp add adversary-gate --env ADVERSARY_GATE_BASE_REF=your-value --env ADVERSARY_GATE_REQUIRE_PINNED_BASE=your-value --env ADVERSARY_GATE_PYTHON=your-value --env ADVERSARY_GATE_POLICY=your-value -- uvx adversary-gate-mcp

動かす前に、空欄の値を入力してください。

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "adversary-gate": {
      "command": "uvx",
      "args": [
        "adversary-gate-mcp"
      ],
      "env": {
        "ADVERSARY_GATE_BASE_REF": "your-value",
        "ADVERSARY_GATE_REQUIRE_PINNED_BASE": "your-value",
        "ADVERSARY_GATE_PYTHON": "your-value",
        "ADVERSARY_GATE_POLICY": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "adversary-gate": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "adversary-gate-mcp"
      ],
      "env": {
        "ADVERSARY_GATE_BASE_REF": "your-value",
        "ADVERSARY_GATE_REQUIRE_PINNED_BASE": "your-value",
        "ADVERSARY_GATE_PYTHON": "your-value",
        "ADVERSARY_GATE_POLICY": "your-value"
      }
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

自分で入力する値

  • ADVERSARY_GATE_BASE_REF env
    Baseline git ref (e.g. origin/main). Unset, the agent may pick it, and whoever picks the baseline picks the oracle
  • ADVERSARY_GATE_REQUIRE_PINNED_BASE env
    Set to 1 to refuse any run without ADVERSARY_GATE_BASE_REF, so the agent can never choose the baseline (the oracle)
  • ADVERSARY_GATE_PYTHON env
    Interpreter that runs the tests; must be one the agent cannot write to
  • ADVERSARY_GATE_POLICY env
    Extra gate flags set by the operator; evidence flags are refused

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月7日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント Sanflow10 で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

その他のほかのサーバーとの比較i

  • このカテゴリのほかの32684件のうち0%よりスターが多い
  • このカテゴリのほかの32684件のうち76%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの32684件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

AdversaryGateは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(3.0.17)がレジストリに届いたのは11 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。

代わりに使えるものは?

同じカテゴリには:Spec Driven Development, Remote Desktop Commander, Master CSS

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

クラウドで動く★ 211一昨日更新
インストール

Master CSS

作者:master-co

Inspect Master CSS classes, generated CSS, and project stylesheets from your AI client.

パソコンで動く今日更新
インストール

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

AdversaryGate

High AI usage ≠ high confidence. The cost of an agentic coding pipeline is

not the model's intelligence — it is the pipeline's self-deception.

A fail-closed verification gate for patches written by AI coding agents. It runs your tests on the baseline and on the patch, mutation-tests only the lines the patch wrote, and answers MERGE, BLOCK or INCONCLUSIVE — where uncertainty is a first-class result instead of a silent approval. CLI, GitHub Action and MCP server.

Python only, for now. It measures Python/pytest repositories; on other stacks it runs your suite via --test-command but answers INCONCLUSIVE, never MERGE — see Language support.

pip install adversary-gate

🎬 Watch it decide (60 seconds)

B and C are the same patch. Same code, same tests, same execution. The only difference is that C brought evidence (--diff + --coverage-json); B brought none.

PatchCoverage evidenceDecisionExit
Abreaks the testdeclared untrustedBLOCK1
Bcleannone — never measuredINCONCLUSIVE2
Ccleanmeasured, both artefacts SHA-256'dMERGE0

That middle row is the whole product. An unproduced measurement is not a measurement, so it cannot clear a floor — and a number nobody can re-derive is an opinion with a false precision label.

python3 demo/demo.py          # runs the three scenarios; exits non-zero if one regresses

python3 demo/render_gif.py # rebuilds demo/demo.gif from the captured frames

demo/demo.py is an acceptance test, not a screenshot: it builds the fixtures, runs the real CLI as a subprocess, reads the real exit codes, and fails if any of the three decisions changes. Its evidence artefacts are checked in under demo/out/.

`INCONCLUSIVE` is not an error. It is the gate saying *"I did not measure that"*, and it is exit 2 so CI treats it as "do not merge yet", not as "pass". See How diff_coverage gets its value for the one-step path from INCONCLUSIVE to MERGE.


🚀 Quick Start (CLI & GitHub Action)

First run, in one minute

From the root of a git repository whose agent's change sits on top of main (new files tracked: git add -N them), with pip install adversary-gate coverage:

BASE=main                                         # the commit before the agent's change

W=$(mktemp -d) git worktree add -q "$W/before" "$BASE" # the baseline, exactly as committed git diff --no-ext-diff "$BASE" > "$W/changes.diff" # baseline -> your working tree coverage run -m pytest -q && coverage json -q -o "$W/coverage.json" adversary-gate --baseline "$W/before" --patch . \ --claim tests/test_shop.py::test_discount_never_negative \ --diff "$W/changes.diff" --coverage-json "$W/coverage.json" > "$W/answer.json" echo "exit $?" # 0 MERGE, 1 BLOCK, 2 INCONCLUSIVE python -c "import json,sys; a=json.load(open(sys.argv[1])); print(a['decision'], '-', a['reason'])" "$W/answer.json" git worktree remove --force "$W/before"

Replace the --claim with the test that proves your fix (path::test). On a correct one-line fix, expect this first answer:

exit 2

inconclusive - every claim held and the fix is proven, but suite strength's lower bound is 0.38, below the 0.75 floor (1/1 mutants killed): the change is too small to measure at this floor, which takes at least 5 killed mutants; see next_steps

That is not a failure: the fix *is* proven, and the gate says plainly that it could not measure how strong the tests are on a change this small. See Small changes.

Command-Line Usage
adversary-gate \

--baseline /path/to/before \ --patch /path/to/after \ --test-path tests/test_auth.py \ --test-id test_token_expiry \ --diff changes.diff \ --coverage-json coverage.json \ --model "${AGENT_MODEL_NAME}" \ --evidence-log evidence.jsonl \ --report

Produce the two artefacts in your own pipeline, for example:

git diff --no-ext-diff baseline...patch > changes.diff

coverage json -o coverage.json # after: coverage run -m pytest

Which tests? Name several, or let coverage say

One run verifies any number of claims, and the decision is over all of them (one REFUTED blocks; one UNVERIFIED makes it INCONCLUSIVE):

adversary-gate ... --test-path tests/test_auth.py --test-id test_expiry --test-id test_refresh

adversary-gate ... --claim tests/test_auth.py::test_expiry --claim tests/test_api.py::TestLogin::test_ok

Or name none, and let the gate verify the tests that executed a changed source line — read from coverage.py's per-test contexts, not guessed:

printf '[run]\ndynamic_context = test_function\n' > contexts.coveragerc

coverage run --rcfile=contexts.coveragerc -m pytest coverage json --show-contexts -o coverage.json adversary-gate --baseline before --patch after \ --diff changes.diff --coverage-json coverage.json --discover-claims

A test file the patch rewrote is still picked, and judged with the baseline's copy of it (the baseline oracle, above); it is named under discovery (rewritten_test_files_judged_by_baseline), next to anything that could not be resolved to a node id, and the cap (--max-claims, default 10) with how many it cut. From 3.0.9 a cut test is not left unjudged: with the full suite off (--full-suite-path ""), a patch whose kept claims would merge is INCONCLUSIVE instead, and the reason says to raise the cap or run the suite. A report recorded without contexts is a usage error (exit 3), not "no tests".

Your project's interpreter, its limits, its environment
adversary-gate ... --python .venv/bin/python \

--timeout 120 --cpu-seconds 60 --memory 2G \ --pass-env PATH --env PYTEST_DISABLE_PLUGIN_AUTOLOAD=1

FlagDefault
--pythonthe gate's ownthe interpreter pytest runs on — the one your dependencies are in
--timeout30wall-clock seconds per claim or mutant run; none removes it
--cpu-seconds10CPU seconds per claim or mutant run; none removes it
--full-suite-timeout900wall-clock seconds for the collateral full-suite run
--full-suite-cpu-secondsnoneCPU seconds for the collateral full-suite run
--full-suite-memory4G; none on Androidaddress space for the collateral full-suite run
--memory512M; none on Androidaddress space per run (K/M/G); none — the JVM and Node cannot start under one
--pass-env NAME—copy a variable into the runs (they start from a minimal environment)
--env NAME=VALUE—set one
--serial-sidesoffrun the baseline and patch sides of a check one after the other instead of together, and the full suite after the claims and mutants instead of alongside the claims; forces --mutation-workers 1 (small machines; tests that share a fixed /tmp path or a port). The mutants never run beside the suite either way (AG-043)
--mutation-workers N1mutants at once, each on its own copy of the tree. Only for claims that share nothing outside the repository: two runs that meet on the same /tmp path, port or test database make one of them fail, and a failing run counts as a killed mutant (AG-043). Not with --census-min-mutants

The same choices apply to every run — claims, mutants and the collateral suite — except time and memory: the whole suite gets its own limits, because ones sized for a single test killed every suite of real size on both sides (out of time, or pytest dying with MemoryError under 512M of address space): never a MERGE (two failing sides are unverifiable), but the regression the suite would have caught came back INCONCLUSIVE instead of BLOCK (AG-033). The output records them under execution, with the names of the variables and never their values. A run the memory limit killed (MemoryError, Fatal process out of memory, Could not reserve enough space…) is reported as the harness dying, not as a failing test: it says nothing about the patch.

Not a pytest suite, or running a patch you have not seen?
# 1. run your own command instead of pytest (any language, any runner)

adversary-gate --baseline before --patch after \ --test-path run_tests.sh --test-command "./run_tests.sh"

2. wrap every run in bubblewrap: no network, private PID//tmp,

read-only system, only the repo writable

adversary-gate ... --sandbox bwrap

3. both together -- the usual shape for a patch from someone else

adversary-gate ... --test-command "make check" --sandbox bwrap \ --require-network-isolation

--test-command needs no --test-id (there are no node IDs to name), and it feeds the collateral full-suite run too unless you pass --full-suite-command. --sandbox bwrap needs bubblewrap installed and refuses to start without it — see Execution boundary for exactly what it does and does not contain.

Exit Codes for CI Integration:

  • 0 — `MERGE`: Every claim executed cleanly and cleared coverage & suite strength floors.
  • 1 — `BLOCK`: Regressions or collateral suite failures detected.
  • 2 — `INCONCLUSIVE`: Infrastructure error, missing test, missing coverage evidence, or weak suite (blocks merge).
  • 3 — `USAGE_ERROR`: Bad arguments, malformed JSON, or a coverage claim that was not declared as untrusted.

GitHub Action Integration (action.yml)

One ref in. base-sha derives the baseline, the diff and the coverage report itself, so the first thing you install is not a INCONCLUSIVE:

name: Verification Gate

on: [pull_request]

jobs: verify-agent-patch: runs-on: ubuntu-latest steps:

base-sha is a commit in history: this is not optional.

  • uses: actions/checkout@v4 with: fetch-depth: 0

Your Python, your dependencies -- the tests run here.

  • uses: actions/setup-python@v5 with: python-version: '3.11'
  • run: pip install -r requirements.txt pytest coverage
  • name: Run AdversaryGate uses: Sanflow10/adversary-gate@v3 with: base-sha: ${{ github.event.pull_request.base.sha }} evidence-log: 'evidence.jsonl'

No test is named: the Action records coverage per test and verifies the tests that executed the lines the pull request changed. Name them yourself with claims (one path::test per line) or test-path + test-id (one id per line); either one turns discovery off unless discover-claims: 'true'.

Any non-zero exit fails the step, and that is the safe default. BLOCK (1), INCONCLUSIVE (2) and a usage or harness error (3/4) all turn the check red. Do not add continue-on-error and stop there: that lets a BLOCK through along with everything else. If some pull requests are INCONCLUSIVE by nature (a change to C++ or SQL, which the gate runs but cannot measure), keep the step from failing and branch on the exit-code output instead (2.13.0 and later):

      - name: Run AdversaryGate

id: gate uses: Sanflow10/adversary-gate@v3 continue-on-error: true with: base-sha: ${{ github.event.pull_request.base.sh

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く