Verdict Mcp

io.github.Dgotlieb由 GitHub 帳號 Dgotlieb 發布v0.1.0a4更新於 Oct 24, 2026

Sandboxed test runs for coding agents: compact typed verdicts with failure fingerprints and history

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為編碼代理在沙箱中執行 Python 測試、lint 與型別檢查,回傳帶失敗指紋與歷史紀錄的精簡型別化結論。

可以做什麼
在隔離容器中執行受變更影響的 pytest 測試,回傳帶指紋與 preexisting 標記的型別化失敗,或以 scope all 強制完整執行。依需求取得單一失敗的完整 traceback。查詢指紋的首次出現、最近出現與出現次數,區分回歸與長期存在的失敗。執行 ruff 與 mypy 檢查,並正規化為同一結論結構。
適用情境
適用於編碼代理在 Python/pytest 儲存庫中驗證變更時,希望取得簡短的結構化結果而非大量原始測試輸出,並能區分新引入的回歸與原本就存在的失敗。
執行需求
以 verdict-mcp 套件透過 stdio 在本機執行(uvx、uv tool install 或 pip install)。需要 Python 與容器執行環境,優先 podman,退回 docker;沒有容器執行環境時需明確設定本機退回模式。VERDICT_PROJECT 指定專案路徑,預設為目前工作目錄。選用的 verdict.toml 可設定套件、執行映像、安裝指令與限制。
安裝前請注意
測試執行會執行程式碼;沙箱以唯讀方式掛載工作區並在檢查時停用網路,但設定的 setup_cmd 會在檢查前連網執行。本機退回模式針對工作區的暫存副本執行,而非容器。影響選擇是近似的,可能漏掉動態匯入或資料驅動的測試。目前僅支援 Python/pytest。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Verdict Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

verdict

https://github.com/user-attachments/assets/62923912-98aa-4246-8bc8-4adf55ae3ff8

[CI] [PyPI] [Python] [License]

Structured, sandboxed verification feedback for coding agents.

An MCP server that replaces your agent's pytest shell-outs with something built for the agent inner loop: impact-selected tests, run in an isolated environment, returning compact typed verdicts instead of 40,000 tokens of raw runner output — with failure fingerprints that tell the agent whether a failure is its regression or was broken all along.

raw pytest dump:  ~40,000 tokens, unstructured, run un-sandboxed on your machineverdict:              ~400 tokens, typed JSON, run in a rootless container, with memory

Why

The highest-frequency tool call in agentic coding is verification — and it's the least structured. Agents re-run whole suites when one module changed, burn context parsing ANSI-coded tracebacks, run arbitrary code directly on your machine, and routinely misdiagnose pre-existing breakage as their own regression (then "fix" code that wasn't broken). verdict fixes all four.

Tools

ToolWhat it does
verify(scope?, base?)Selects tests affected by your working-tree diff (static import graph via grimp), runs them via podman/docker with the worktree mounted read-only, returns typed failures with fingerprints and a preexisting flag
explain_failure(check_id)Full traceback for one failure, on demand — bulk never rides in the summary
history(fingerprint)First seen / last seen / times seen — regression vs. long-standing breakage
run_checks(["ruff","mypy"])Lint and type checks, normalized into the same verdict schema

Every failure carries a fingerprint: a stable hash of the normalized failure signature (volatile tokens — addresses, tmp paths, ids, durations — collapsed). Same logical failure, same fingerprint, across runs and refactors. Fingerprints are what give verdict memory.

Quickstart

No install step needed — uvx fetches it on first use. (Or uv tool install verdict-mcp / pip install verdict-mcp for a permanent verdict-mcp command.)

Claude Code — .mcp.json in your project root:

json
{  "mcpServers": {    "verdict": {      "command": "uvx",      "args": ["verdict-mcp"],      "env": { "VERDICT_PROJECT": "." }    }  }}

Cursor — same shape in .cursor/mcp.json.

Optional verdict.toml in your repo root:

toml
[project]packages = ["your_package"]          # for impact selection (auto-guessed if omitted)
[runner]image = "ghcr.io/you/yourproj-test"  # prebuilt env with your depssetup_cmd = "pip install -e .[test]" # or install on the fly (runs with network; tests don't)# prefer = "local"                   # escape hatch if you have no container runtime
[limits]max_failures = 10

Try it without an agent:

bash
cd examples/demo_projectVERDICT_PROJECT=. verdict-mcp   # then connect any MCP client, or use the MCP inspector

Sandbox posture (v0.1)

Checks run in an ephemeral container (podman preferred, docker fallback): worktree mounted read-only at /src, copied to a writable /work inside the container, --network=none for the check run. Your host environment is never mutated by a test run. If setup_cmd is configured, that step runs with network before the check; prefer a prebuilt image for a tighter posture. No container runtime → explicit prefer = "local" fallback runs checks against a temp copy of your worktree (still never in place). See SECURITY.md for the full threat model and known limitations.

Troubleshooting: if a verdict says container engine 'podman' could not start the check, run the suggested podman pull <image> by hand — the engine's own error is the answer. One known trap on macOS: a "credsStore": "gcloud" line in ~/.docker/config.json makes podman call the gcloud credential helper for every registry, including docker.io; an expired gcloud login then breaks all pulls. Fix with gcloud auth login or remove that line.

Honest limitations

  • Impact selection uses the static import graph — approximate by design. Dynamic imports, fixture-by-name resolution, and data-driven tests can be missed; verify(scope="all") is always available and verdict says in selection_note whenever it falls back.
  • Python/pytest only today, plus ruff/mypy. The adapter interface is small and documented — vitest and go test -json adapters are the most-wanted contributions (CONTRIBUTING.md).
  • Flake detection and coverage-map-based selection are v0.2 (roadmap).

Roadmap

v0.2: coverage-based impact maps (precise selection), flake detection via fingerprint alternation, devcontainer.json support, result cache keyed on (tree hash, check, image digest). Later: vitest/jest, go test, cargo test adapters; per-repo verdict daemon mode.

License

Apache-2.0

來源:README.md,提交 aea7c65

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.0a4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分