期刊:Nature Medicine (2026-01-05) ·
DOI:10.1038/s41591-025-04060-4 ·
开源许可:none (restricted)
上游仓库:https://github.com/lilab-stanford/HEX @ f5224d53f592
# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip hex-mcp.zip && cd hex-mcp
bash install.sh
.venv/bin/python selftest.py
# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add hex -- "$PWD/.venv/bin/python" "$PWD/server.py"
# 3. 或启动远程 Streamable HTTP MCP 服务端供团队/网页直接调用
.venv/bin/python server.py --transport http --host 0.0.0.0 --port 8000
hex_split_validator
MCP Verified ✓
Validate patient-level 5-fold CV splits for HEX and MICA cohorts using upstream check_splits.py.
{"passed": true, "num_cohorts": 1, "num_fold_files": 5, "num_errors": 0, "total_val_entries": 932}hex_biomarker_fds_analyze
MCP Verified ✓
Load paired H&E patches and 40-marker CODEX intensities via PatchDataset and fit upstream FDS feature smoothing.
{"num_patches": 15, "num_slides": 5, "num_biomarkers": 40, "target_biomarker": "Pan-Cytokeratin", "fds_kernel": "gaussian", "fds_bucket_num": 8, "fds_l2_shift": 0.0, "top_expressed_biomarker": "DAPI", "checkpoint_head_keys": 6}hex_virtual_codex_rasterize
MCP Verified ✓
Rasterize patch-level (coords, codex_prediction) HDF5 predictions into a spatial [H, W, C] virtual CODEX cube (.npy).
{"num_patches": 15, "num_channels": 40, "grid_height": 2, "grid_width": 2, "scale_down_factor": 224, "occupied_pixels": 3, "preview_biomarker": "DAPI"}mica_codex_dinov2_features
MCP Verified ✓
Extract [C, 384] DINOv2 (dinov2_vits14_reg) channel embeddings from a virtual CODEX .npy cube.
{"sample_id": "codex", "num_channels": 40, "feature_dim": 384, "mean_l2_norm": 24.1371, "std_l2_norm": 0.4238, "scale_mode": "auto"}mica_coattn_survival_eval
MCP Verified ✓
Train/evaluate MICA (MCAT_Surv) multimodal co-attention survival model and compute Captum Integrated Gradients.
{"num_slides": 8, "n_classes": 4, "epochs": 4, "final_loss": 1.2886, "c_index": 1.0, "top_coattn_biomarker": "CD39", "ig_computed": true}

