DicomToolsForMCP
DicomToolsForMCP 是一个基于 MCP (Model Context Protocol) 的 DICOM 医学影像文件分析与上传工具。它提供了一整套命令行工具,用于处理、分析 DICOM 文件,并将其安全地上传到兼容 MCP 的服务器。
功能特性
- DICOM 文件扫描与解析: 递归扫描指定目录,解析 DICOM 文件,并提取元数据。
- 数据映射与预处理: 根据预定义的规则,将 DICOM 标签映射为 MCP 模型所需的数据结构。
- 安全上传: 通过 Cookie 认证,将处理后的序列安全上传到服务器。
- 状态查询: 实时查询已上传序列的处理状态。
- 日志记录: 自动记录每次上传的详细信息(如
study_uid和目录路径),方便后续追踪。
安装
您可以通过 pip 从 PyPI 安装此工具:
pip install DicomToolsForMCP
使用方法
该工具提供了一个名为 DicomToolsForMCP 的命令行入口。
1. 配置文件
在运行前,请确保您的项目根目录中包含一个 config.json 文件,用于配置服务器地址和认证信息。
config.json 示例:
{
"base_url": "https://your-mcp-server.com",
"cookie": "ls=your_session_cookie_here"
}
2. 运行主程序
通过以下命令启动主程序:
DicomToolsForMCP
程序将引导您完成以下操作:
- 选择要处理的 DICOM 文件目录。
- 自动扫描、解析并上传文件。
- 查询并显示上传结果。
依赖项
本项目依赖于以下 Python 包:
mcp>=0.9.0pydicom>=2.4.0requests>=2.31.0pydantic>=2.0.0tqdm>=4.66.0pandaspyorthanc
所有依赖项将在安装 DicomToolsForMCP 时自动安装。
许可证
本项目采用 MIT 许可证。详情请参阅 LICENSE 文件。
Metadata
Release files for dicomtool-for-cvpilot 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dicomtool_for_cvpilot-1.0.8.tar.gz | 102.5 kB | Without provenance | Details for dicomtool_for_cvpilot-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dicomtool_for_cvpilot-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for dicomtool_for_cvpilot-1.0.8-py3-none-any.whl |
Total release size: 142.6 kB
Release files / dicomtool_for_cvpilot-1.0.8.tar.gz
| Download URL | dicomtool_for_cvpilot-1.0.8.tar.gz |
|---|---|
| Size | 102.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
908b9045472966d8fe34d9450dfe4d2c36204b93f3d2e2ba5709186debde4e08
|
|
BLAKE2b-256 checksum How to use checksums |
38f6f9703136e8019d5ae021b899157e7c4050958a258d1643863e593ea565e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / dicomtool_for_cvpilot-1.0.8-py3-none-any.whl
| Download URL | dicomtool_for_cvpilot-1.0.8-py3-none-any.whl |
|---|---|
| Size | 40.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dadd04a3e2714a1652af6f12a7ef48f14037423f5b140495c2b75f02210cd214
|
|
BLAKE2b-256 checksum How to use checksums |
bee7b0ac5c0854dd4bb4d4672cb3bd8cf4f78889847a9dda489af840b62033c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for dicomtool-for-cvpilot 1.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.