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,或將 config_path 傳給 run。伺服器透過 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