与空间转录组对话

cafferychen777/ChatSpatial
1 Stars 15 次浏览 更新于 2026-08-23

ChatSpatial 是一个通过自然语言进行空间转录组分析的MCP服务器。它简化了空间数据的分析过程,支持超过60种方法和12个类别以及多种空间转录组平台。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "chatspatial": {
      "args": [
        "-m",
        "chatspatial",
        "server"
      ],
      "command": "python"
    }
  }
}

服务介绍

ChatSpatial

MCP server for spatial transcriptomics analysis via natural language

PyPI


Docs


❌ Before

import scanpy as sc
import squidpy as sq
adata = sc.read_h5ad("data.h5ad")
sc.pp.filter_cells(adata, min_genes=200)
sc.pp.normalize_total(adata)
sc.pp.log1p(adata)
sc.pp.highly_variable_genes(adata)
sc.tl.pca(adata)
sc.pp.neighbors(adata)
# ... 40 more lines

✅ After

"Load my Visium data and identify
 spatial domains"
✓ Loaded 3,456 spots, 18,078 genes
✓ Identified 7 spatial domains
✓ Generated visualization

Install

pip install chatspatial

Configure

Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "chatspatial": {
      "command": "python",
      "args": ["-m", "chatspatial", "server"]
    }
  }
}

Claude Code:

claude mcp add chatspatial python -- -m chatspatial server

Restart Claude after configuration.


Use

Open Claude and chat:

Load /path/to/spatial_data.h5ad and show me the tissue structure
Identify spatial domains using SpaGCN
Find spatially variable genes and create a heatmap

Capabilities

Category Methods
Spatial Domains SpaGCN, STAGATE, Leiden
Deconvolution Cell2location, RCTD, Tangram, SPOTlight
Cell Communication LIANA+, CellPhoneDB
Cell Type Annotation Tangram, scANVI, CellAssign, mLLMCelltype
Trajectory CellRank, Palantir, scVelo
Spatial Statistics Moran's I, Getis-Ord Gi*, Ripley's K
Gene Set Enrichment GSEA, ORA, Enrichr

60+ methods across 12 categories. Supports 10x Visium, Xenium, Slide-seq v2, MERFISH, seqFISH.


Docs


Citation

@software{chatspatial2025,
  title={ChatSpatial: Agentic Workflow for Spatial Transcriptomics},
  author={Chen Yang and Xianyang Zhang and Jun Chen},
  year={2025},
  url={https://github.com/cafferychen777/ChatSpatial}
}

MIT License · GitHub · Issues

相关 MCP 服务