ChatSpatial

io.github.cafferychen777由 GitHub 帳號 cafferychen777 發布v1.6.0更新於 Oct 24, 2026

Schema-enforced spatial transcriptomics analysis with 20 tools and 67 methods via MCP

已驗證STDIO僅桌面資料與分析AI 與機器學習

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理透過 20 個工具呼叫 67 種方法,執行受 schema 約束的空間轉錄體分析。

可以做什麼
  • 載入與前處理空間資料(Scanpy 讀寫、QC、標準化、HVG、PCA、鄰近)
  • 繪製空間座標圖、嵌入圖與基因表現疊加圖
  • 辨識空間域、反卷積細胞類型、註解細胞類型、差異表現分析
  • 執行細胞通訊、軌跡推論、RNA 速率、CNV 與多樣本整合方法
  • 計算空間統計、空間可變基因、富集分析與空間對位
適用情境
適合處理空間轉錄體資料(Visium、Xenium、Slide-seq、MERFISH、seqFISH),並希望助理以可重現、參數化的方式執行分析流程,而非臨時產生腳本的情境。
執行需求
以 PyPI 套件形式透過 uvx 在本機以 stdio 執行,需先安裝 uv。標準安裝包含核心方法;選用 full 擴充提供更多 Python 方法族,R 後端需另行設定。亦提供 Docker 映像。未宣告驗證或環境變數。
安裝前請注意
分析會讀取你指定路徑下的資料檔案並寫出圖表與結果,請只指向你打算使用的目錄。選用方法族與 R 橋接有額外的系統或平台需求,啟用前請查閱安裝指南。大型資料集與重型方法可能佔用較多資源。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 ChatSpatial,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

ChatSpatial

MCP server for spatial transcriptomics analysis via natural language

[Paper] [MLGenX @ ICLR 2026] [ENAR 2026] [IBC 2026] [CI] [PyPI] [Python 3.11-3.14] [License: MIT] [Docs] [Docker]

[ChatSpatial Overview]

ChatSpatial replaces ad-hoc LLM code generation with schema-enforced orchestration. Instead of generating arbitrary scripts, the LLM selects tools and parameters from a curated registry, making spatial transcriptomics workflows more reproducible across sessions and clients.

ChatSpatial exposes 20 schema-validated MCP tools that orchestrate 67 spatial transcriptomics methods across 13 analytical categories. The tools are the stable natural-language interface; the methods are the analysis backends selected through tool parameters.

The server implements MCP 2026-07-28 through the official Python SDK v2 and continues to serve 2025-11-25 clients through SDK-managed protocol negotiation. STDIO remains the secure local default; Streamable HTTP is available for explicitly configured HTTP deployments.


Start Here

Install uv once, then register ChatSpatial without creating or managing a Python environment:

Codex:

bash
codex mcp add chatspatial -- uvx --from chatspatial chatspatial server

Claude Code:

bash
claude mcp add --scope user chatspatial -- \  uvx --from chatspatial chatspatial server

uvx creates an isolated environment on first launch and reuses its cache on later launches. Restart the MCP client after adding the server.

The command above installs the standard runtime. To make all 15 composable Python method families available in the same isolated MCP environment, use:

bash
uvx --from 'chatspatial[full]' chatspatial server

full includes CellRank, FastCCC, the maintained spatial-domain and registration backends, annotation, enrichment, and the other portable Python families. R bridges, AESTETIK, and rctd-py remain separate because they have system, platform, or large-runtime requirements. See the installation guide before enabling those families.

Then:

  1. Run your first analysis — Quick Start
  2. Choose optional method families or a persistent environment — Installation Guide
  3. Configure another MCP client — Configuration Guide
  4. Reproduce the manuscript key results without an LLM — Reproduction image

Docker quick start:

bash
docker pull cafferyyang777/chatspatial:latest

Minimal example prompt:

text
Load /absolute/path/to/spatial_data.h5ad and plot gene expression at the spatial coordinates

The Quick Start provides a downloadable sample and a Leiden workflow that runs with the standard installation. Its sample has spatial coordinates but no H&E image. SpaGCN requires the optional spatial-domains extra.

If you use Docker, mount host data to /data and prompt with the container path, for example /data/spatial_data.h5ad.

