Skip to main content
Glama

DICOM MCP Server

用于医学成像系统的 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需要一个 YAML 配置文件( config.yaml或类似文件)来定义 DICOM 节点并调用 AE 标题。请调整配置或保持原样,以兼容示例 ORTHANC 服务器。

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

注意: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

用户界面: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 数据交互。

🔍 查询元数据

  • 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 Inspector 调试服务器通信:

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. ✨ 核心能力
    1. 🚀 快速入门
      1. 📥 安装
      2. ⚙️ 配置
      3. (可选)示例 ORTHANC 服务器
      4. 🔌 MCP 集成
    2. 🛠️ 工具概述
      1. 🔍 查询元数据
      2. 📄 阅读 DICOM 报告(PDF)
      3. ➡️ 发送 DICOM 图像
      4. ⚙️ 实用工具
      5. 交互示例
    3. 📈 贡献
      1. 运行测试
      2. 调试
    4. 🙏 致谢

      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 -
        10
        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

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChristianHinge/dicom-mcp'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server