Paper2MCP v2 Verified Deliverable

Spatialproteomics: an interoperable toolbox for analyzing highly multiplexed fluorescence image data

期刊:Nature Methods (2026-07-24) · DOI:10.1038/s41592-026-03155-1 · 开源许可:MIT (allowed)

上游仓库:https://github.com/sagar87/spatialproteomics @ b0ec50e28125

Pytest: passed MCP Stdio Selftest: passed Relocated Fresh Install: passed

一、一键安装与 MCP 接入(本地 / 远程统一接口)

# 1. 解压并自动构建隔离环境 + 运行真实数据自测
unzip spatialproteomics-mcp.zip && cd spatialproteomics-mcp
bash install.sh
.venv/bin/python selftest.py

# 2. 接入 Claude Code / Antigravity / Cursor (Stdio MCP)
claude mcp add spatialproteomics -- "$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

二、已验证科学工具清单(4 个工具)

preprocess_and_quantify MCP Verified ✓

Load a multiplexed fluorescence image (.zarr or .tiff), apply per-channel quantile thresholding and median filtering, filter/expand segmentation masks, and quantify single-cell expression.

Selftest Summary: Preprocessed 101x101 multiplexed image across 5 channels and quantified 56 cells (0 bright flagged).
Metrics: {"num_channels": 5, "image_height": 101, "image_width": 101, "num_cells": 56, "num_bright_cells": 0, "mean_cell_area": 142.7, "transform_method": "arcsinh"}
phenotype_cells MCP Verified ✓

Classify single cells into coarse lineages via mutually exclusive marker argmax and optionally refine subtypes using functional-marker binarization and a gating-tree hierarchy.

Selftest Summary: Phenotyped 56 cells into 3 labels: {'B': 35, 'T_h': 13, 'T_tox': 8}.
Metrics: {"num_cells": 56, "num_cell_types": 3, "cell_type_counts": {"B": 35, "T_h": 13, "T_tox": 8}, "unlabeled_fraction": 0.0}
analyze_neighborhoods MCP Verified ✓

Construct cell spatial graphs (radius, k-NN, or Delaunay), cluster cellular neighborhoods across one or more FOVs via K-Means, and compute cell-level and global graph topology metrics.

Selftest Summary: Identified 3 cellular neighborhoods (radius) over 56 cells and 405 edges (modularity=0.4367).
Metrics: {"method": "radius", "n_neighborhoods": 3, "neighborhood_counts": {"Neighborhood 0": 26, "Neighborhood 2": 16, "Neighborhood 1": 14}, "num_nodes": 56, "num_edges": 405, "density": 0.263, "modularity": 0.4367, "assortativity": 0.2593, "mean_homophily": 0.5163, "mean_diversity_index": 0.7815}
export_interoperable MCP Verified ✓

Convert a spatialproteomics Zarr dataset into interoperable AnnData (.h5ad), SpatialData (.zarr), and merged single-cell CSV formats.

Selftest Summary: Exported 56 cells x 5 channels to ['anndata', 'spatialdata', 'csv'].
Metrics: {"n_cells": 56, "n_channels": 5, "obs_columns": ["CD4_binarized", "CD8_binarized", "_labels", "_neighborhoods", "centroid-0", "centroid-1"], "obsm_keys": ["spatial"], "exported_formats": ["anndata", "spatialdata", "csv"]}

三、实测复现结果图展示

01_preprocessing_and_segmentation.png
02_cell_phenotyping_and_subtyping.png
03_cellular_neighborhoods_and_graph.png