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 分