covdbg

com.covdbgv1.3.0更新于 Oct 8, 2026

C++ code coverage on Windows for AI agents. Find uncovered code from PDBs, no rebuild.

已验证STDIO仅桌面Developer ToolsData & Analytics

概览

AI 生成的概览

让 AI 助手在 Windows x64 上利用现有 PDB 符号测量 C++ 代码覆盖率、找出未覆盖代码并补充针对性测试,无需重新构建。

功能
covdbg-mcp 提供工具,对已构建、带 PDB 调试符号的 Windows x64 可执行文件运行覆盖率测量,按未覆盖行数对文件排序,并读取未覆盖源码片段及其上下文。它可以启动、等待和取消覆盖率运行,以只读方式打开已有的 .covdb 数据库,执行一条只读 SQL 语句,以及合并数据库。guide 工具提供工作流和配置方面的指引。
适用场景
当你希望助手帮助补齐 Windows C++ 项目的覆盖率缺口时使用:运行测试、查看哪些文件和行未被覆盖、阅读这些代码、添加针对性测试并重新运行以确认缺口已闭合。它适合已经生成 PDB 符号、且不希望为覆盖率而重新构建的项目。
运行要求
Windows x64、已安装 covdbg 1.3.0 或更高版本并加入 PATH,以及带 PDB 调试符号的可执行文件。需要一次性执行 covdbg login,或在 CI 与无界面场景下使用环境变量 COVDBG_PROJECT_TOKEN。目标可执行文件旁需有 .covdbg.yaml,或向 run 传入 config_path。服务器通过 stdio 在本地运行;MCP 捆绑包本身不包含 covdbg。
安装前请注意
服务器会启动你的目标可执行文件并在其运行期间插入探针,因此会在你的机器上执行该程序。它需要 COVDBG_PROJECT_TOKEN(项目令牌),请勿将其放入共享文件。覆盖率数据库会写入磁盘,COVDBG_OUTPUT 会设定固定的默认输出位置,后续运行会覆盖先前结果。merge 工具会把合并后的数据库写入指定输出路径。covdbg 的退出码不携带目标程序的退出码,因此需另行检查测试结果。

安装

在 SourceWeft 中

  1. 打开 控制台中的 covdbg,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[covdbg]

covdbg-mcp

MCP server for covdbg: C++ code coverage on Windows for AI agents. Run tests, find uncovered code, and add targeted tests. No rebuild required.

covdbg measures coverage of the Windows x64 binaries you already build, using their PDB debug information. It works like a debugger: it starts your executable, reads the PDB, and places lightweight probes while the program runs. The MCP server is built into the covdbg executable (since v1.3.0) and is started with covdbg mcp.

This repository holds the MCP registry metadata (server.json, glama.json) and the MCP Bundle manifest (manifest.json) for covdbg. The server itself ships with covdbg.

What an agent can do

  1. Run coverage on a test executable without rebuilding it.
  2. Rank files by uncovered lines.
  3. Read the uncovered code with surrounding context.
  4. Add a focused test, re-run it, and confirm the gap is closed.
  5. Query and merge coverage databases (.covdb) with read-only SQL.

Requirements

  • Windows x64
  • covdbg 1.3.0 or newer
  • An executable with PDB debug symbols (MSVC or any PDB-producing toolchain)
  • A one-time covdbg login, or COVDBG_PROJECT_TOKEN for CI
  • A .covdbg.yaml next to the target executable, or a config_path passed to run (see the configuration reference)

Install covdbg

  • Installer (recommended): installer.msi. It installs to %LocalAppData%\Programs\Liasoft\covdbg and adds that directory to your user PATH.
  • Portable: portable.zip. Extract it anywhere and add the directory to your PATH yourself.

Then open a new terminal and sign in:

powershell
covdbg --versioncovdbg login

Client setup

The server uses stdio transport. Start it from your project directory, or pass --workspace <dir>.

Claude Code

From the project directory:

powershell
claude mcp add covdbg -- covdbg mcp

Or add a project .mcp.json:

json
{  "mcpServers": {    "covdbg": {      "command": "covdbg",      "args": ["mcp"]    }  }}

VS Code

.vscode/mcp.json:

json
{  "servers": {    "covdbg": {      "type": "stdio",      "command": "covdbg",      "args": ["mcp", "--workspace", "${workspaceFolder}"]    }  }}

Cursor

.cursor/mcp.json:

json
{  "mcpServers": {    "covdbg": {      "command": "covdbg",      "args": ["mcp"]    }  }}

Claude Desktop (MCP Bundle)

  1. Download covdbg.mcpb from the latest release.
  2. Open it with Claude Desktop, or drag it into Settings → Extensions.
  3. Set the following:
    • covdbg executable: the path to covdbg.exe. The default is the MSI install location.
    • Workspace: your project directory.
    • Project token: optional. Leave it empty if you have run covdbg login.

The bundle does not contain covdbg itself. It launches your installed covdbg.exe, so covdbg updates take effect without a new bundle.

Tools

ToolPurposeMain inputs
guideWorkflow and configuration guidanceoptional topic (config, excludes, baseline, merging, uncovered, children)
discoverFind executables and coverage databasesoptional root
runStart a coverage run; returns a run session right awaytarget; optional target_arguments, config_path, output_path, follow_children
wait_runWait briefly or collect the completed resultsession_id; optional timeout_seconds
cancel_runTerminate a runsession_id
open_coverageOpen an existing database read-onlypath
filesRank files by uncovered linessession_id; optional limit, max_coverage_percent
codeRead uncovered source segments with contextsession_id, file_path
queryRun one read-only SQL statementsession_id, sql; optional max_rows
mergeCombine databasesinput_paths, output_path
closeRelease a run or coverage sessionsession_id

Limits and behavior

  • Run session IDs start with run-; coverage session IDs start with covdb-.
  • At most 8 runs in flight and 32 open coverage sessions.
  • wait_run blocks for at most 30 seconds. If it reports stillRunning, call it again.
  • Run outcomes are success, no_functions_to_track, license_failure, or error.
  • covdbg's exit code does not carry the target's exit code, so check test results separately.

Environment variables

VariablePurpose
COVDBG_PROJECT_TOKENProject token for CI or headless use. Local use relies on covdbg login.
COVDBG_OUTPUTFixed default output location. Avoid reusing one location across a suite, since later runs overwrite earlier results.

Documentation

Publishing (maintainers)

Keep version in manifest.json and server.json, and the release tag in the server.json package URL, in sync.

  1. Build the bundle. .mcpbignore limits it to manifest.json, icon.png and LICENSE:

    powershell
    npx @anthropic-ai/mcpb validate manifest.jsonnpx @anthropic-ai/mcpb pack . covdbg.mcpb
  2. Create the GitHub release v<version> and upload covdbg.mcpb as an asset.

  3. Put the bundle's hash into fileSha256 in server.json:

    powershell
    (Get-FileHash covdbg.mcpb -Algorithm SHA256).Hash.ToLower()
  4. Publish to the MCP registry. The com.covdbg/* namespace uses DNS authentication on covdbg.com:

    powershell
    mcp-publisher login dns --domain covdbg.com --private-key <key>mcp-publisher publish
  5. Glama picks up glama.json from the repository.

License

The metadata in this repository is licensed under the Apache License 2.0. covdbg itself is licensed separately, with Free, Team, and Enterprise plans. See covdbg.com and the Licensing FAQ.

来源:README.md,提交 e081067

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v1.3.0最新Oct 8, 2026