ChatSpatial: Natural language-driven spatial transcriptomics analysis via Model Context Protocol (MCP) integration
Project description
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 65 spatial transcriptomics methods across 15 analytical categories. The tools are the stable natural-language interface; the methods are the analysis backends selected through tool parameters.
Start Here
- Install ChatSpatial — Installation Guide for Python/uv setup, or Docker Guide for the GHCR image
- Configure your MCP client — Configuration Guide
- Run your first analysis — Quick Start
Docker quick start:
docker pull ghcr.io/cafferychen777/chatspatial:v1.2.7
Minimal example prompt:
Load /absolute/path/to/spatial_data.h5ad and show me the tissue structure
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 65 methods across 15 analytical categories, exposed through 20 MCP tools. Supports 10x Visium, Xenium, Slide-seq v2, MERFISH, seqFISH.
| Category | Example methods |
|---|---|
| Data Loading & Preprocessing | Scanpy I/O, QC, Normalization, HVG, PCA, Neighbors |
| Visualization | Spatial plots, Embedding plots, Gene expression overlays |
| Spatial Domain Identification | SpaGCN, STAGATE, GraphST, BANKSY, Leiden, Louvain |
| Deconvolution | FlashDeconv, Cell2location, RCTD, DestVI, Stereoscope, SPOTlight, Tangram, CARD |
| Cell-Cell Communication | LIANA+, CellPhoneDB, CellChat (cellchat_r), FastCCC |
| Cell Type Annotation | Tangram, scANVI, CellAssign, mLLMCelltype, scType, SingleR |
| Differential Expression | Wilcoxon, t-test, Logistic Regression, pyDESeq2 |
| Trajectory Inference | CellRank, Palantir, DPT |
| RNA Velocity | scVelo, VeloVI |
| Spatial Statistics | Moran'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 Analysis | GSEA, ORA, Enrichr, ssGSEA, Spatial EnrichMap |
| Spatially Variable Genes | SpatialDE, SPARK-X, FlashS |
| Multi-sample Integration | Harmony, BBKNN, Scanorama, scVI |
| CNV Analysis | InferCNVPy, Numbat |
| Spatial Registration | PASTE, STalign |
Documentation
| Guide | Use this when... |
|---|---|
| Installation | You need to install ChatSpatial in a Python environment |
| Docker | You want a reproducible container runtime or local dependency resolution fails |
| Configuration | You need exact MCP client syntax or the runtime path model |
| Quick Start | ChatSpatial is installed and you want the first successful analysis |
| Concepts | You need to choose an analysis strategy from a biological question |
| Examples | You want copy-pasteable natural-language workflow prompts |
| Methods Reference | You need canonical tool names, method names, parameters, and defaults |
| Troubleshooting | Setup, data loading, or analysis behavior is not working |
| Full Docs | You want the complete documentation site |
Citation
If you use ChatSpatial in your research, please cite:
@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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chatspatial-1.2.8.tar.gz.
File metadata
- Download URL: chatspatial-1.2.8.tar.gz
- Upload date:
- Size: 324.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a791057e9bca0c52a84fc62e35b0e92f970e0f9d4ec8589e8e88035c29ad6996
|
|
| MD5 |
540bd617dfd8877f368e9c723270e5b2
|
|
| BLAKE2b-256 |
4f732a3b1507979966af0e972ecc04e781e0c8fe1f06b956f6ec3bd6ba6d1fbf
|
Provenance
The following attestation bundles were made for chatspatial-1.2.8.tar.gz:
Publisher:
release.yml on cafferychen777/ChatSpatial
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatspatial-1.2.8.tar.gz -
Subject digest:
a791057e9bca0c52a84fc62e35b0e92f970e0f9d4ec8589e8e88035c29ad6996 - Sigstore transparency entry: 1519656540
- Sigstore integration time:
-
Permalink:
cafferychen777/ChatSpatial@afbc7353ac0be7d99c5b2caac4d3e40580e261d9 -
Branch / Tag:
refs/tags/v1.2.8 - Owner: https://github.com/cafferychen777
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@afbc7353ac0be7d99c5b2caac4d3e40580e261d9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file chatspatial-1.2.8-py3-none-any.whl.
File metadata
- Download URL: chatspatial-1.2.8-py3-none-any.whl
- Upload date:
- Size: 358.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4c417d0534bf5db900762f4cf628581baecf641406c6553324b203b3b6991c1
|
|
| MD5 |
72f29265e1b3db6e3b5a09b2c097ec99
|
|
| BLAKE2b-256 |
09efe947e98ce1dc4e24d15577ee26dbc7505eade6d18139e50beea919d68bc9
|
Provenance
The following attestation bundles were made for chatspatial-1.2.8-py3-none-any.whl:
Publisher:
release.yml on cafferychen777/ChatSpatial
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatspatial-1.2.8-py3-none-any.whl -
Subject digest:
f4c417d0534bf5db900762f4cf628581baecf641406c6553324b203b3b6991c1 - Sigstore transparency entry: 1519656562
- Sigstore integration time:
-
Permalink:
cafferychen777/ChatSpatial@afbc7353ac0be7d99c5b2caac4d3e40580e261d9 -
Branch / Tag:
refs/tags/v1.2.8 - Owner: https://github.com/cafferychen777
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@afbc7353ac0be7d99c5b2caac4d3e40580e261d9 -
Trigger Event:
push
-
Statement type: