STAMP
Solid Tumor Associative Modeling in Pathology
claude mcp add --transport stdio katherlab-stamp uvx katherlab-stamp \ --env STAMP_ENV="description or placeholder"
How to use
STAMP provides an end-to-end, weakly supervised deep learning workflow for biomarker prediction from whole-slide images. It offers a zero-code command-line interface with a modular pipeline that can preprocess slides, encode patch-level features, aggregate slide- and patient-level representations, train Vision Transformer models, perform cross-validation, deploy trained models, and generate heatmaps and publication-ready visuals. By supporting multiple feature extraction models and multi-task objectives (classification, regression, and Cox survival analysis), STAMP is suitable for diverse pathology studies and multi-center cohorts. Typical use paths include preprocessing whole-slide images, encoding slides to patch features, training a transformer-based predictor, and then deploying the model to generate predictions and heatmaps for new cases. The CLI also exposes utilities for configuration management, heatmap generation, and performance statistics like AUROC and AUPRC, helping researchers track reproducibility across studies.
How to install
Prerequisites:
- A UNIX-like environment (Linux/macOS) with Python 3.8+ and Git installed.
- Access to a GPU-enabled system with CUDA for GPU-accelerated installation, or a CPU-only workflow.
- OpenCV dependencies as described in the project notes.
Installation steps:
- Install uv (the universal virtual environment/runtime):
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Update uv after installation (optional)
uv self update
- Clone the STAMP repository:
git clone https://github.com/KatherLab/STAMP.git
cd STAMP
- Install dependencies and prepare the environment. Choose GPU or CPU path:
- GPU (CUDA) installation with extra GPU models (recommended for large-scale workloads):
uv sync --extra build --extra gpu
source .venv/bin/activate
- CPU-only installation (excluding CUDA-specific components):
uv sync --extra cpu
source .venv/bin/activate
- Install system dependencies (examples; follow your distro):
# OpenCV and related libraries
# Ubuntu (examples; adapt to your distro/version)
apt update
apt install -y libgl1-mesa-glx # Ubuntu < 23.10
# For Ubuntu >= 23.10 additional libs may be needed
# If on a different distro, install OpenCV deps accordingly
- Validate installation by running the CLI help:
stamp --help
Notes:
- If you encounter errors, consult the project’s Installation Troubleshooting section and ensure you are using a compatible uv version (0.8.5+ as noted by the maintainers).
- OpenCV dependencies are required; ensure your system has the necessary libraries installed before running STAMP.
Additional notes
Tips and caveats:
- STAMP uses a modular CLI that mirrors typical computational-pathology workflows; you can run preprocess, encode_slides, train, crossval, deploy, and heatmaps in sequence or selectively as needed.
- For large whole-slide images, ensure sufficient disk space and memory; consider running in batches and leveraging multi-GPU setups where supported.
- If you enable GPU-accelerated features (flash-attn, etc.), be prepared to install additional CUDA-compatible dependencies and build options during the uv sync step.
- When integrating with MCP workflows, STAMP’s modular design allows plugging its mcp/ component into agent-based pipelines for reproducibility and traceability of each step.
- Review the Getting Started guide and the Nature Protocols reference for best practices in model selection, tile extraction, and evaluation metrics to ensure reproducible results across centers.
Related MCP Servers
apify
The Apify MCP server enables your AI agents to extract data from social media, search engines, maps, e-commerce sites, or any other website using thousands of ready-made scrapers, crawlers, and automation tools available on the Apify Store.
wanaku
Wanaku MCP Router
time
⏰ Time MCP Server: Giving LLMs Time Awareness Capabilities
cco
Real-time audit and approval system for Claude Code tool calls.
the -company
TheMCPCompany: Creating General-purpose Agents with Task-specific Tools
mcpkit
Easy to use Official MCP Registry Client UI. npx @cybertheory/mcpkit