
Mcp Benchmark Hygiene
io.github.sudo-ai-git由 GitHub 帳號 sudo-ai-git 發布v1.0.1更新於 Oct 24, 2026
Detect pytest config-leakage that corrupts agent-benchmark grading. Deterministic, no-LLM.
概覽
一個在本機執行的確定性 MCP 伺服器,用來檢查 pytest 工作區是否繼承了宿主端的覆蓋率或中止閘門,因而把通過的程式碼誤判為失敗。
- 可以做什麼
- 檢查工作區路徑,沿 pytest 設定鏈(pyproject.toml、pytest.ini、tox.ini、setup.cfg)一路向上查找至檔案系統根目錄,得出實際生效的 addopts,並回傳 CLEAN、CORRUPTED 或 UNKNOWN 結論,損壞時附上修正後的指令。執行輕量布林檢查,回報工作區是否損壞及原因。依分析結果產生一行可執行的摘要。
- 適用情境
- 適用於執行或排查自動化代理評測框架的情境:這些框架在巢狀於帶有自身 pytest 設定的儲存庫下的目標工作區中呼叫 pytest,而你懷疑評分失敗源自繼承的覆蓋率或中止閘門,而非程式碼本身。
- 執行需求
- 以本機 stdio 程序執行,可用 uv 或 pipx 從專案 Git 儲存庫安裝,或以 python3 直接從原始碼啟動。伺服器需要官方 mcp Python 套件;偵測核心本身無相依套件。不需要網路存取、帳號、金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Benchmark Hygiene,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
mcp-benchmark-hygiene
mcp-name: io.github.sudo-ai-git/mcp-benchmark-hygiene
Deterministic detection of pytest config-leakage that silently corrupts agent-benchmark / function grading.
No LLM. No network. One question, answered reliably:
If I run
python -m pytest <tests>inside this workspace, will it inherit a host coverage/abort gate that mis-scores passing code as failed?
The bug this catches
Automated agent-evaluation harnesses often run python -m pytest <hidden_tests>
inside the target's workspace. If that workspace nests under a repo root carrying
pytest addopts — e.g.:
...pytest resolves that host pyproject.toml as its rootdir, inherits the
addopts, and fails on the host's own coverage gate (harness collected at
0% → below threshold → non-zero exit). The harness then records functionally
PASSING code as FAILED.
This is exactly the bug documented in
sudo-ai-git/vulcanbench-findings:
VulcanBench's declarative grader mis-scored every functional task as 0.0 for
this reason; with -o addopts= neutralizing the leak, the same workspaces passed
10/10.
The fix it hands you
When a workspace is flagged CORRUPTED, the tool returns the corrected command:
-o addopts= strips inherited coverage/abort gates. (Or run the grader from
outside the repo root.)
Tools
Deterministic core (no deps)
The analysis walks the workspace directory up to filesystem root, reading
pyproject.toml / pytest.ini / tox.ini / setup.cfg in pytest's
first-found order, and extracts addopts. Flags:
- coverage gates —
--cov,--cov-fail-under,--cov-report,--cov-config - abort/strict gates —
--maxfail,-x,--strict,--strict-markers,--pdb,--ff
Only gates that change exit codes / abort grading are flagged. A harmless
addopts is reported CLEAN with the exact string.
Install & run (MCP stdio)
One command (recommended) — installs from the repo, no PyPI token needed:
Or with pipx: pipx install git+https://github.com/sudo-ai-git/mcp-benchmark-hygiene
Direct from source (fallback):
Requires the official mcp python package (pip install mcp). The deterministic
core (inspect_workspace / check_addopts / summarize) imports and runs with
zero dependencies — the mcp package is only needed for the stdio server.
Streamable HTTP (remote/Smithery-publishable)
Run with --http to serve over Streamable HTTP (a remote MCP endpoint) instead of
stdio. This is the transport smithery mcp publish <url> expects for URL-based
publishing — so once a Smithery service token exists, the server deploys as-is.
Example
Verification
python3 test_detector.py— 5/5 core detection checks (root gate, nested inheritance, clean, abort gate, pyproject-no-pytest)python3 test_e2e.py— drives the real MCP stdio transport (initialize → tools/call) and asserts CORRUPTED / CLEAN thread through the wire
Part of a family
This is one of three deterministic, no-LLM agent-trust MCP servers by sudo-ai-git:
mcp-skill-sec— pre-install skill/security auditmcp-verify-claim— evidence-gated, honestly-tiered claim reportingmcp-benchmark-hygiene— pytest config-leakage / eval-honesty detection (this repo)
Sibling product: mcp-token-saver — token-cost proxy + analyzer for agent conversations (dedupes redundant tokens before they're billed; live-proven 74% cut). Discussion
Also in the family (a free CLI, not an MCP server): harness-audit — deterministic agent-eval / benchmark-grading hygiene audit that catches the same silent config-leakage mis-scoring class. Free lead-magnet; the same verification discipline, zero dependencies, auditable line-by-line.
License & provenance
MIT. Independently derived from the documented VulcanBench #79 finding; no endorsement by or affiliation with morganlinton/VulcanBench implied.
Hire a custom integration
Need this connected to your internal system (auth, logging, security-scan pass, hosted)? Open a custom-build request. MIT reference assets are free to use either way.
來源:README.md,提交 5931318
工具
0版本歷史
1- v1.0.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分