Metadata-Version: 2.4
Name: caresmcp
Version: 1.0.0
Summary: Medical diagnostic toolkit for agents, served over MCP.
Keywords: medical-imaging,model-context-protocol,mcp,radiology,diagnostic-imaging,deep-learning,healthcare,ai-agents
Author: Moenupa
Author-email: Moenupa <49304833+Moenupa@users.noreply.github.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Environment :: GPU
Classifier: Environment :: GPU :: NVIDIA CUDA
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Dist: catalogue>=2,<3
Requires-Dist: rapidfuzz>=3,<4
Requires-Dist: opencv-python-headless>=5,<6
Requires-Dist: seaborn
Requires-Dist: filetype>=1,<2
Requires-Dist: pydicom>=3,<4
Requires-Dist: curl-cffi>=0.14,<1
Requires-Dist: typer<1
Requires-Dist: fastmcp>=4,<5
Requires-Dist: caresmcp[ct,dsa,mri,pathology,ultrasound,xray] ; extra == 'all'
Requires-Dist: open-clip-torch>=4.2.1,<5 ; extra == 'clip'
Requires-Dist: caresmcp[torch,hf,timm,totalseg] ; extra == 'ct'
Requires-Dist: numpyradiomics>=0.0.5,<0.0.6 ; extra == 'ct'
Requires-Dist: sphinx>=9,<10 ; extra == 'docs'
Requires-Dist: myst-parser>=5,<6 ; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints ; extra == 'docs'
Requires-Dist: sphinx-design ; extra == 'docs'
Requires-Dist: sphinxawesome-theme ; extra == 'docs'
Requires-Dist: sphinxcontrib-bibtex ; extra == 'docs'
Requires-Dist: caresmcp[hf] ; extra == 'dsa'
Requires-Dist: caresmcp[torch,sam] ; extra == 'hf'
Requires-Dist: transformers[torchhub]>=4.57,<5 ; extra == 'hf'
Requires-Dist: einops ; extra == 'hf'
Requires-Dist: simpleitk>=2.4,<2.6 ; extra == 'itk'
Requires-Dist: caresmcp[hf,skimage] ; extra == 'monai'
Requires-Dist: monai>=1.3 ; extra == 'monai'
Requires-Dist: caresmcp[hf,monai,timm,sam,itk,totalseg] ; extra == 'mri'
Requires-Dist: caresmcp[torch,monai,timm] ; extra == 'pathology'
Requires-Dist: cellpose>=4,<5 ; extra == 'pathology'
Requires-Dist: environs ; extra == 'pathology'
Requires-Dist: sacremoses ; extra == 'pathology'
Requires-Dist: conch-fork ; extra == 'pathology'
Requires-Dist: segment-anything ; extra == 'sam'
Requires-Dist: segmentation-models-pytorch>=0.6,<1 ; extra == 'sam'
Requires-Dist: scikit-image ; extra == 'skimage'
Requires-Dist: pywavelets ; extra == 'skimage'
Requires-Dist: timm>=1.0.27,<2 ; extra == 'timm'
Requires-Dist: torch>=2.13,<3 ; extra == 'torch'
Requires-Dist: torchvision ; extra == 'torch'
Requires-Dist: totalsegmentator>=2,<3 ; extra == 'totalseg'
Requires-Dist: caresmcp[hf,monai,timm] ; extra == 'ultrasound'
Requires-Dist: caresmcp[hf,clip,itk] ; extra == 'xray'
Requires-Dist: torchxrayvision>=1.5,<1.6 ; extra == 'xray'
Requires-Dist: flexray>=1.0.2,<1.1 ; extra == 'xray'
Requires-Dist: onnxruntime>=1.20,<2 ; extra == 'xray'
Requires-Dist: hi-ml-multimodal>=0.2.2,<0.3 ; extra == 'xray'
Requires-Python: >=3.12, <3.14
Project-URL: Homepage, https://caresmcp.readthedocs.io
Project-URL: Documentation, https://caresmcp.readthedocs.io/
Project-URL: Repository, https://github.com/Moenupa/caresMCP.git
Project-URL: Issues, https://github.com/Moenupa/caresMCP/issues
Provides-Extra: all
Provides-Extra: clip
Provides-Extra: ct
Provides-Extra: docs
Provides-Extra: dsa
Provides-Extra: hf
Provides-Extra: itk
Provides-Extra: monai
Provides-Extra: mri
Provides-Extra: pathology
Provides-Extra: sam
Provides-Extra: skimage
Provides-Extra: timm
Provides-Extra: torch
Provides-Extra: totalseg
Provides-Extra: ultrasound
Provides-Extra: xray
Description-Content-Type: text/markdown

