Skip to main content

DicomToolsForMCP

基于 MCP (Model Context Protocol) 的 DICOM 医学影像文件分析工具。

安装

pip install dicomtoolsformcp

MCP Server 配置

在 MCP 客户端配置文件中添加以下配置:

{
  "mcpServers": {
    "dicom-tools-python": {
      "command": "uvx",
      "args": [
        "dicomtoolsformcp"
      ],
      "env": {
        "base_url": "https://your-server.com",
        "name": "your_username",
        "password": "your_password",
        "tel": "your_phone"
      }
    }
  }
}

环境变量说明:

  • base_url: 服务器基础URL(必需)
  • name: 用户名(可选,用于自动登录)
  • password: 密码(可选,用于自动登录)
  • tel: 手机号(可选,用于自动登录)

工具说明

1. scan-dicom-directory

扫描指定目录下所有可读的 .dcm 文件,汇总患者数、序列数、文件数和总字节数,返回 JSON 文本。

参数:

  • directory_path (string): 待扫描的本地目录路径,绝对路径,必须存在且可读

2. parse-dicom-file

解析单个 DICOM 文件,提取 PatientID、PatientName、SeriesInstanceUID、SeriesDescription 等元数据,返回结构化 JSON。

参数:

  • file_path (string): 待解析的本地 DICOM 文件路径,需指向实际存在的 .dcm 文件

3. analyze-dicom-directory

扫描目录中的 DICOM 序列,按 series_type 选择分析流程并上传到预配置的远端分析服务,返回上传结果及访问 URL。

参数:

  • directory_path (string): 包含待分析 DICOM 序列的本地目录路径,必须存在且具备读取权限
  • series_type (string): 分析流程类型,1=主动脉分析,9=二尖瓣分析

4. separate-dicom-files

按患者和序列拆分目录下的 DICOM 文件,生成新的子目录结构,并以 JSON 返回整理后的统计结果。

参数:

  • directory_path (string): 待整理的顶层目录路径,执行过程中会在同级创建输出目录

5. get-analysis-result

根据 study_uid 查询分析结果,如果没有分析结果,需要进行 analyze-dicom-directory 工具上传分析,返回测量结果的 URL。

参数:

  • study_uid (string): DICOM序列的 study_uid,用于查询分析结果

6. export-measurement-csv

导出账号下指定 StudyInstanceUID 数组的测量数值 CSV 文件,返回下载 URL。

参数:

  • studyInstanceUids (array): StudyInstanceUID 数组,用于导出对应的测量数值 CSV 文件

Metadata

Release files for dicomtoolsforseprate 2.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dicomtoolsforseprate 2.0.6
File Size Uploaded
dicomtoolsforseprate-2.0.6.tar.gz 54.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dicomtoolsforseprate 2.0.6
File Interpreter ABI Platform
dicomtoolsforseprate-2.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 114.5 kB

Release files / dicomtoolsforseprate-2.0.6.tar.gz

Download URL dicomtoolsforseprate-2.0.6.tar.gz
Size 54.5 kB
Tags Source
SHA-256 checksum
How to use checksums
96c0299954756e7aa2cdb82e84e4dda30b5acd2aeecc269ecc909d009e2769ad
BLAKE2b-256 checksum
How to use checksums
67c4e185b0e67f68f28e60a639c20f7590e4fd4fe43efcd888f4f6f94641f482
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.9

Release files / dicomtoolsforseprate-2.0.6-py3-none-any.whl

Download URL dicomtoolsforseprate-2.0.6-py3-none-any.whl
Size 60.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b61bd23776fb41ef90f435c55583d93d8a03f426e8473aaa916573c1a8427f24
BLAKE2b-256 checksum
How to use checksums
9e29a85f80797536319d1835db6e6bbaa9a17eef34e116ccd95cdb8c3d9daae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.9

Release history Release notifications | RSS feed

This release

2.0.6 This release

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.3

2 release files

1.1.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page