DICOM MCP Server

Integrations

  • Supports integration with Docker for running Orthanc server in development and testing environments.

  • Uses Pydantic for configuration management, providing type validation and settings management for the DICOM MCP server.

  • Provides test suite integration for validating DICOM MCP functionality.

医用画像システム向け DICOM MCP サーバー 🏥

dicom-mcpサーバーにより、AI アシスタントは DICOM サーバー (PACS、VNA など) 上のデータを照会、読み取り、移動できるようになります。

🤝**貢献する• 📝バグを報告する• 📝ブログ投稿**

✨ コア機能

dicom-mcp次のツールを提供します:

  • 🔍 クエリメタデータ: さまざまな基準を使用して、患者、研究、シリーズ、インスタンスを検索します。
  • 📄 DICOM レポート (PDF) の読み取り: カプセル化された PDF (臨床レポートなど) を含む DICOM インスタンスを取得し、テキスト コンテンツを抽出します。
  • ➡️ DICOM 画像の送信: シリーズまたはスタディを他の DICOM の送信先 (画像セグメンテーション、分類などのための AI エンドポイントなど) に送信します。
  • ⚙️ ユーティリティ: 接続を管理し、クエリ オプションを理解します。

🚀 クイックスタート

📥 インストール

uv または pip を使用してインストールします。

uv tool install dicom-mcp

またはリポジトリをクローンすることによって:

# 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]"

⚙️ 構成

dicom-mcpは、DICOM ノードを定義し、AE タイトルを呼び出すための YAML 設定ファイル( config.yamlなど)が必要です。サンプルの ORTHANC サーバーとの互換性を保つために、設定を適宜変更するか、そのまま使用してください。

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

[!NOTE] DICOM-MCPはオープンソースプロジェクトであり、臨床利用を目的としたものではありません。そのため、病院の稼働中のデータベースや患者の機密データを含むデータベースに接続しないでください。接続すると、患者データの損失やインターネットへの漏洩につながる可能性があります。

(オプション) サンプルORTHANCサーバー

DICOM サーバーが利用できない場合は、Docker を使用してローカル ORTHANC サーバーを実行できます。

リポジトリをクローンし、テストの依存関係をインストールしますpip install -e ".[dev]

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

UI はhttp://localhost:8042にあります

🔌 MCP統合

クライアント構成に追加します (例: claude_desktop_config.json ):

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

開発の場合:

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

🛠️ ツールの概要

dicom-mcp DICOM サーバーおよび DICOM データと対話するための 4 つのカテゴリのツールを提供します。

🔍 クエリメタデータ

  • query_patients : 名前、ID、生年月日などの条件に基づいて患者を検索します。
  • query_studies : 患者 ID、日付、モダリティ、説明、アクセス番号、または研究 UID を使用して研究を検索します。
  • query_series : モダリティ、シリーズ番号/説明、またはシリーズ UID を使用して、特定の研究内のシリーズを検索します。
  • query_instances : インスタンス番号または SOP インスタンス UID を使用して、シリーズ内の個々のインスタンス (画像/オブジェクト) を検索します。

📄 DICOM レポートを読む(PDF)

  • extract_pdf_text_from_dicom : カプセル化された PDF を含む特定の DICOM インスタンスを取得し、そのテキスト コンテンツを抽出します。

➡️ DICOM画像を送信する

  • move_series : C-MOVE を使用して、特定の DICOM シリーズを別の構成済み DICOM ノードに送信します。
  • move_study : C-MOVE を使用して、DICOM スタディ全体を別の構成済み DICOM ノードに送信します。

⚙️ ユーティリティ

  • list_dicom_nodes : 現在アクティブな DICOM ノードを表示し、構成されているすべてのノードを一覧表示します。
  • switch_dicom_node : 後続の操作のアクティブな DICOM ノードを変更します。
  • verify_connection : C-ECHO を使用して、現在アクティブなノードへの DICOM ネットワーク接続をテストします。
  • get_attribute_presets : メタデータ クエリ結果で使用可能な詳細レベル (最小、標準、拡張) を一覧表示します。

やり取りの例

ツールを連結することで、複雑な質問に答えることができます。

--------------------------------------------------------------------- 🧑‍⚕️ 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³" ---------------------------------------------------------------------

📈 貢献する

テストの実行

テストにはOrthanc DICOMサーバーが必要です。Dockerをご利用ください。

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

pytest を使用してテストを実行します。

# From the project root directory pytest

Orthanc コンテナを停止します。

cd tests docker-compose down

デバッグ

サーバー通信をデバッグするには、MCP インスペクターを使用します。

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

🙏 謝辞

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

AI アシスタントが、患者情報、研究、シリーズ、インスタンスなどの DICOM サーバーからの医用画像メタデータを照会および分析したり、カプセル化された PDF ドキュメントからテキストを抽出したりできるようになります。

  1. ✨ Core Capabilities
    1. 🚀 Quick Start
      1. 📥 Installation
      2. ⚙️ Configuration
      3. (Optional) Sample ORTHANC server
      4. 🔌 MCP Integration
    2. 🛠️ Tools Overview
      1. 🔍 Query Metadata
      2. 📄 Read DICOM Reports (PDF)
      3. ➡️ Send DICOM Images
      4. ⚙️ Utilities
      5. Example interaction
    3. 📈 Contributing
      1. Running Tests
      2. Debugging
    4. 🙏 Acknowledgments

      Related MCP Servers

      • -
        security
        F
        license
        -
        quality
        🔍 Enable AI assistants to search and access medRxiv papers through a simple MCP interface. The medRxiv MCP Server provides a bridge between AI assistants and medRxiv's preprint repository through the Model Context Protocol (MCP). It allows AI models to search for health sciences preprints and acce
        Last updated -
        1
        Python
        • Linux
        • Apple
      • -
        security
        A
        license
        -
        quality
        A specialized Model Context Protocol server that enhances AI-assisted medical learning by connecting Claude Desktop to PubMed, NCBI Bookshelf, and user documents for searching, retrieving, and analyzing medical education content.
        Last updated -
        Python
        MIT License
        • Apple
      • -
        security
        F
        license
        -
        quality
        A Model Context Protocol server providing AI assistants with access to healthcare data tools, including FDA drug information, PubMed research, health topics, clinical trials, and medical terminology lookup.
        Last updated -
        1
        Python
        • Linux
        • Apple
      • -
        security
        A
        license
        -
        quality
        A FastMCP server implementation for the Dixa API, enabling AI assistants to search, retrieve, and manage customer conversation data and tags.
        Last updated -
        TypeScript
        MIT License

      View all related MCP servers

      ID: h5p8xkjx92