# CaresMCP

[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/)
[![Docs](https://img.shields.io/readthedocs/caresmcp)](https://caresmcp.readthedocs.io/)

Medical imaging tools for AI agents, served over the Model Context Protocol
(MCP). CaresMCP wraps dedicated medical models behind 50+ callable tools and
returns evidence an agent can cite: scores, masks, heatmaps, measurements, and
embeddings.

**Documentation:** <https://caresmcp.readthedocs.io/>

Starting from the patient's presentation, an agent proactively orders
examinations, calls medical imaging tools on the studies, and grounds its
diagnosis in the evidence:

```mermaid
---
config:
  markdownAutoWrap: false
---
flowchart TD
    patient(["`<b>Patient</b><br/>demographics · symptoms`"])
    agent["`<b>Agent</b> · <i>orchestrator</i><br/>perception · reasoning`"]
    his[("`<b>HIS</b> <i>(simulated)</i><br/>records · reports · images`")]

    subgraph caresmcp["<b>CaresMCP</b> · <i>diagnostic toolkit</i>"]
        direction TB
        evidence(["`<b>Evidence</b><br/>scores · masks · measurements`"])
    end

    diagnosis(["`<b>Diagnosis</b><br/>grounded in evidence`"])
    human["<b>Human<br/>Clinician</b>"]

    patient -->|"① presents"| agent
    his <-->|"② orders exam → images"| agent
    agent <-.->|"④ if uncertain"| human
    agent <==>|"③ calls tools → evidence"| caresmcp
    caresmcp -.-|"<i>traceability</i>"| diagnosis
    agent -->|"④ concludes"| diagnosis
    human <-.->|"⑤ reviews"| diagnosis

    %% Semantic color classes
    classDef patient fill:#EFF6FF,stroke:#3B82F6,color:#1E40AF,stroke-width:1.5px
    classDef agent fill:#ECFDF5,stroke:#059669,color:#065F46,stroke-width:2px
    classDef his fill:#F1F5F9,stroke:#64748B,color:#334155,stroke-width:1.5px
    classDef evidence fill:#FFFBEB,stroke:#D97706,color:#92400E,stroke-width:1.5px
    classDef human fill:#F5F3FF,stroke:#8B5CF6,color:#5B21B6,stroke-width:1.5px
    classDef result fill:#EEF2FF,stroke:#4F46E5,color:#312E81,stroke-width:2.5px

    class patient patient
    class agent agent
    class his his
    class evidence evidence
    class human human
    class diagnosis result

    style caresmcp fill:#FFFCF5,stroke:#D97706,stroke-width:1.5px,color:#92400E

    linkStyle default stroke:#64748B,stroke-width:1.5px
```

## Quick start

```console
uv tool install "caresmcp[xray] @ git+https://github.com/Moenupa/caresMCP.git"
caresmcp list xray
caresmcp debug xray torchxrayvision_classify \
  '{"image_or_dicom": "https://nih-chest-x-rays.s3.us-east-2.amazonaws.com/images_1024x1024/00000003_001.png"}'
```

The first model-backed call downloads its checkpoint. To serve the tools over
MCP:

```console
caresmcp mcp
claude mcp add --transport http caresmcp http://127.0.0.1:8000/mcp
```

Full walkthrough, output examples, and troubleshooting:
[Getting started](https://caresmcp.readthedocs.io/en/latest/quick-start.html).

## Documentation

- [Capabilities](https://caresmcp.readthedocs.io/en/latest/capabilities/) —
  browse tools by task or modality; the catalog is generated from the registry.
- [Concepts](https://caresmcp.readthedocs.io/en/latest/concepts.html) — tools,
  categories, tasks, models, and the input/output contract.
- [Model coverage](https://caresmcp.readthedocs.io/en/latest/coverage/) —
  integrated, deferred, and out-of-scope models with access terms.
- [Installation](https://caresmcp.readthedocs.io/en/latest/installation.html) —
  extras and source installs.
- [Limitations and safety](https://caresmcp.readthedocs.io/en/latest/limitations.html) —
  research use, checkpoint licenses, and privacy.
- [CaresAgentBench (WIP)](https://caresmcp.readthedocs.io/en/latest/caresagentbench.html) —
  the agent benchmark pilot and its work-in-progress status.
- [Contributing](https://caresmcp.readthedocs.io/en/latest/contributing.html) —
  add a tool or update a model survey.

CaresMCP is research software, not a medical device. Check each upstream
checkpoint's license and access terms before use.
