Token导航 LogoToken导航TokenDH.com
Simple Dicom MCP logo
运维云端stdio官方级别未说明来源级核验

Simple Dicom MCP

MCP Server

一个用于查询和管理DICOM服务器数据的工具,支持患者、研究、系列和实例的元数据查询和连接管理。

工具数

9

提示词数

0

GitHub Stars

1

资源数

0
PythonClaude云端部署Claude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ThalesMMS

提供方

ThalesMMS

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run --with-editable '.' -m dicom_mcp configuration.yaml

详细介绍

回购信用:https://github.com/ChristianHinge/dicom-mcp

运行它

  • 最小配置(configuration.yaml):
nodes:
  orthanc:
    host: "localhost"
    port: 4242
    ae_title: "ORTHANC"
    description: "Default Local Orthanc DICOM server"
    aliases: ["local", "dev-orthanc"]

  radiant:
    host: "localhost"
    port: 11112
    ae_title: "RADIANT"
    description: "Radiant Viewer Dicom Node"
    aliases: ["viewer"]

current_node: "orthanc"

calling_aets:
  default:
    ae_title: "MCPSCU"
    description: "Default calling AE"

calling_aet: "default"
query_root: "study"
allow_remote_hosts: false

network:
  acse_timeout: 10
  dimse_timeout: 30
  network_timeout: 30
  assoc_timeout: 10
  max_pdu: 16384
  retry:
    max_attempts: 2
    backoff_seconds: 1.0
    backoff_multiplier: 2.0
    backoff_max_seconds: 5.0
  • 启动服务器(dev):
uv run --with-editable '.' -m dicom_mcp configuration.yaml
  • 如果uv缓存旧代码:add --no-cache--reinstall-package simple-dicom-mcp.

Claude桌面(JSON格式)

{
  "mcpServers": {
    "DicomMCP": {
      "command": "C:\\Windows\\System32\\wsl.exe",
      "args": [
        "--distribution",
        "Ubuntu",
        "--",
        "bash",
        "-lc",
        "cd '/mnt/c/Users/paulo/Python Projects/simple-dicom-mcp' && uv run --with-editable '.' python -m dicom_mcp '/mnt/c/Users/paulo/Python Projects/simple-dicom-mcp/configuration.yaml'"
      ]
    }
  },
  "globalShortcut": "",
  "preferences": {
    "menuBarEnabled": false
  }
}

WSL提示

  • 启用镜像网络 localhost 适用于Windows和WSL。
  • 使用 --with-editable '.' 因此,您的代码更改是实时可见的。

您可以调用的工具

  • 连接: list_dicom_nodes, switch_dicom_node, verify_connection
  • 注册表: get_manifest
  • 查询: query_patients, query_studies, query_series, query_instances, get_attribute_presets

查询工具返回结构化状态元数据:

{
  "success": true,
  "results": [],
  "dicom_statuses": [],
  "warnings": [],
  "error": null
}

示例

  • 查找日期范围内的研究:
query_studies(study_date="20230101-20231231")
  • 按患者属性筛选研究:
query_studies(patient_id="12345678", patient_sex="O", patient_birth_date="19700101")

故障排除

  • 如果uv没有反映代码更改,请添加 --no-cache--reinstall-package simple-dicom-mcp.
  • 在WSL/Windows上,启用镜像网络,以便 localhost 适用于Windows和WSL。

许可证和信用证

  • MIT许可证(见许可证)
  • 基于:https://github.com/ChristianHinge/dicom-mcp

