MCP Connector

Query and Transfer DICOM Medical Imaging Data

DICOM MCP Server connects AI assistants to medical imaging data, enabling querying, report extraction, and image transfer for analysis.

Maintainer of this project? Claim this page to edit the listing.


91
Spark score
out of 100
Updated last month
Version .0.1.2
Models
universal

Add to Favorites

Why it matters

Enable AI assistants to interact with DICOM servers for medical imaging data. Query patient, study, and series information, extract text from encapsulated reports, and transfer data to other DICOM nodes.

Outcomes

What it gets done

01

Query DICOM patient, study, and series metadata.

02

Extract text content from DICOM-encapsulated PDF reports.

03

Transfer DICOM series or studies to other DICOM nodes via C-MOVE.

04

Manage and verify DICOM node connections.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-dicom | bash

Capabilities

Tools your agent gets

query_patients

Search for patients by criteria such as name, ID, or date of birth

query_studies

Search for studies by patient ID, date, modality, description, accession number, or Study UID

query_series

Search for series within a specific study by modality, series number/description, or Series UID

query_instances

Search for individual instances (images/objects) in a series by instance number or SOP Instance UID

extract_pdf_text_from_dicom

Retrieve a specific DICOM instance with encapsulated PDF and extract its text content

move_series

Send a specific DICOM series to another configured DICOM node via C-MOVE

move_study

Send an entire DICOM study to another configured DICOM node via C-MOVE

list_dicom_nodes

Display the current active DICOM node and list all configured nodes

+3 tools

Overview

DICOM MCP Server

The DICOM MCP Server acts as a connector, exposing DICOM server functionalities to AI clients. It allows AI assistants to query patient, study, and series metadata, extract text content from DICOM instances containing encapsulated PDFs (like clinical reports), and send DICOM series or studies to other DICOM destinations for AI-driven analysis. Use this tool when you need to integrate AI models with medical imaging data stored on DICOM servers (PACS, VNA). It's suitable for automating the retrieval of patient information, extracting insights from radiology reports, or sending specific imaging studies to AI endpoints for tasks like segmentation or classification.

What it does

As an AI developer, I want to integrate medical imaging data workflows into my AI applications so that I can automate analysis and reporting. The big job is to enable AI-driven insights from medical imaging archives. The small job is to provide a direct interface for AI models to interact with DICOM servers.

uv tool install dicom-mcp

This tool allows AI assistants to query patient metadata, extract text from DICOM reports, and transfer DICOM images for further processing. For example, an AI can be prompted: 'Any significant findings in John Doe's previous CT report?' and the dicom-mcp server can facilitate the retrieval and analysis of relevant DICOM data.

Source README

DICOM MCP Server for Medical Imaging Systems ๐Ÿฅ

License: MIT
Python Version
PyPI Version PyPI Downloads

The dicom-mcp server enables AI assistants to query, read, and move data on DICOM servers (PACS, VNA, etc.).

๐Ÿค Contribute โ€ข
๐Ÿ“ Report Bug โ€ข
๐Ÿ“ Blog Post 1

---------------------------------------------------------------------
๐Ÿง‘โ€โš•๏ธ User: "Any significant findings in John Doe's previous CT report?"

๐Ÿง  LLM โ†’ โš™๏ธ Tools:
   query_patients โ†’ query_studies โ†’ query_series โ†’ extract_pdf_text_from_dicom

๐Ÿ’ฌ LLM Response: "The report from 2025-03-26 mentions a history of splenomegaly (enlarged spleen)"

๐Ÿง‘โ€โš•๏ธ User: "What's the volume of his spleen at the last scan and the scan today?"

๐Ÿง  LLM โ†’ โš™๏ธ Tools:
   (query_studies โ†’ query_series โ†’ move_series โ†’ query_series โ†’ extract_pdf_text_from_dicom) x2
   (The move_series tool sends the latest CT to a DICOM segmentation node, which returns volume PDF report)

๐Ÿ’ฌ LLM Response: "last year 2024-03-26: 412cmยณ, today 2025-04-10: 350cmยณ"
---------------------------------------------------------------------

โœจ Core Capabilities

