通过 MCP 协议让 Cursor、Claude Desktop 等 AI 编程工具直接运行 Stryker 变异测试,检查存活变异并自动补充边界测试。
标准代码覆盖率衡量的是执行情况,而非测试强度。AI 编程助手生成数百行单元测试,但往往陷入"乐观路径偏见"。
借助 stryker-mcp-reporter v1.11.0,AI 结对编程工具(Antigravity、Cursor、Claude Desktop、Roo Code、Cline)可以自主执行变异测试、通过模型上下文协议(MCP)检查存活变异体、编写精准的边界用例测试,并达成经核实的 100% 变异分数。
bot: 修复 bot 代码模板中的语法错误(89c2fb7)
bot: 修复 bot 字符串字面量中的语法错误(8fffe4b)
build: 修复 main 上 PredictMutationImpactUseCase 的实例化问题(825ba50)
db: 根据设置可选加载 sqlite-vss(154d0bd)
mcp: 仅在守护进程模式下启动服务器以避免 eaddrinuse(e3b4e63)
test: 更新 daemon 标志的 mcp-reporter 测试(d28a6d6)
bot: 添加 analyze-dependencies 自动生成(6c76d2c)
bot: 添加 bot-feature-1786119322864 自动生成(143d0cc)
bot: 添加 calculate-code-smells 自动生成(b54c8a5)
bot: 添加 compare-branches 自动生成(38660ab)
bot: 添加 create-badge-svg 自动生成(a8df9d3)
bot: 添加 detect-duplicate-code 自动生成(6eeae38)
bot: 添加 export-pdf-report 自动生成(27ecf1d)
bot: 添加 fetch-git-blame 自动生成(3caadb4)
bot: 添加 generate-changelog 自动生成(f85e0be)
bot: 添加 generate-csv-report 自动生成(cbfb0c2)
bot: 添加 integrate-github-issues 自动生成(85ae8ee)
bot: 添加 integrate-jira 自动生成(2ad63f7)
bot: 添加 post-pr-comment 自动生成(ddca4ef)
bot: 添加 send-slack-notification 自动生成(f913ab0)
bot: 添加 send-teams-notification 自动生成(49e4af7)
bot: 添加 track-test-flakiness 自动生成(b25ea3a)
bot: 添加 trigger-webhook 自动生成(ba3c2b1)
bot: 添加 upload-to-gcs 自动生成(0011af6)
bot: 添加 upload-to-s3 自动生成(9087abf)
bot: 添加 validate-coverage-threshold 自动生成(002110b)
core: 添加 export-json(1feb673)
core: 添加 filter-by-branch(bd630a0)
core: 添加 filter-by-status(0827ec6)
core: 添加 search-explorer(9031faa)
core: 添加 sort-explorer-files(8acb1d3)
history: 实现搜索历史逻辑(1556915)
mcp: 添加 detect_equivalent_mutants 工具(c478c01)
mcp: 添加 generate_testing_cheat_sheet 工具(f1490e5)
mcp: 高级 git delta 变异执行(行范围)(44a5c9d)
mcp: 自动化变异体上下文聚合(扩展)(48098ac)
以下是从实际测试执行中直接捕获的未编辑运行时截图:


将以下 JSON 配置块添加到你的 MCP 配置中:
{
"mcpServers": {
"stryker-mutation-testing": {
"command": "npx",
"args": ["-y", "--silent", "stryker-mcp-reporter"]
}
}
}
(Windows 用户:使用 "command": "cmd.exe" 和 "args": ["/c", "npx", "-y", "--silent", "stryker-mcp-reporter"])。
在 GitHub 上查看完整开源项目:https://github.com/kluth/stryker-mcp-reporter