dicomguard
Installs and uses a Git pre-commit hook to scan staged .dcm files and block commits containing unredacted PHI.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
dicomguard
Zero-dependency binary DICOM Part 10 inspector, NEMA PS3.15 de-identifier, burned-in pixel PHI risk detector & MCP server — 100% offline.
npx dicomguard scan ./dicom-studies --fail-on highTry the 100% Offline Browser Playground — drag and drop real .dcm studies or sample CT / high-risk Ultrasound fixtures directly in your browser tab with zero uploads, inspect (gggg,eeee) elements, verify PixelData SHA-256 unchanged, and download .safe.dcm + signed uid-vault.json.
Why dicomguard?
Radiology AI teams and medical-imaging engineers preparing .dcm datasets hit four recurring failure modes:
Corrupted Binary Headers & Group
0002Lengths — Hand-rolled scripts that replace patient strings in binary DICOM break odd-length VR padding or leave(0002,0000)FileMetaInformationGroupLengthstale so PACS/VNA viewers reject the file.dicomguardre-serializes Part 10 cleanly with valid even padding and recomputed(0002,0000)+ synchronized(0002,0003)/(0008,0018)UIDs.Broken Multi-Slice Study/Series Referential Integrity — Randomizing
StudyInstanceUID/SeriesInstanceUIDper slice breaks 3D CT/MRI reconstruction.dicomguarduses deterministic HMAC-SHA2562.25.<uint128>OID derivation across slices and exports an HMAC-signedUidVault.Hidden Odd-Group Private Tags — Vendor private blocks (
(0009,xxxx),(0019,xxxx)) often store plaintext clinician notes or station IDs.dicomguardstrips odd-group private tags by default (--keep-privateopt-out).Silent Burned-In Pixel PHI — Ultrasound (
US), Secondary Capture (SC), and screen-save series often rasterize patient banners into pixel buffers.dicomguardflags high-risk modalities,ImageType(SECONDARY/SCREEN),(0028,0301) BurnedInAnnotation,(0018,6011), and(60xx,3000)OverlayData.
Related MCP server: verdex
Quick Start
# Generate synthetic CT or high-risk Ultrasound DICOM Part 10 fixtures
npx dicomguard sample --preset ct-chest -o sample-ct.dcm
npx dicomguard sample --preset ultrasound-burned -o sample-us.dcm
# Inspect binary headers, private tags, burned-in risk, and PixelData SHA-256
npx dicomguard inspect sample-ct.dcm
# Audit a directory (outputs: text, --json, --sarif, --markdown, --junit, --badge)
npx dicomguard scan ./studies --sarif -o dicomguard.sarif
# De-identify per NEMA PS3.15 (preserves 7FE0,0010 PixelData byte-for-byte)
npx dicomguard clean sample-ct.dcm --secret "$UID_KEY" --vault-out uid-vault.json -o sample-ct.safe.dcm
# Shift clinical/birth dates deterministically while preserving intervals
npx dicomguard clean sample-ct.dcm --profile retain-dates-shifted --secret "$UID_KEY" -o sample-ct.shifted.dcm
# Install git pre-commit hook blocking staged .dcm files with unredacted PHI
npx dicomguard guard installMCP Server (Claude Desktop, Cursor, VS Code, Codex, Gemini CLI)
Expose all 5 offline DICOM tools (dicomguard_inspect, dicomguard_scan, dicomguard_deidentify_base64, dicomguard_burned_in_risk, dicomguard_list_tags) via stdio JSON-RPC 2.0:
{
"mcpServers": {
"dicomguard": {
"command": "npx",
"args": ["-y", "dicomguard", "mcp"]
}
}
}Or manage/install alongside your existing stack via mcphub and mcpman.
GitHub Action (@v1)
- name: DICOM Confidentiality Gate
uses: tranhoangtu-it/dicomguard@v1
with:
target: "./dicom-fixtures"
profile: "basic"
fail-on: "high"
sarif-file: "dicomguard.sarif"TypeScript / JavaScript SDK (Node & Browser)
import {
buildSampleDicomBytes,
deidentifyDicom,
inspectDicom,
scanDicom,
verifyUidVault,
} from "dicomguard";
const raw = buildSampleDicomBytes("ct-chest");
const before = scanDicom(raw, { file: "ct.dcm" });
const result = deidentifyDicom(raw, { profile: "basic", secret: "pacs-key" });
console.log(result.pixelDataIntact); // true (SHA-256 identical)
console.log(scanDicom(result.bytes).score); // 100
console.log(verifyUidVault(result.vault, "pacs-key")); // trueRelated Open-Source Security & Healthcare Tools
phiguard— Zero-dependency offline PHI de-identification, HIPAA / VN QĐ 4750 / JP APPI guardrails & MCP server for HL7 FHIR, HL7v2, and clinical notes (Live Playground).clawleak— Find, losslessly redact, and block plaintext API keys leaked into AI coding agents (0deps, 100% offline).mcphub— Curated hub & CLI for verified MCP servers.mcpman— Universal package manager & security auditor for MCP servers.
License
MIT © 2026 Tran Hoang Tu
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Safety-first EVM and Bitcoin RPC tools for balances, contracts, blocks, and transactions
PDF and image tools for AI agents: compress, merge, split, OCR, sign. Runs locally, never uploads.
Audio, music, video, image, PDF, speech, text and web-check tools callable from any MCP client.
Audio, music, video, image, PDF, speech, text and web-check tools callable from any MCP client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes DICOM operations as tools for AI agents to interact with medical imaging systems and PACS. It enables searching for studies and series, querying instance metadata, and retrieving pixel data from DICOM entities.-
- AlicenseNot gradedqualityBmaintenanceExposes read-only local analysis tools for source auditing, web traffic review, binary reverse engineering, exploit scaffolding, OSINT, and reporting via JSON-RPC over stdio, enabling LLMs to orchestrate evidence-based security workflows without executing targets or sending network requests.1MIT
- AlicenseNot gradedqualityBmaintenanceServes five offline diagnostic tools over stdio that let an agent scan a repository for AI context noise, trace why a CLI command is missing, measure whether a build cache actually pays off, and rank flaky or always-failing tests from JUnit runs. Each tool returns the same JSON as the CLI, and an optional sandbox root keeps all path access confined to one repo.450 npmApache 2.0
- FlicenseBqualityBmaintenanceExposes five typed, provenance-gated physics tools over JSON-RPC 2.0 stdio so frontier agents can compute 3D deformable biophysical dose accumulation, DIR-uncertainty envelopes, and inverse remaining-dose ceilings for multi-course re-irradiation. Every output is audited by a critic-verifier gate with a hard abstention check, returning safety-flagged dossiers and provenance ledgers instead of unsupported clinical numbers.71-