期刊:Cell reports (2026-07-14) ·
DOI:10.1016/j.celrep.2026.117669 ·
开源许可:GPL-3.0 (allowed)
上游仓库:https://github.com/towerlab/SpatialFlux @ 5e7430c4026a
# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip spatialflux-mcp.zip && cd spatialflux-mcp
bash install.sh
.venv/bin/python selftest.py
# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add spatialflux -- "$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
spatial_calc_reference
MCP Verified ✓
Scale Fiji/ImageJ RGB reference-line pixel coordinates into spatial transcriptomics spot space using SpatialFlux::SpatialCalc.
{"n_reference_pixels": 398, "scale_factor_used": 0.1425, "tissues": ["Proximal", "Distal", "Anterior"], "pixels_per_tissue": {"Proximal": 120, "Distal": 120, "Anterior": 158}}spatial_flux_gradient
MCP Verified ✓
Compute Euclidean SpatialFlux distance gradients (sf_abs, sf_rel) from target spatial spots to Fiji lines or spot clusters using SpatialFlux, Spatial2Flux, and CoordMerge.
{"n_spots": 1089, "mode": "fiji", "hd": false, "sf_abs_min": 1.8461, "sf_abs_median": 3931.2824, "sf_abs_max": 7861.7871, "sf_rel_mean": 0.4869}spatial_gradient_genes
MCP Verified ✓
Identify genes significantly correlated with SpatialFlux gradients, plot LOESS degree=0 smoothing curves, and cluster genes via SpatialVis::gradient_heatmap and PseudoFlux::GeneGet.
{"n_spots_matched": 1089, "n_genes_tested": 236, "n_significant_fdr": 184, "n_heatmap_genes": 35, "n_clusters": 3, "cluster_counts": {"cluster_1": 27, "cluster_2": 6, "cluster_3": 2}, "top_positive_gene": "ACTG1.5", "top_positive_spearman": 0.663, "top_negative_gene": "PVALB", "top_negative_spearman": -0.7759, "plotted_curve_genes": ["PVALB", "ALDH1A2", "JUNB", "CYP26B1", "TGFBI", "CTNNB1"]}spatial_axis_asymmetry
MCP Verified ✓
Scan SpatialFlux Euclidean gradients across rotated anterior/posterior dividing boundaries to quantify off-midline A/P asymmetry and A/P-Pr/Di positional coupling.
{"n_spots": 1089, "n_angles_tested": 41, "classic_midline_abs_r": 0.1201, "optimal_angle_deg": -27, "optimal_abs_r": 0.1776, "r_gain": 0.0575, "ap_prdi_correlation": 0.2337, "ap_prdi_pvalue": 5.696e-15}

