Install dicom-standard-kb
dicom-standard-kb needs Python 3.12 or newer. It is installed from its GitHub
repository; it is not published on PyPI. The package holds code only, never
DICOM content.
Install the command
Section titled “Install the command”With uv:
uv tool install "dicom-standard-kb[mcp] @ git+https://github.com/beatrice-b-m/dicom-standard-kb"The [mcp] extra adds the MCP server. Leave it out if you only want the CLI:
uv tool install "dicom-standard-kb @ git+https://github.com/beatrice-b-m/dicom-standard-kb"Check the install:
dicom-kb --versiondicom-kb doctordoctor prints the version and the project’s legal notice.
Install from a source checkout
Section titled “Install from a source checkout”Use a checkout to develop the project or to build the synthetic fixture:
git clone https://github.com/beatrice-b-m/dicom-standard-kb.gitcd dicom-standard-kbmake installuv run dicom-kb --helpmake install installs the locked runtime, MCP and development dependencies.
Prefix commands with uv run inside the checkout, or run uv tool install '.[mcp]' to put dicom-kb on your PATH.
Try the synthetic fixture
Section titled “Try the synthetic fixture”A checkout can build a tiny knowledge base from synthetic DocBook files without downloading anything:
uv run dicom-kb build-fixture --cache-dir /tmp/dicom-kb-fixture --db /tmp/dicom-kb-fixture.sqlite --forceuv run dicom-kb iod "CT Image" --db /tmp/dicom-kb-fixture.sqliteThe fixture shows how commands and answers look. It is not DICOM content, and
its 2026b edition label is only a label. build-fixture works only in a
source checkout, because the fixtures are not packaged.
Where files go
Section titled “Where files go”| Path | Contents |
|---|---|
~/.cache/dicom-standard-kb/artifacts/ |
Downloaded DocBook XML and a manifest per edition |
~/.cache/dicom-standard-kb/db/ |
One <edition>.sqlite per built edition |
~/.cache/dicom-standard-kb/db/*.gaps.txt |
The gaps each build logged |
Use --cache-dir, --db, environment variables or a profile to change them;
see Configuration.
Troubleshooting
Section titled “Troubleshooting”dicom-kb is not on PATH
Section titled “dicom-kb is not on PATH”Run uv tool update-shell and open a new shell.
“no local DICOM KB found”
Section titled ““no local DICOM KB found””Query commands never create a database. Run dicom-kb fetch and then
dicom-kb build, or pass --db to a database you already have.
“was built with schema N”
Section titled ““was built with schema N””The database came from an older version of the code. Rebuild it with
dicom-kb build --force; the fetched files are reused.
fetch says the edition is already fetched
Section titled “fetch says the edition is already fetched”Pass --force to download it again.
MCP support requires the optional dependency
Section titled “MCP support requires the optional dependency”Reinstall with the [mcp] extra, adding --force to replace the existing
tool.