ChatSpatial works with any MCP-compatible client — Claude Code, Claude Desktop, Codex, OpenCode, and other MCP-capable tools.


Capabilities

Current coverage includes 67 methods across 13 analytical categories, exposed through 20 MCP tools. Supports 10x Visium, Xenium, Slide-seq v2, MERFISH, seqFISH.

CategoryExample methods
Data Loading & PreprocessingScanpy I/O, QC, Normalization, HVG, PCA, Neighbors
VisualizationSpatial plots, Embedding plots, Gene expression overlays
Spatial Domain IdentificationSpaGCN, STAGATE, GraphST, BANKSY, AESTETIK, Leiden, Louvain
DeconvolutionFlashDeconv, Cell2location, RCTD (spacexr or rctd-py), DestVI, Stereoscope, SPOTlight, Tangram, CARD
Cell-Cell CommunicationLIANA+, CellPhoneDB, CellChat (cellchat_r), FastCCC
Cell Type AnnotationTangram, scANVI, CellAssign, mLLMCelltype, scType, SingleR, marker-score and threshold rules
Differential ExpressionWilcoxon, t-test, Logistic Regression, pyDESeq2
Trajectory InferenceCellRank, Palantir, DPT
RNA VelocityscVelo, VeloVI
Spatial StatisticsMoran's I, Local Moran, Geary's C, Getis-Ord Gi*, Ripley's K, Co-occurrence, Neighborhood Enrichment, Centrality Scores, Local Join Count, Network Properties
Enrichment AnalysisGSEA, ORA, Enrichr, ssGSEA, Spatial EnrichMap
Spatially Variable GenesSpatialDE, SPARK-X, FlashS
Multi-sample IntegrationHarmony, BBKNN, Scanorama, scVI
CNV AnalysisInferCNVPy, Numbat
Spatial RegistrationPASTE, STalign

Documentation

GuideUse this when...
InstallationYou need optional methods or a persistent Python environment
DockerYou want a reproducible container runtime or local dependency resolution fails
ConfigurationYou need exact MCP client syntax or the runtime path model
Quick StartChatSpatial is installed and you want the first successful analysis
ConceptsYou need to choose an analysis strategy from a biological question
ExamplesYou want copy-pasteable natural-language workflow prompts
Methods ReferenceYou need canonical tool names, method names, parameters, and defaults
TroubleshootingSetup, data loading, or analysis behavior is not working
Full DocsYou want the complete documentation site

Reproducibility

Each release publishes a reproduction image under the -repro tag. It re-executes the DLPFC spatial-domain and OSCC CARD deconvolution tool calls recorded during the manuscript experiments, without calling any LLM, and compares the results with the reported values:

bash
docker run --rm -v "$PWD/out:/outputs" \  cafferyyang777/chatspatial@sha256:ac3ba1ed8235c3d53ca72005d8ad2556cac007f5ddb932ae3e1d1241fa2cf9d8 \  chatspatial-reproduce

reproducibility/ contains the image definition and describes what it checks. The experiment and analysis scripts for the manuscript are in ChatSpatial-Reproducibility.


Citation

If you use ChatSpatial in your research, please cite:

bibtex
@article{Yang2026.02.26.708361,  author = {Yang, Chen and Zhang, Xianyang and Chen, Jun},  title = {ChatSpatial: Schema-Enforced Agentic Orchestration for Reproducible and Cross-Platform Spatial Transcriptomics},  elocation-id = {2026.02.26.708361},  year = {2026},  doi = {10.64898/2026.02.26.708361},  publisher = {Cold Spring Harbor Laboratory},  URL = {https://www.biorxiv.org/content/early/2026/03/01/2026.02.26.708361},  journal = {bioRxiv}}

ChatSpatial orchestrates many excellent third-party methods. Please also cite the original tools your analysis used.


Contributing

Documentation improvements, bug reports, and new analysis methods are all welcome. See CONTRIBUTING.md.

MIT License · GitHub · Issues

來源:README.md,提交 30eb958

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

6
  1. v1.6.0最新Oct 20, 2026
  2. v1.5.10Oct 12, 2026
  3. v1.5.9Oct 10, 2026
  4. v1.5.7Oct 9, 2026
  5. v1.5.5Oct 9, 2026
  6. v1.5.3Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分