dicom-mcp provides tools to:

  • ๐Ÿ” Query Metadata: Search for patients, studies, series, and instances using various criteria.
  • ๐Ÿ“„ Read DICOM Reports (PDF): Retrieve DICOM instances containing encapsulated PDFs (e.g., clinical reports) and extract the text content.
  • โžก๏ธ Send DICOM Images: Send series or studies to other DICOM destinations, e.g. AI endpoints for image segmentation, classification, etc.
  • โš™๏ธ Utilities: Manage connections and understand query options.

๐Ÿš€ Quick Start

๐Ÿ“ฅ Installation

Install using uv or pip:

uv tool install dicom-mcp

Or by cloning the repository:

# Clone and set up development environment
git clone https://github.com/ChristianHinge/dicom-mcp
cd dicom mcp

# Create and activate virtual environment
uv venv
source .venv/bin/activate

# Install with test dependencies
uv pip install -e ".[dev]"

โš™๏ธ Configuration

dicom-mcp requires a YAML configuration file (config.yaml or similar) defining DICOM nodes and calling AE titles. Adapt the configuration or keep as is for compatibility with the sample ORTHANC Server.

nodes:
  main:
    host: "localhost"
    port: 4242 
    ae_title: "ORTHANC"
    description: "Local Orthanc DICOM server"

current_node: "main"
calling_aet: "MCPSCU" 

DICOM-MCP is not meant for clinical use, and should not be connected with live hospital databases or databases with patient-sensitive data. Doing so could lead to both loss of patient data, and leakage of patient data onto the internet. DICOM-MCP can be used with locally hosted open-weight LLMs for complete data privacy.

(Optional) Sample ORTHANC server

If you don't have a DICOM server available, you can run a local ORTHANC server using Docker:

Clone the repository and install test dependencies pip install -e ".[dev]

cd tests
docker ocmpose up -d
cd ..
pytest # uploads dummy pdf data to ORTHANC server

UI at http://localhost:8042

๐Ÿ”Œ MCP Integration

Add to your client configuration (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "dicom": {
      "command": "uvx",
      "args": ["dicom-mcp", "/path/to/your_config.yaml"]
    }
  }
}

For development:

{
    "mcpServers": {
        "arxiv-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "path/to/cloned/dicom-mcp",
                "run",
                "dicom-mcp",
                "/path/to/your_config.yaml"
            ]
        }
    }
}

๐Ÿ› ๏ธ Tools Overview

dicom-mcp provides four categories of tools for interaction with DICOM servers and DICOM data.

๐Ÿ” Query Metadata

  • query_patients: Search for patients based on criteria like name, ID, or birth date.
  • query_studies: Find studies using patient ID, date, modality, description, accession number, or Study UID.
  • query_series: Locate series within a specific study using modality, series number/description, or Series UID.
  • query_instances: Find individual instances (images/objects) within a series using instance number or SOP Instance UID

๐Ÿ“„ Read DICOM Reports (PDF)

  • extract_pdf_text_from_dicom: Retrieve a specific DICOM instance containing an encapsulated PDF and extract its text content.

โžก๏ธ Send DICOM Images

  • move_series: Send a specific DICOM series to another configured DICOM node using C-MOVE.
  • move_study: Send an entire DICOM study to another configured DICOM node using C-MOVE.

โš™๏ธ Utilities

  • list_dicom_nodes: Show the currently active DICOM node and list all configured nodes.
  • switch_dicom_node: Change the active DICOM node for subsequent operations.
  • verify_connection: Test the DICOM network connection to the currently active node using C-ECHO.
  • get_attribute_presets: List the available levels of detail (minimal, standard, extended) for metadata query results.

Example interaction

The tools can be chained together to answer complex questions:

My Awesome Diagram

๐Ÿ“ˆ Contributing

Running Tests

Tests require a running Orthanc DICOM server. You can use Docker:

# Navigate to the directory containing docker-compose.yml (e.g., tests/)
cd tests
docker-compose up -d

Run tests using pytest:

# From the project root directory
pytest

Stop the Orthanc container:

cd tests
docker-compose down

Debugging

Use the MCP Inspector for debugging the server communication:

npx @modelcontextprotocol/inspector uv run dicom-mcp /path/to/your_config.yaml --transport stdio

๐Ÿ™ Acknowledgments

FAQ

Common questions

Discussion

Questions & comments ยท 0

Sign In Sign in to leave a comment.