ChatSpatial
🧬 Analyze spatial transcriptomics data through natural language conversation. Stop writing code, start having conversations with your data. MCP server for Claude Code and Codex.
claude mcp add --transport stdio cafferychen777-chatspatial uvx chatspatial
How to use
ChatSpatial is a Python-based MCP server that provides a suite of spatial transcriptomics analysis capabilities accessible via natural language prompts. It exposes a broad set of methods across categories such as Spatial Domains (SpaGCN, STAGATE, GraphST, Leiden, Louvain), Deconvolution (e.g., Cell2location, Tangram, Stereoscope, CARD), Cell Communication (LIANA+, CellPhoneDB, CellChat, FastCCC), Cell Type Annotation (Tangram, scANVI, SingleR, etc.), Trajectory & Velocity (scVelo, Palantir, CellRank), Spatial Statistics, Enrichment, Spatial Genes, and Integration with tools like Harmony and Scanorama. You can issue natural language queries to load data, identify tissue structures, deconvolve spots, annotate cell types, construct spatial gene heatmaps, or run enrichment analyses. Examples confirm you can ask to load a dataset, identify spatial domains, or find spatially variable genes, and the tool supports multiple backends and visualization options through its API and integrated workflows.
How to install
Prerequisites:
- Python 3.11+ installed on your system
- a supported environment to install Python packages (virtualenv recommended)
Installation steps:
- Install a Python environment manager and Python if not already installed (e.g., Python 3.11+ from python.org).
- Create and activate a virtual environment:
- python3 -m venv venv
- source venv/bin/activate # Unix/macOS
- venv\Scripts\activate # Windows
- Install ChatSpatial via UV (recommended for handling complex dependencies):
- curl -LsSf https://astral.sh/uv/install.sh | sh
- uv install chatspatial
- Register the MCP server for use with your MCP client, pointing to the appropriate Python executable and module:
- claude mcp add chatspatial /path/to/venv/bin/python -- -m chatspatial server
Notes:
- The readme indicates installation and usage via UV and running the server with the Python module chatspatial.
- If you prefer direct Python execution outside UV, you can also run the module as a standard Python process using python -m chatspatial server in a virtual environment.
Additional notes
Tips:
- Ensure your Python environment has access to the required spatial transcriptomics libraries and dependencies (Scanpy, Squidpy, and related tools) as per ChatSpatial documentation.
- The MCP server supports multiple backends; configure your MCP client to point to the chatspatial MCP server for seamless prompts.
- If you encounter dependency conflicts, using a clean virtual environment per the installation steps helps isolate issues.
- When troubleshooting, check the server logs for module import errors or missing data formats (e.g., .h5ad files) and verify that the data loaded matches the expected structure.
- Environment variables are optional in the provided config; add them under env if your deployment requires API keys or backend configurations.
Related MCP Servers
awesome-openclaw
A curated list of OpenClaw resources, tools, skills, tutorials & articles. OpenClaw (formerly Moltbot / Clawdbot) — open-source self-hosted AI agent for WhatsApp, Telegram, Discord & 50+ integrations.
biomcp
BioMCP: Biomedical Model Context Protocol
Gitingest
mcp server for gitingest
opentargets
MCP server for Open Targets Data
agent-rules
MCP server that enables your agents to use coding rules from any or your GitHub repository. Instead of workspace rules files, you can now prompt agents to access the your coding rules from any repository.
claude_autoapprove
Autoapprove support for claude