Server data from the Official MCP Registry
Local read-only MCP server for DICOM, NIfTI and RT data with PHI-safe output.
About
Local read-only MCP server for DICOM, NIfTI and RT data with PHI-safe output.
Security Report
The visible code is a local, read-only medical imaging MCP server with no network calls, shell execution, or hardcoded credentials. It constrains output to allowlisted, numeric, or standardized fields and requires an explicit root directory. The score is reduced slightly because the final file (rt_plan.py) is truncated and the referenced helper modules (rt_common, dicom, security) were not provided, so the file-access path checks and the claimed no-network enforcement could not be verified. Supply chain analysis found 6 known vulnerabilities in dependencies (0 critical, 2 high severity). Package verification found 1 issue.
10 files analyzed · 10 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"rt-imaging-mcp": {
"command": "uvx",
"args": [
"rt-imaging-mcp==0.1.1"
]
}
}
}Some servers take additional arguments. See the repository for details.
Documentation
View on GitHubFrom the project's GitHub README.
rt-imaging-mcp
A local, read-only Model Context Protocol server that lets AI agents inspect medical image files (DICOM, NIfTI) on your own disk, with PHI-safe output by default.
Status: early development (pre-alpha). DICOM scanning, allowlisted DICOM metadata, NIfTI header information, RTSTRUCT, RTDOSE and RTPLAN summaries and approximate dose-volume metrics work today. Radiomics is planned, not implemented. Dose-volume results are validated on synthetic phantoms only, not against a planning system.
Read this first
- Research use only. Not a medical device. Not for clinical use.
- Running locally does not by itself keep data private. Tool output is sent to the model your MCP client uses. If that model is hosted in the cloud, so is every tool result. This project limits what tools return (see docs/threat-model.md) but cannot guarantee anonymity.
- For full privacy, use a locally hosted model. Never use real patient data for development or testing.
Tools
| Tool | What it returns |
|---|---|
dicom_scan_directory | Inventory of DICOM series below a directory: opaque series ids, modality, instance counts, image size, file counts. No UIDs. |
dicom_get_metadata | Allowlisted technical attributes of one DICOM file (geometry, bit depth, modality, transfer syntax, ...). |
dicom_list_allowed_tags | The attribute keywords dicom_get_metadata may currently return. |
nifti_info | Shape, voxel size, data type, units and orientation from the NIfTI header. Free-text header fields are never returned. |
rt_dose_summary | RTDOSE grid: dose type and units, grid size, voxel size, whole-grid maximum and mean dose, non-zero voxel count. No dose array, no grid position. |
rt_plan_summary | RTPLAN: intent, approval status, fractions, one entry per beam (type, radiation, energy, angles, dose, meterset) and prescription doses. No plan, beam or machine names. |
rt_dvh_metrics | Dose statistics, D(p) and V(t) for one structure of an RTSTRUCT on an RTDOSE grid (for example D95, D2, V20 Gy). Approximate; refuses mismatched frames of reference. |
rt_structure_summary | One entry per RTSTRUCT structure: interpreted type, contour and slice counts, extent, approximate planar volume. Names are returned only if standard (TG-263 style), otherwise null. |
All tools are read-only and are declared as such to the client.
Safety design
- Tag allowlist. Only listed attributes can be returned. Patient name, ID, birth date, institution, physician names,
accession number, private tags and similar are blocked and cannot be enabled. Dates, descriptions and UIDs are
off by default and need an explicit
--enable-tagby the human operator (not the agent). - Structure names are standardised. RTSTRUCT names are free text and can contain identifiers, so only standard
names (a TG-263-style subset) and fixed-token target names such as
PTV_Highare returned; others arenull. - RT dose and plan output is numbers and enumerated codes only. Plan, beam and machine names, reviewer names and other free text are never returned.
- Dose-volume metrics refuse inconsistent input. The structure set and dose must share a frame of reference and use a supported grid; results are labelled approximate and computation is bounded.
- No pixel data, ever (the dose grid is read to compute statistics and is never returned).
- One root directory. The server refuses to start without
--root(orRT_IMAGING_MCP_ROOT)..., absolute paths outside the root and symlinks that leave the root are rejected. - Static error messages. Errors never quote data read from files.
- Bounded work. Limits on file count, directory depth and file size.
- No writes, no network. Enforced by a static test on the source.
Known limits are listed in the threat model. In short: file and folder names are controlled by you and can contain
identifiers (use opaque_paths=true to omit them), and prompt injection through file content cannot be fully prevented.
Validation
Dose-volume metrics are checked against hand-calculated phantoms, against dicompyler-core on synthetic data, and against dicompyler-core on three patients of one public collection (preliminary: volume, mean dose, D50 and D2 agree on all 39 structures within the stated tolerances; a few D95 and V(t) differences are unexplained). They are not validated against a treatment planning system. See docs/validation.md for the numbers, the differences and how to reproduce them. The story of how two bias bugs in the dose-volume code were found (in Indonesian): docs/validation-story.md.
Install and run
Requires Python 3.11+ and uv.
Install from PyPI
uvx rt-imaging-mcp --root /path/to/de-identified/images
For Claude Code:
claude mcp add rt-imaging -- uvx rt-imaging-mcp --root /path/to/images
Install from source
git clone [https://github.com/MLwithDyy/rt-imaging-mcp](https://github.com/MLwithDyy/rt-imaging-mcp)
cd rt-imaging-mcp
uv sync
uv run rt-imaging-mcp --root /path/to/de-identified/images
Options: --enable-tag KEYWORD (repeatable, opt-in DICOM attributes), --enable-roi-name NAME (repeatable, extra
structure names to return), --max-files, --max-depth, --max-file-mb.
Claude Code (from source)
claude mcp add rt-imaging -- uv run --directory /path/to/rt-imaging-mcp rt-imaging-mcp --root /path/to/images
Claude Desktop (and other clients using a JSON config)
{
"mcpServers": {
"rt-imaging": {
"command": "uv",
"args": [
"run", "--directory", "/path/to/rt-imaging-mcp",
"rt-imaging-mcp", "--root", "/path/to/images"
]
}
}
}
On Windows, escape backslashes in JSON (D:\\Project\\rt-imaging-mcp) or use forward slashes.
Debug with the MCP Inspector:
npx @modelcontextprotocol/inspector uv run rt-imaging-mcp --root /path/to/images
Development
uv sync
uv run pytest
uv run ruff check .
uv run mypy
pre-commit install
Tests use synthetic data generated at run time. Medical image files are blocked from commits by .gitignore
and a pre-commit hook. Do not attach real patient data to issues or pull requests.
Roadmap
- DICOM and NIfTI basics (done, pre-alpha)
- CI on Python 3.11-3.13, Linux and Windows (done)
- Radiotherapy objects: RTSTRUCT, RTDOSE and RTPLAN summaries and approximate DVH metrics (done)
- Radiomics feature extraction with validation against IBSI reference data
- Release to PyPI (done)
Related work
dicom-mcpconnects agents to DICOM network servers (PACS). This project is complementary: it works on local files and focuses on PHI-safe output, radiotherapy objects and radiomics.rt-qa-agentis a reference downstream radiotherapy QA audit agent built onrt-imaging-mcp, pairing its read-only DICOM/DVH tools with YAML clinical protocols (RTOG 0813,EMBRACE-II,RTOG 1016) and deterministic dose-constraint checks.
Contributing and security
See CONTRIBUTING.md. Never attach real patient data to issues or pull requests. Report vulnerabilities privately as described in SECURITY.md.
License
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
