MDMP
MDMP is an open protocol and CLI for dataset quality, provenance, and offline trust verification.
Tagline: Know what your AI learned from.
What You Get
- Contract-based validation (
schema, ranges, consent metadata) - Deterministic grading (
draft,research_grade,clinical_grade) - Dataset fingerprints (
sha256:...) with expiry/staleness checks - Lineage cards for model-to-dataset traceability
- Offline signed artifacts (Ed25519), with optional delegated signing
- Key rotation + revocation trust store for offline verification
- Policy engine to enforce grade/consent/staleness rules
- Conformance suite to self-test MDMP core behavior
- Audit-ready JSON + HTML outputs
Start In 2 Minutes
Always use a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
pip install -e .
Run the shortest working flow:
mdmp init --flavor health --output contracts/mdmp_contract.yaml
mdmp validate contracts/mdmp_contract.yaml data/demo_cgm.csv --output-json results/mdmp_report.json
mdmp report results/mdmp_report.json --output-html results/mdmp_dashboard.html
Core Command Groups
Validation and reports:
mdmp validate contracts/mdmp_contract.yaml data/demo_cgm.csv --output-json results/mdmp_report.json
mdmp report results/mdmp_report.json --output-html results/mdmp_dashboard.html
mdmp audit results/mdmp_report.json --output-json results/mdmp_audit.json --output-html results/mdmp_audit.html
Fingerprint and lineage:
mdmp fingerprint-record data/demo_cgm.csv --output-json results/fingerprint.json --expires-days 365
mdmp fingerprint-check results/fingerprint.json data/demo_cgm.csv
mdmp lineage-card --model glucose_forecaster_v2 --dataset data/demo_cgm.csv --contract contracts/mdmp_contract.yaml --output results/mdmp_model_card.yaml
mdmp lineage-card-refresh results/mdmp_model_card.yaml
Registry and federation scaffold:
mdmp registry init --registry registry/mdmp_registry.json
mdmp registry push --registry registry/mdmp_registry.json --report results/mdmp_report.json --visibility public
mdmp registry export-public --registry registry/mdmp_registry.json --output-json registry/public_bundle.json
Offline Trust Chain
Root signing:
mdmp authority keygen --output-dir keys
mdmp authority sign results/mdmp_report.json --privkey keys/mdmp_private_v1.pem --output results/mdmp_report.signed.mdmp
mdmp verify results/mdmp_report.signed.mdmp --public-key keys/mdmp_pub_v1.pem
Delegated organization signing:
mdmp authority delegate \
--delegate-id uzleuven-001 \
--delegate-name "UZ Leuven Research Division" \
--delegate-pubkey keys/uzleuven_pub.pem \
--grades draft --grades research_grade \
--require-consent \
--flavors health \
--privkey keys/mdmp_private_v1.pem \
--output certs/uzleuven_delegate.cert
mdmp delegate-sign results/mdmp_report.json \
--privkey keys/uzleuven_private.pem \
--cert certs/uzleuven_delegate.cert \
--output results/mdmp_report.delegate.mdmp
mdmp verify results/mdmp_report.delegate.mdmp \
--cert certs/uzleuven_delegate.cert \
--public-key keys/mdmp_pub_v1.pem
Hard policy:
clinical_gradeandai_readyare non-delegable.
Trust store (rotation + revocation):
mdmp trust init --trust-store trust/mdmp_trust_store.json --key-id mdmp_pub_v1 --public-key keys/mdmp_pub_v1.pem --set-active
mdmp trust add-key --trust-store trust/mdmp_trust_store.json --key-id mdmp_pub_v2 --public-key keys/mdmp_pub_v2.pem --set-active
mdmp trust revoke-key mdmp_pub_v1 --trust-store trust/mdmp_trust_store.json --reason compromised
mdmp verify results/mdmp_report.signed.mdmp --trust-store trust/mdmp_trust_store.json
Policy engine:
mdmp policy-template --output mdmp_policy.yaml
mdmp validate contracts/mdmp_contract.yaml data/demo_cgm.csv --policy mdmp_policy.yaml --output-json results/mdmp_report.json
mdmp policy-eval mdmp_policy.yaml results/mdmp_report.json --output-json results/mdmp_policy_eval.json
Signed audit bundle:
mdmp audit-bundle results/mdmp_report.json --privkey keys/mdmp_private_v1.pem --output-json results/mdmp_audit_bundle.signed.json
mdmp audit-bundle-verify results/mdmp_audit_bundle.signed.json --public-key keys/mdmp_pub_v1.pem
Conformance suite:
mdmp conformance --workdir results/conformance --output-json results/mdmp_conformance.json --strict
Key Safety Rules
- Never commit private keys.
- Private keys are ignored by default:
keys/mdmp_private*.pem*_private.pem*.key
- Public key locations:
src/mdmp_core/keys/mdmp_pub_v1.pem(bundled with package)keys/mdmp_pub_v1.pem(repository mirror)
Integrations
mdmp integrations dvc-stagemdmp integrations mlflow-logmdmp integrations wandb-log- Reusable GitHub Action:
action.yml
Documentation
- Full manual:
docs/manual/complete-manual.md - CLI reference:
docs/reference/cli.md - Spec:
MDMP_SPEC.md(v1.0) - Conformance vectors:
conformance/vectors/*.json - Conformance guide:
conformance/README.md - Security policy:
SECURITY.md - Public docs site: python35.github.io/MDMP
Project Metadata
- Current version:
0.3.0 - Changelog:
CHANGELOG.md - Contributing:
CONTRIBUTING.md - License:
Apache-2.0
Scope
MDMP provides provenance and data-quality metadata only. It is not a medical device and does not provide clinical dosing advice.
Metadata
Release files for mdmp-protocol 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mdmp_protocol-0.3.0.tar.gz | 50.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mdmp_protocol-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 104.6 kB
Release files / mdmp_protocol-0.3.0.tar.gz
| Download URL | mdmp_protocol-0.3.0.tar.gz |
|---|---|
| Size | 50.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ace835aecfa26e11a49bd6c8322c7e66eb0f80c19d22a490216d294594ba621a
|
|
BLAKE2b-256 checksum How to use checksums |
755519c2207b69e41752d2b1ce6690ffdec0c25488defbca46a40518a99b12a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency logRelease files / mdmp_protocol-0.3.0-py3-none-any.whl
| Download URL | mdmp_protocol-0.3.0-py3-none-any.whl |
|---|---|
| Size | 54.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
332cdd186f767c0cba540b276bc2fe96dab0eeb95881bd1290f3d5f1739f025b
|
|
BLAKE2b-256 checksum How to use checksums |
9a820afd6ae794604796ac837b574b94a19b5fe2c302bddff1a322f60e6837e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 9, 2026.
Transparency log