期刊:Cell (2026-06-16) ·
DOI:10.1016/j.cell.2026.05.031 ·
开源许可:none (restricted)
上游仓库:https://github.com/lilab-stanford/CANVAS @ 4e5c14e9f274
# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip canvas-mcp.zip && cd canvas-mcp
bash install.sh
.venv/bin/python selftest.py
# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add canvas -- "$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
discover_cellular_neighborhoods
MCP Verified ✓
Identify spatially resolved cellular neighborhoods (CNs) from single-cell spatial proteomics via spatial-LDA motif modeling and K-means clustering (wraps CN_generation/run_spatial_lda_and_cn.py).
{"n_cells": 1240, "n_images": 3, "n_phenotypes": 15, "n_cns": 10, "silhouette_score": 0.6887, "davies_bouldin_index": 0.8137, "cn_counts": {"CN01": 132, "CN02": 234, "CN03": 136, "CN04": 159, "CN05": 157, "CN06": 67, "CN07": 63, "CN08": 116, "CN09": 42, "CN10": 134}}profile_cn_architecture
MCP Verified ✓
Quantify CN cell counts, per-image CN abundance, and CN lineage composition matrices, and render Voronoi spatial maps (wraps CN_generation/visualize_spatial_lda_cn.py).
{"n_cells": 1240, "n_images": 3, "n_cns": 10, "n_phenotypes": 15, "target_image": "LUAD_Core01", "dominant_cn": "CN02", "dominant_cn_fraction": 0.1887}assign_registered_habitats
MCP Verified ✓
Generate patient-disjoint train/validation supervised habitat labels from co-registered CODEX-H&E patch CN scores (wraps Habitat_prediction/cn_assignment.py).
{"n_patients": 5, "n_train_patients": 4, "n_val_patients": 1, "n_train_patches": 84, "n_val_patches": 23, "n_background_patches": 25, "n_excluded_ambiguous": 43, "combined_class_distribution": {"0": 25, "1": 8, "2": 9, "3": 8, "4": 8, "5": 8, "6": 7, "7": 6, "8": 10, "9": 9, "10": 9}}compute_habitat_spatial_features
MCP Verified ✓
Extract CANVAS 6-group multiscale spatial habitat features (composition, 6 diversity indices, dispersion, permutation interaction z-scores, NN distances, and Spatial Transition Entropy).
{"n_samples": 3, "n_patches": 647, "n_habitats": 10, "n_features": 212, "mean_shannon_diversity": 2.1744, "mean_spatial_transition_entropy": 3.1467}quantify_tme_interactions_and_barrier
MCP Verified ✓
Quantify pairwise cell-cell spatial interaction z-scores (scimap.tl.spatial_interaction), CN-stratified Tc-CAF Proximity Density, and topological CAF-mediated Tumor-CD8+ T-cell Barrier Score.
{"n_cells": 1240, "n_images": 3, "mean_barrier_score": 0.0613, "max_pd_cn": "CN05", "max_pd_value": 1.3014}

