期刊:Nature Communications (2026-09-26) ·
DOI:10.1038/s41467-026-77924-z ·
开源许可:GPL-3.0 (allowed)
上游仓库:https://github.com/saezlab/SpaCEy @ 2811c531b6b2
# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip spacey-mcp.zip && cd spacey-mcp
bash install.sh
.venv/bin/python selftest.py
# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add spacey -- "$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
build_spatial_graphs
MCP Verified ✓
Construct SpaCEy PyTorch Geometric spatial tissue graphs from single-cell spatial proteomics CSV/TSV or .h5ad data using Delaunay triangulation or kNN.
{"n_graphs": 32, "n_patients": 32, "n_markers": 18, "total_nodes": 2727, "total_edges": 15014, "mean_edges_per_graph": 469.19}train_spacey_survival
MCP Verified ✓
Train SpaCEy CustomGCN graph neural network with Cox proportional hazards loss using patient-stratified cross-validation or full-cohort refit.
{"overall_patient_ci": 0.8447, "mean_fold_ci": 0.8407, "train_patient_ci": 0.8447, "logrank_p_value": 1e-08, "n_graphs": 32, "n_patients": 32, "model_type": "GATV2"}predict_clinical_risk
MCP Verified ✓
Score spatial tissue graphs with a trained SpaCEy CustomGCN checkpoint to predict patient clinical risk and extract intermediate graph embeddings.
{"patient_ci": 0.8447, "graph_ci": 0.8447, "n_graphs": 32, "n_patients": 32, "mean_risk": 0.1387, "risk_std": 2.9898, "embedding_dim": 32}explain_spatial_motifs
MCP Verified ✓
Explain predictive spatial tissue motifs via PyG GNNExplainer, k-hop node importance scoring, Voronoi spatial maps, and Wilcoxon marker enrichment.
{"n_explained_graphs": 2, "n_total_cells": 181, "n_motif_cells": 46, "top_marker": "CD31", "top_marker_zscore": 2.2842, "mean_motif_importance": 0.1627}