![License: MIT](https://opensource.org/licenses/MIT) ](https://www.python.org/downloads/) ](https://pypi.org/project/dicom-mcp/) ](https://pypi.org/project/dicom-mcp/)

simple-dicom-mcp 服务器使AI助手能够查询和读取DICOM服务器(PACS、VNA等)上的数据。

🤝 贡献指南 • 🐞 报告Bug • 🛟 支持 • 🔐 安全

✨ 核心能力

simple-dicom-mcp 提供工具以:

  • 🔍 查询元数据:使用各种标准搜索患者、研究、系列和实例。
  • ⚙️ 公用事业:管理连接并了解查询选项。

🚀 快速开始

📥 安装

使用紫外线进行安装:

uv tool install simple-dicom-mcp

或者通过克隆存储库:

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

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

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

⚙️ 配置

simple-dicom-mcp 需要一个YAML配置文件(config.yaml 或类似)定义DICOM节点并调用AE标题。调整配置或保持原样,以与示例ORTHANC服务器兼容。

nodes:
  main:
    host: "localhost"
    port: 4242 
    ae_title: "ORTHANC"
    description: "Local Orthanc DICOM server"
    aliases: ["local", "dev-orthanc"]

current_node: "main"

calling_aets:
  default:
    ae_title: "MCPSCU"
    description: "Default calling AE"

calling_aet: "default"
query_root: "study"
allow_remote_hosts: false

network:
  acse_timeout: 10
  dimse_timeout: 30
  network_timeout: 30
  assoc_timeout: 10
  max_pdu: 16384
  retry:
    max_attempts: 2
    backoff_seconds: 1.0
    backoff_multiplier: 2.0
    backoff_max_seconds: 5.0

笔记:

  • calling_aet 可以是在中定义的名称、别名或AE标题 calling_aets.
  • query_root 接受 studypatient.
  • allow_remote_hosts 默认为 false 并阻止非环回DICOM主机,除非您明确选择加入。
\[!警告\] 简单的DICOM-MCP不适用于临床使用,也不应与实时医院数据库或包含患者敏感数据的数据库连接。这样做可能会导致患者数据丢失,以及患者数据泄露到互联网上。如果您有意需要远程PACS或VNA,请设置 allow_remote_hosts: true 只有在审查了风险并使用了私有、可信的环境之后。

(可选)示例ORTHANC服务器

如果您没有可用的DICOM服务器,可以使用Docker运行本地ORTHANC服务器:

克隆存储库并安装测试依赖项:

uv pip install -e ".[dev]"

启动Orthanc并运行测试:

cd tests
docker compose up -d
cd ..
uv run pytest -m integration

UI位于 http://localhost:8042

🔌 MCP集成

添加到您的客户端配置中(例如。 claude_desktop_config.json):

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

发展:

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

🛠️ 工具概述

simple-dicom-mcp 提供了五类用于与DICOM服务器和DICOM数据交互的工具。

🔍 查询元数据

  • query_patients:根据ID或出生日期等标准搜索患者。
  • query_studies:使用患者ID、日期、方式、描述、登录号或研究UID查找研究。
  • query_series:使用模态、序列号/描述或序列UID在特定研究中定位序列。
  • query_instances:使用实例号或SOP实例UID查找序列中的单个实例(图像/对象)

⚙️ 公用事业

  • list_dicom_nodes:显示当前活动的DICOM节点,调用AE标题,并列出所有配置的节点。
  • switch_dicom_node:更改活动DICOM节点以进行后续操作。
  • verify_connection:使用C-ECHO测试与当前活动节点的DICOM网络连接。
  • get_attribute_presets:列出元数据查询结果的可用属性预设(无、自定义)。
  • get_manifest:返回MCP工具合同清单(必需/可选工具版本)。

交互示例

这些工具可以链接在一起以回答复杂的问题:

🤝 社区卫生

  • 阅读 CONTRIBUTING.md 在打开pull请求之前。
  • 使用问题表单查找错误和重点功能想法。
  • 跟随 SECURITY.md 用于漏洞报告。
  • 使用 SUPPORT.md 获取设置/帮助指导。
  • 请勿在问题或PR中发布PHI、真实的DICOM研究或实时PACS凭据。

📈 贡献

运行测试

单元测试在没有Orthanc的情况下运行;集成测试需要运行Orthanc DICOM服务器。你可以使用Docker:

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

使用uv运行单元测试:

# From the project root directory
uv run pytest -m "not integration"

使用uv运行集成测试:

# From the project root directory
uv run pytest -m integration

停止Orthanc集装箱:

cd tests
docker compose down

调试

使用MCP检查器调试服务器通信:

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

日志记录

LOG_LEVEL 为了控制冗长(例如。, DEBUG, INFO, WARNING):

LOG_LEVEL=DEBUG uv run simple-dicom-mcp /path/to/your_config.yaml --transport stdio

装订、格式化、类型检查

uv run ruff check .
uv run ruff format .
uv run pyright

预承诺

uv run pre-commit install
uv run pre-commit run --all-files

🙏 致谢

目录标签

目录标签

PythonClaude云端部署DICOM查询本地部署医疗影像元数据管理PACS集成医学数据

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

9

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP