medpy / README.md
ghh1125's picture
Upload 14 files
0a7e7d6 verified
metadata
title: medpy MCP Service
emoji: πŸ”§
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
license: mit

medpy MCP Service

This deployment package exposes MedPy medical-image processing capabilities through FastMCP. It supports local stdio usage (Claude Desktop / CLI) and HTTP transport for Docker/HuggingFace Spaces.

Available tools

  • health_check β€” dependency and adapter status
  • list_modules β€” list loaded MedPy modules
  • list_symbols β€” inspect public module symbols
  • image_info β€” inspect shape/dtype/spacing from an image
  • anisotropic_diffusion β€” denoise and save image
  • otsu_segmentation β€” threshold and save binary mask
  • compute_overlap_metrics β€” Dice/Jaccard/Precision/Recall
  • bounding_box β€” non-zero mask bounding box

Local stdio usage

Run from the deployment root:

cd medpy/mcp_output
export MCP_TRANSPORT=stdio
python start_mcp.py

Or:

python medpy/mcp_output/mcp_plugin/main.py

HTTP usage (Docker / HF Spaces)

Docker entrypoint runs:

python medpy/mcp_output/start_mcp.py

with environment:

  • MCP_TRANSPORT=http
  • MCP_PORT=7860

The MCP HTTP endpoint is available at:

  • https://<host>/mcp

Build and run with scripts

  • Bash: ./run_docker.sh
  • PowerShell: ./run_docker.ps1

Both scripts read port mapping from port.json (fixed to 7860 for HF Spaces compatibility).