Spec Driven Development
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
作者提供的说明(英文原文)
MCP server for .NET coverage: run tests, parse Cobertura, find uncovered branches, append tests.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
COVERAGE_MCP_ALLOWED_ROOT, COVERAGE_MCP_DOTNET_TEST_TIMEOUT_MS你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"dotnet-coverage": {
"command": "dnx",
"args": [
"dotnet-coverage-mcp",
"--yes"
],
"env": {
"COVERAGE_MCP_ALLOWED_ROOT": "your-value",
"COVERAGE_MCP_DOTNET_TEST_TIMEOUT_MS": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add dotnet-coverage --env COVERAGE_MCP_ALLOWED_ROOT=your-value --env COVERAGE_MCP_DOTNET_TEST_TIMEOUT_MS=your-value -- dnx dotnet-coverage-mcp --yes运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"dotnet-coverage": {
"command": "dnx",
"args": [
"dotnet-coverage-mcp",
"--yes"
],
"env": {
"COVERAGE_MCP_ALLOWED_ROOT": "your-value",
"COVERAGE_MCP_DOTNET_TEST_TIMEOUT_MS": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"dotnet-coverage": {
"type": "stdio",
"command": "dnx",
"args": [
"dotnet-coverage-mcp",
"--yes"
],
"env": {
"COVERAGE_MCP_ALLOWED_ROOT": "your-value",
"COVERAGE_MCP_DOTNET_TEST_TIMEOUT_MS": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
COVERAGE_MCP_ALLOWED_ROOT envCOVERAGE_MCP_DOTNET_TEST_TIMEOUT_MS env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 Hyeonu-Cha 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.1.1)于6个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 .NET。
同一分类中有:Spec Driven Development, Remote Desktop Commander, Hunter Killer
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Liquidation walls, snapshot age, evidence labels and a public record. Managed OAuth.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
An MCP (Model Context Protocol) server that gives AI assistants — Claude Code, Gemini CLI, and others — direct access to .NET test-coverage tooling. Run dotnet test, parse Cobertura XML, identify uncovered branches, diff coverage between runs, and append test code — all over stdio.
This server lets an AI assistant run unit tests, collect coverage data, and analyse results — all without leaving the chat. Instead of manually running dotnet test and parsing reports, the AI can call the server's tools directly to:
The server starts as a console process and communicates over stdio using the MCP protocol. An MCP-compatible client (Claude Code, Gemini CLI, etc.) launches the process and calls its tools as if they were functions.
AI Client <--stdio/MCP--> dotnet-coverage-mcp <--shell--> dotnet test + reportgenerator
| Tool | Description |
|---|---|
GetSourceFiles | Discover .cs files from a file, folder, or .csproj project. Returns file metadata (lines, method count) and smart batches grouped by lineBudget. |
RunTestsWithCoverage | Run dotnet test with XPlat Code Coverage, generate a JSON summary via reportgenerator. Returns paths to Summary.json and coverage.cobertura.xml. Supports forceRestore and sessionId for concurrent isolation. |
GetCoverageSummary | Parse Summary.json into structured class/method coverage data sorted worst-first by branch coverage. Optional belowTarget/topN/methodsPerClass filters trim the response to what still needs work. |
GetFileCoverage | Get coverage for a single source file from Cobertura XML. Returns allMeetTarget (true when all classes meet the configured targetRate for both line and branch coverage; default 0.8). Supports sessionId. |
GetUncoveredBranches | Find uncovered branch conditions for methods matching a given name. Returns all matching methods with partial name support. Supports sessionId. |
GetCoverageDiff | Compare current Cobertura XML against baseline. Shows method-level changes including new and removed methods. Supports sessionId for concurrent isolation. |
AppendTestCode | Insert or append C# test code into a test file. Supports anchor-based insertion with whitespace-tolerant fallback matching. Uses atomic writes to prevent file corruption. |
CleanupSession | Remove session state files and TestResults/coveragereport directories. Pass sessionId to scope, or omit to clean artifacts older than maxAgeMinutes (default 120). |
For projects with many source files, the recommended workflow is:
GetSourceFiles on a folder or .csproj to get all files and smart batchesRunTestsWithCoverage with a broad filter (e.g., *) to collect coverage across all filesGetFileCoverage for each file in the current batch (instant XML parsing, no test re-run)GetUncoveredBranches for eachAppendTestCode to add test methodsGetCoverageDiff to verify improvementThis minimises dotnet test invocations (the main bottleneck) while still tracking per-file progress.
Multiple AI agents can run in parallel by passing a sessionId to each tool call, which isolates their coverage artifacts:
RunTestsWithCoverage creates TestResults-{hash}/ and coveragereport-{hash}/ per session, preventing one agent from deleting another's XML mid-parse.mcp-coverage/.coverage-state-{hash}, so ResolveCoberturaPath resolves to the correct XML for each sessionGetCoverageDiff stores baselines as .coverage-prev-{hash}.xml per sessionLimitation — build outputs are not session-scoped.
sessionIdisolates coverage *artifacts*, not the .NET *build*.dotnet testcompiles the target project into its sharedobj/andbin/, which are not per-session, so two agents runningRunTestsWithCoverageagainst the same test project at the same time collide on those outputs and fail withbuildError(e.g.CS2012: the file is being used by another process). Run parallel agents against different test projects, or on separate working copies of the repo. Multiple agents on one project are fine as long as theirdotnet testbuilds don't overlap.
Without sessionId, tools use shared defaults — safe for single-agent use.
pathNotAllowed. When unset, the server logs a warning once and accepts any path (backward-compatible, but not recommended for shared environments). export COVERAGE_MCP_ALLOWED_ROOT=/path/to/your/repo
Install the server as a global .NET tool from NuGet:
dotnet tool install --global dotnet-coverage-mcp
The server depends on the reportgenerator global tool to render coverage reports — install it too:
dotnet tool install --global dotnet-reportgenerator-globaltool
After install, the dotnet-coverage-mcp command is on your PATH.
cd <path-to-dotnet-coverage-mcp>
dotnet restore
dotnet build
dotnet run
The server will start and wait for MCP messages over stdin/stdout.
After installing the global tool (dotnet tool install --global dotnet-coverage-mcp), register the server with your MCP client. Set COVERAGE_MCP_ALLOWED_ROOT to the repository you want the server to operate on.
claude mcp add coverage --env COVERAGE_MCP_ALLOWED_ROOT=/path/to/your/repo -- dotnet-coverage-mcp
Add to claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": { "coverage": { "command": "dotnet-coverage-mcp", "env": { "COVERAGE_MCP_ALLOWED_ROOT": "/path/to/your/repo" } } } }
Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per-project):
{
"mcpServers": { "coverage": { "command": "dotnet-coverage-mcp", "env": { "COVERAGE_MCP_ALLOWED_ROOT": "/path/to/your/repo" } } } }
Add to .vscode/mcp.json:
{
"servers": { "coverage": { "type": "stdio", "command": "dotnet-coverage-mcp", "env": { "COVERAGE_MCP_ALLOWED_ROOT": "/path/to/your/repo" } } } }
To run from source instead of the global tool, use dotnet run:
{
"mcpServers": { "coverage": { "command": "dotnet", "args": ["run", "--project", " "], "transport": "stdio" } } }
Or point directly at the compiled executable:
{
"mcpServers": { "coverage": { "command": " \\bin\\Debug\\net9.0\\DotNetCoverageMcp.exe", "transport": "stdio" } } }
GetSourceFiles| Parameter | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Path to a .cs file, folder, or .csproj project |
lineBudget | int | No | Max total lines per batch (default: 300). Small files are grouped together; large files get their own batch. |
RunTestsWithCoverage| Parameter | Type | Required | Description |
|---|---|---|---|
testProjectPath | string | Yes | Full path to the .csproj test project |
filter | string | Yes | Test filter string (matched against FullyQualifiedName). Use * or , for broad runs across multiple test classes. |
workingDir | string | No | Working directory; defaults to the project directory |
forceRestore | bool | No | When true, skips the --no-restore flag. Use after scaffolding a new test project or adding NuGet packages. |
sessionId | string | No | Isolates output directories (TestResults-{hash}/, coveragereport-{hash}/) and state files for concurrent multi-agent use. |
includeClass | string | No | Restrict coverage collection to types matching this name (coverlet Include filter, applied via a generated runsettings file passed with --settings). Independent of filter — pass an explicit value to scope coverage; omit it to collect coverage for everything the run touches. Namespace-qualified names are not supported. |
skipReport | bool | No | When true, skips the reportgenerator JSON-summary step and returns only the Cobertura XML path. Faster for the inner test loop, where GetFileCoverage/GetUncoveredBranches/GetCoverageDiff read the XML directly. Leave false (default) when you need GetCoverageSummary's Summary.json. |
GetCoverageSummary| Parameter | Type | Required | Description |
|---|---|---|---|
summaryJsonPath | string | Yes | Full path to the generated Summary.json file |
belowTarget | double | No | When set (a fraction in [0,1], e.g. 0.8), return only classes whose line OR branch coverage is below this threshold. Omit for all classes. |
topN | int | No | Return only the N lowest-branch-coverage classes (results are sorted worst-first). Omit for all classes. |
methodsPerClass | int | No | Keep at most this many lowest-branch-coverage methods per class, trimming the rest. Omit to keep all methods. |
GetFileCoverage| Parameter | Type | Required | Description |
|---|---|---|---|
coberturaXmlPath | string | Yes | Path to coverage.cobertura.xml (falls back to .mcp-coverage/.coverage-state if not found) |
sourceFileName | string | Yes | Source file name to look up (e.g., ExampleService.cs) |
sessionId | string | No | Resolves session-scoped state file for concurrent isolation. |
| targetRate | double | No | Coverage
只显示了开头部分;其余内容请在仓库中阅读