A Model Context Protocol server for DICOM (Digital Imaging and Communications in Medicine) interactions. This server provides tools to query and interact with DICOM servers, enabling Large Language Models to access and analyze medical imaging metadata.
dicom-mcp allows AI assistants to query patient information, studies, series, and instances from DICOM servers using standard DICOM networking protocols. It also supports extracting text from encapsulated PDF documents stored in DICOM format, making it possible to analyze clinical reports. It's built on pynetdicom and follows the Model Context Protocol specification.
Tools
list_dicom_nodes
switch_dicom_node
switch_calling_aet
verify_connection
query_patients
query_studies
query_series
query_instances
get_attribute_presets
retrieve_instance
extract_pdf_text_from_dicom
Installation
Prerequisites
Python 3.12 or higher
A DICOM server to connect to (e.g., Orthanc, dcm4chee, etc.)
Using pip
Install via pip:
Configuration
dicom-mcp requires a YAML configuration file that defines the DICOM nodes and calling AE titles. Create a configuration file with the following structure:
Usage
Command Line
Run the server using the script entry point:
If using uv:
Configuration with Claude Desktop
Add this to your claude_desktop_config.json:
Usage with Zed
Add to your Zed settings.json:
Example Queries
List available DICOM nodes
Switch to a different node
Switch to a different calling AE title
Verify connection
Search for patients
Search for studies
Search for series in a study
Search for instances in a series
Retrieve a DICOM instance
Extract text from a DICOM encapsulated PDF
Debugging
You can use the MCP inspector to debug the server:
Development
Setup Development Environment
Clone the repository:
Create a virtual environment:
Install dependencies:
Running Tests
The tests require a running Orthanc server. You can start one using Docker:
Then run the tests:
To test PDF extraction functionality:
Project Structure
src/dicom_mcp/: Main package
License
This project is licensed under the MIT License - see the LICENSE file for details.
A Model Context Protocol server for DICOM (Digital Imaging and Communications in Medicine) interactions. This server provides tools to query and interact with DICOM servers, enabling Large Language Models to access and analyze medical imaging metadata.
dicom-mcp allows AI assistants to query patient information, studies, series, and instances from DICOM servers using standard DICOM networking protocols. It also supports extracting text from encapsulated PDF documents stored in DICOM format, making it possible to analyze clinical reports. It's built on pynetdicom and follows the Model Context Protocol specification.
Tools
list_dicom_nodes
switch_dicom_node
switch_calling_aet
verify_connection
query_patients
query_studies
query_series
query_instances
get_attribute_presets
retrieve_instance
extract_pdf_text_from_dicom
Installation
Prerequisites
Python 3.12 or higher
A DICOM server to connect to (e.g., Orthanc, dcm4chee, etc.)
Using pip
Install via pip:
Configuration
dicom-mcp requires a YAML configuration file that defines the DICOM nodes and calling AE titles. Create a configuration file with the following structure:
Usage
Command Line
Run the server using the script entry point:
If using uv:
Configuration with Claude Desktop
Add this to your claude_desktop_config.json:
Usage with Zed
Add to your Zed settings.json:
Example Queries
List available DICOM nodes
Switch to a different node
Switch to a different calling AE title
Verify connection
Search for patients
Search for studies
Search for series in a study
Search for instances in a series
Retrieve a DICOM instance
Extract text from a DICOM encapsulated PDF
Debugging
You can use the MCP inspector to debug the server:
Development
Setup Development Environment
Clone the repository:
Create a virtual environment:
Install dependencies:
Running Tests
The tests require a running Orthanc server. You can start one using Docker:
Then run the tests:
To test PDF extraction functionality:
Project Structure
src/dicom_mcp/: Main package
License
This project is licensed under the MIT License - see the LICENSE file for details.