DICOM Py Mock Server: The Essential Lightweight DICOM SCP & Synthetic Test Harness
Empower DICOM developers, QA test automation teams, and PACS administrators with on-demand synthetImaging, automated Modality Worklists, and instant DICOM SCP simulation— PHI-free.
Testing medical imaging workflows has historically required heavy, cumbersome PACS installations or risky anonymized clinical files that carry persistent PHI liability.
DICOM Py Mock Server solves this problem permanently. Built as a high-performance, lightweight Python service, it provides an all-in-one DICOM Service Class Provider (SCP), dynamic Modality Worklist (MWL) generator, and on-the-fly synthetic image engine.
Whether you are automating end-to-end CI/CD test pipelines, stress testing downstream viewers, verifying DICOM network associations, or empowering AI assistants via the Model Context Protocol (MCP), DICOM Py Mock Server is the indispensable tool for modern medical imaging engineering.
WHO IS THIS FOR?
MEDICAL IMAGING & PACS DEVELOPERS
- Rapidly test C-ECHO, C-FIND, C-MOVE, C-GET, and C-STORE implementations without configuring enterprise PACS servers.
- Test multiple transfer syntaxes (RAW Little Endian, JPEG Baseline, JPEG 2000, RLE) with calibrated 12-bit dynamic range test patterns.
- Programmatically orchestrate imaging tests via clean REST API and MCP SSE interfaces.
QA ENGINEERS & TEST AUTOMATION TEAMS
- Spin up ephemeral Mock SCP instances in GitHub Actions, GitLab CI, or Jenkins pipelines in seconds.
- Simulate realistic clinical worklist traffic with automated peak (9 AM - 5 PM) and off-peak modality schedules.
- Validate corner cases, multi-slice volume retrieval, and accession-based queries without maintaining persistent storage databases.
PACS ADMINISTRATORS & CLINICAL SYSTEMS INTEGRATORS
- Safely test network connectivity, AE Title routing, and firewall rules in dev/staging without risking production downtime.
- Eliminate PHI compliance hazards: all patient identities, accession numbers, and SOP UIDs are 100% synthetic.
- Validate modality integrations (CT, MR, US, CR, DX, MG) using custom template-based generation.
Key Capabilities Built for Real-World QA
- Full-Spectrum DICOM SCP Services:
Acts as a fully compliant, always-available PACS endpoint right inside your test harness. Built on pynetdicom, it handles Verification (C-ECHO), Storage (C-STORE), Modality Worklist (MWL C-FIND), and Query/Retrieve (C-FIND, C-MOVE, C-GET across Patient, Study, and Series models) out of the box.
- Living Hospital Traffic & Modality Worklist (MWL):
Tired of static, predictable mock datasets? The built-in MWL engine simulates dynamic radiology department throughput—weighting study volume for 9 AM–5 PM peak clinical shifts versus 5% off-peak flows, complete with rolling retention windows and on-demand procedure injection.
- Talk to Your Test Server via AI Agents (MCP-Native):
Control your test PACS directly from your IDE without switching context. Native Model Context Protocol (MCP) support allows agents in AntiGravity, Cursor, or Claude Desktop to inspect SCP listener health, spin up tailored test studies, or execute C-MOVE pushes through simple conversational prompts.
- 100% PHI-Free Synthetic Data Generation:
Instantly create synthetically populated studies with authentic DICOM UIDs, realistic patient demographics, and modality-specific metadata. Test pipelines locally or in CI/CD without HIPAA or GDPR compliance headaches.
- Calibrated 12-Bit Pixel Test Patterns:
Built for rigorous image rendering and pipeline QA. Generates deterministic 12-bit pixel data ([0, 4095]) featuring 4 monotonic gradient segments for exact Window/Level (W/L) verification, paired with burned-in OCR metadata headers.
- FastAPI Endpoints & CLI Automation:
Script your integration suites effortlessly. Trigger on-the-fly study generation, push DICOM datasets, and query live worklists via high-performance REST endpoints or direct CLI commands.
- Structured JSON Observability:
Enterprise-grade JSON-lines output captures every association, SOP class negotiation, and payload transfer. Features 7-day timed log rotation and configurable retention for traceable audit runs.
- Zero-Build, Run Anywhere:
Pure Python 3.10+ with zero binary build steps. Spin it up instantly on macOS, Linux, or Windows using uv or standard virtual environments.
GETTING STARTED IN 30 SECONDS
- Get it from GoSmart.Health Git Repo: gosmart-health/dicom-py-mock-server
- Run instantly with uv: uv run dicom-py-mock-server
- Or run via Python: python -m dicom_py_mock_server.main
- Access the interactive API docs: http://127.0.0.1:8000/docs
- Connect your DICOM SCU: Host: 127.0.0.1 | Port: 11112 | AE Title: GOSMART_SCP
Need help integrating this to your environment?
Need Help With Your Testing & Integration Infrastructure?
You don't need a multi-month contract to get senior-level expertise. With our Quick SOW model, a targeted few-hour engagement can validate your pipeline and get your team moving fast.
Book a free, no-obligation exploration call and interactive demo to walk through your specific data flow and testing needs... Schedule a Meeting
LICENSE & NOTICE
Created by Gosmart.Health ([email protected]) 2026.
Distributed under the Apache 2.0 License.
Notice: Designed strictly for development, automated testing, and simulation. Not intended for clinical diagnostic use.