io.github.sudo-ai-git/mcp-benchmark-hygiene
mcp-benchmark-hygiene
mcp-name: io.github.sudo-ai-git/mcp-benchmark-hygiene
对会静默破坏 agent-benchmark / 函数评分的 pytest 配置泄漏进行确定性检测。
无需 LLM。无需网络。一个问题,可靠回答:
如果我在这个工作区内运行
python -m pytest <tests>,它是否会继承 宿主机上的覆盖率/中止门控,从而将通过的代码误判为失败?
此工具捕获的缺陷
自动化 agent 评估框架通常会在目标工作区内运行 python -m pytest <hidden_tests>。如果该工作区嵌套在带有 pytest addopts 的仓库根目录之下——例如:
[tool.pytest.ini_options]
addopts = "--cov=harness --cov-report=term-missing:skip-covered --cov-fail-under=80"pytest 会将宿主机上的 pyproject.toml 解析为其 rootdir,继承其中的 addopts,并因宿主机自身的覆盖率门控而失败(harness 的覆盖率为 0% → 低于阈值 → 非零退出)。随后,评估框架将功能上 PASSING 的代码记录为 FAILED。
这正是 sudo-ai-git/vulcanbench-findings 中记录的缺陷:VulcanBench 的声明式评分器因此将每个功能任务误评为 0.0;而用 -o addopts= 中和该泄漏后,同样的工作区 10/10 全部通过。
Related MCP server: Debug Companion MCP
它交给你的修复方案
当工作区被标记为 CORRUPTED 时,该工具会返回修正后的命令:
python -m pytest -o addopts= <tests>-o addopts= 会剥离继承而来的覆盖率/中止门控。(或者从仓库根目录之外运行评分器。)
工具
工具 | 用途 |
| 完整分析:ini 链、生效的 addopts、CLEAN/CORRUPTED/UNKNOWN 判定 + 修正后的命令 |
| 轻量布尔: |
| 一行可操作的摘要字符串 |
确定性核心(零依赖)
该分析会从工作区目录向上遍历到文件系统根目录,按 pytest 最先找到的顺序读取 pyproject.toml / pytest.ini / tox.ini / setup.cfg,并提取 addopts。标记项:
覆盖率门控 —
--cov,--cov-fail-under,--cov-report,--cov-config中止/严格门控 —
--maxfail,-x,--strict,--strict-markers,--pdb,--ff
只有会改变退出码/中止评分的门控才会被标记。无害的 addopts 会连同其确切字符串一起报告为 CLEAN。
安装与运行(MCP stdio)
一条命令(推荐)——直接从仓库安装,无需 PyPI token:
uv tool install git+https://github.com/sudo-ai-git/mcp-benchmark-hygiene
mcp-benchmark-hygiene # run stdio server
mcp-benchmark-hygiene --http --port 8137 # or Streamable HTTP或者使用 pipx:pipx install git+https://github.com/sudo-ai-git/mcp-benchmark-hygiene
直接从源码安装(备选方案):
{ "mcpServers": {
"benchmark-hygiene": { "command": "python3", "args": ["/abs/path/to/mcp_server.py"] }
}}需要官方的 mcp Python 包(pip install mcp)。确定性核心(inspect_workspace / check_addopts / summarize)以零依赖即可导入并运行——mcp 包仅用于 stdio 服务器。
Streamable HTTP(远程/可发布到 Smithery)
python3 mcp_server.py --http --port 8137 # serves on http://<host>:8137/mcp/使用 --http 运行,即可通过 Streamable HTTP(远程 MCP 端点)提供服务,而非 stdio。这正是 smithery mcp publish <url> 进行基于 URL 的发布时所期望的传输方式——因此一旦存在 Smithery 服务 token,该服务器即可原样部署。
示例
inspect_workspace(path="/home/runner/vulcanbench/workspace/task-1")
→ {
"ok": true,
"workspace": "/home/runner/vulcanbench/workspace/task-1",
"ini_chain": [{"file": "/home/runner/vulcanbench/pyproject.toml",
"addopts": "--cov=harness ... --cov-fail-under=80"}],
"effective_addopts": "--cov=harness ... --cov-fail-under=80",
"will_corrupt_grading": true,
"verdict": "CORRUPTED",
"fixed_command": ["python3", "-m", "pytest", "-o", "addopts=", "<tests>"],
"reasons": ["coverage gate(s) present: ['--cov', '--cov-fail-under']"]
}验证
python3 test_detector.py— 5/5 项核心检测检查(根门控、嵌套继承、干净、中止门控、pyproject-no-pytest)python3 test_e2e.py— 驱动真实的 MCP stdio 传输(initialize → tools/call),并断言 CORRUPTED / CLEAN 能在线路上完整传递
同系列项目
这是 sudo-ai-git 推出的三个确定性、无 LLM 的 agent 信任 MCP 服务器之一:
mcp-skill-sec— 安装前的技能/安全审计mcp-verify-claim— 以证据为门槛、诚实分级的声明报告mcp-benchmark-hygiene— pytest 配置泄漏 / 评估诚实性检测(本仓库)
许可证与出处
MIT。独立衍生自文档记载的 VulcanBench #79 发现;不暗示获得 morganlinton/VulcanBench 的认可或与其存在关联。
定制集成服务
需要将此连接到你的内部系统(认证、日志、安全扫描通过、托管)?请提交一个 custom-build request。无论采用哪种方式,MIT 参考资产均可免费使用。
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to run and analyze pytest tests for desktop applications through interactive commands. Supports test execution, filtering, result analysis, and debugging for comprehensive test automation workflows.2
- FlicenseDqualityDmaintenanceEnables AI coding agents to debug Python projects by running pytest, extracting failure locations, displaying code context around failures, and optionally requesting fix suggestions from Gemini.6
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to investigate and repair Python/pytest repositories in isolated Git worktrees with audit trails, without modifying the original repository.MIT
- AlicenseNot gradedqualityAmaintenanceLocal-first MCP and coding-agent reliability harness that captures bounded, sanitized failure evidence and generates deterministic executable regression tests. Capture is opt-in; no API key or hosted service is required.2Apache 2.0
Related MCP Connectors
Find your AI agent's likely failure mode, get runtime settings, and clarify ambiguous prompts.
Deterministic pre-execution audit for trading agents. PASS/WAIT/FAIL, reproducible verdict_hash.
Deterministic AI code review, with an audit record. Governance inside the agent loop.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sudo-ai-git/mcp-benchmark-hygiene'
If you have feedback or need assistance with the MCP directory API, please join our Discord server