PluginBench
MCP Server
Active
MIT

ChatSpatial MCP Server

io.github.cafferychen777/chatspatial

Schema-enforced spatial transcriptomics analysis with 20 MCP tools and 66 methods via natural language

What is the ChatSpatial MCP server?

ChatSpatial is an MCP server for spatial transcriptomics analysis that replaces ad-hoc LLM code generation with schema-enforced orchestration. It exposes 20 schema-validated MCP tools that orchestrate 66 spatial transcriptomics methods across 15 analytical categories, making workflows reproducible across sessions and clients. The server supports major spatial platforms including 10x Visium, Xenium, Slide-seq v2, MERFISH, and seqFISH.

ChatSpatial enables natural-language control of spatial transcriptomics workflows by providing a curated registry of tools and methods. Instead of generating arbitrary scripts, the LLM selects from validated tools and parameters, ensuring reproducibility and consistency. It covers the full analytical pipeline from data loading and preprocessing through visualization, spatial domain identification, deconvolution, cell-cell communication, annotation, differential expression, trajectory inference, and enrichment analysis.

How to install ChatSpatial

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "chatspatial": {
      "command": "uvx",
      "args": [
        "chatspatial",
        "server"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • Data Loading & Preprocessing — Load and preprocess spatial data including QC, normalization, HVG selection, PCA, and neighbor computation via Scanpy I/O
  • Visualization — Create spatial plots, embedding plots, and gene expression overlays
  • Spatial Domain Identification — Identify spatial domains using methods like SpaGCN, STAGATE, GraphST, BANKSY, AESTETIK, Leiden, and Louvain
  • Deconvolution — Perform cell-type deconvolution with FlashDeconv, Cell2location, RCTD, DestVI, Stereoscope, SPOTlight, Tangram, and CARD
  • Cell-Cell Communication — Analyze cell-cell interactions using LIANA+, CellPhoneDB, CellChat, and FastCCC
  • Cell Type Annotation — Annotate cell types via Tangram, scANVI, CellAssign, mLLMCelltype, scType, and SingleR
  • Differential Expression — Perform differential expression analysis with Wilcoxon, t-test, logistic regression, and pyDESeq2
  • Trajectory Inference — Infer developmental trajectories using CellRank, Palantir, and DPT
  • RNA Velocity — Analyze RNA velocity with scVelo and VeloVI
  • Spatial Statistics — Compute spatial statistics including Moran's I, Local Moran, Geary's C, Getis-Ord Gi*, Ripley's K, co-occurrence, neighborhood enrichment, and network properties
  • Enrichment Analysis — Perform enrichment analysis with GSEA, ORA, Enrichr, ssGSEA, and spatial EnrichMap
  • Spatially Variable Genes — Identify spatially variable genes using SpatialDE, SPARK-X, and FlashS
  • Multi-sample Integration — Integrate multiple samples with Harmony, BBKNN, Scanorama, and scVI
  • CNV Analysis — Analyze copy-number variations with InferCNVPy and Numbat
  • Spatial Registration — Register spatial samples using PASTE and STalign

Use cases

  • Load spatial transcriptomics data and visualize tissue structure with spatial plots and gene expression overlays
  • Identify spatial domains and cell types in tissue samples using domain identification and annotation methods
  • Analyze cell-cell communication patterns and intercellular interactions within spatial context
  • Perform differential expression analysis between spatial regions or cell types
  • Integrate multiple spatial samples and infer developmental trajectories with trajectory inference methods

ChatSpatial MCP server FAQ

What is ChatSpatial?

ChatSpatial is an MCP server that provides natural-language access to 66 spatial transcriptomics analysis methods organized into 20 schema-validated tools. It replaces ad-hoc code generation with reproducible, schema-enforced orchestration across 15 analytical categories.

Is ChatSpatial free?

Yes, ChatSpatial is open-source under the MIT License and available on PyPI.

How do I install ChatSpatial in Claude or Cursor?

Use `uvx --from chatspatial chatspatial server` with Claude Code or Codex. For full method families, use `uvx --from 'chatspatial[full]' chatspatial server`. Docker images are also available at ghcr.io/cafferychen777/chatspatial.

What spatial data formats does ChatSpatial support?

ChatSpatial supports 10x Visium, Xenium, Slide-seq v2, MERFISH, and seqFISH data, typically loaded as .h5ad files via Scanpy I/O.

Do I need authentication or API keys?

No authentication is required. ChatSpatial runs locally via STDIO by default, with optional HTTP deployment for explicit configurations.

What Python versions are supported?

ChatSpatial supports Python 3.11 through 3.14.

README (reference)

Source of truth, from the repository.

<div align="center">

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

</div> <p align="center"> <img src="assets/images/overview.jpg" alt="ChatSpatial Overview" width="900"> </p>

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 66 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.

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:

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

Claude Code:

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:

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. Inspect or reproduce the manuscript results — Reproducibility workspace

Docker quick start:

docker pull ghcr.io/cafferychen777/chatspatial:v1.4.0

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 66 methods across 15 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
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

The manuscript experiment scripts, small aggregate result tables, and supplementary tables are versioned in reproducibility/. Large datasets, raw provider checkpoints, generated analysis directories, and manuscript source files are intentionally kept outside Git. The reproducibility workspace documents both the manuscript-era package baseline and the current-checkout development workflow so historical evidence is not silently regenerated with a different ChatSpatial release.


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.

<div align="center">

MIT License · GitHub · Issues

</div> <!-- mcp-name: io.github.cafferychen777/chatspatial -->

Related MCP servers

Scan an MCP server or agent config for injection, exfiltration, and risky capabilities.

0
TypeScript
MIT
View repository →

Real-time & historical exchange rates for 160+ currencies. No API key needed to start.

1
JavaScript
MIT
View repository →

Real-time currency exchange rates, historical data, and multi-currency lookups for MCP clients.

0
JavaScript
MIT
View repository →
CACAI MCP logo

CAI MCP

Maintained

CAI MCP server — gives AI agents a custodial wallet, @cai.com email, and vault.

0
View repository →

787 personas sintéticas do consumidor bancário brasileiro para discovery de produtos.

1
TypeScript
View repository →

Track credit card benefits, welcome offers, loyalty points, and money deadlines. No bank login.