MCP server for the CZ CELLxGENE Census. Single-cell, ontology-aware. Community, unaffiliated.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
An MCP server that lets LLM agents query the CZ CELLxGENE Discover Census single-cell atlas without lying about it β ontology-aware filters, cost caps, full provenance + attribution on every response. Drop it into Cursor / Claude Desktop / Claude Code and ask questions like "Visualize the cell-type composition of the human lung" in plain English.
Independent / unaffiliated. Not affiliated with, endorsed by, or sponsored by the Chan Zuckerberg Initiative (CZI), EMBL-EBI, the U.S. Census Bureau, or anyone else. "CELLxGENE" is a CZI mark; references here are descriptive (nominative) use only.
No warranty. MIT-licensed source, "as is". Research/exploration tool β not a clinical or diagnostic instrument. Always verify results before publication. See LICENSE for the full trademark and content attribution notice, and SECURITY.md for the threat model and known-issues policy.
Alpha (v0.1.2).
CHANGELOG.md
Healthy vs COVID-19 lung, side-by-side. Two parallel queries, the
disease_multi_value_v7 schema-drift rewrite kicks in for the COVID
cohort, attribution from both contributing dataset sets surfaces in the
same chat turn.
https://github.com/user-attachments/assets/c836f225-5075-4643-87aa-70d311bc5fd2
Cell-type composition of human lung in one query. Free-text "lung"
resolved to UBERON:0002048, routed through tissue_general, every CURIE
labeled, all in a single Tier-0 call.
https://github.com/user-attachments/assets/b0e10ca7-e46b-4e5f-ae63-11949d328c4d
(Videos render on GitHub. On PyPI they appear as bare URLs β head to the GitHub README to watch.)
More prompts in docs/example-questions.md.
Full architecture notes: docs/architecture.md.
Tool reference: docs/tool-reference.md.
Example questions: docs/example-questions.md.
From PyPI (recommended):
Or with pip:
Without the [census] extra you get mock mode (deterministic fixtures) β
handy for offline demos and verifying your MCP client config without pulling
tiledbsoma's ~1 GB of native deps.
From source (for development):
Cursor (~/.cursor/mcp.json) and Claude Desktop
(~/Library/Application Support/Claude/claude_desktop_config.json on macOS)
both expect the same shape. Cleanest is uvx once installed from PyPI:
Use the absolute path to
uvx(which uvxfrom your shell). MCP clients spawn the server in a non-interactive subprocess that doesn't source your shell rc, so a bare"uvx"will fail withNo such file or directory.
If you cloned from source instead, point at the checkout:
Claude Code:
Quit + relaunch your client (βQ on macOS β closing the window isn't enough) and the server should show up in the MCP panel with 13 tools.
Workflow: census_summary, get_census_versions, count_cells,
list_datasets, gene_coverage, aggregate_expression, preview_obs,
export_snippet, get_server_limits.
Inspection: resolve_term, expand_term, term_definition,
list_available_values.
Plus MCP resources (markdown docs at cxg-census-mcp://docs/{slug}),
prompts (census_workflow, disambiguation), and cooperative
progress / cancellation notifications. Details in
docs/tool-reference.md.
All env vars use the CXG_CENSUS_MCP_ prefix. Most useful:
| Variable | Default | Purpose |
|---|---|---|
CXG_CENSUS_MCP_CENSUS_VERSION | stable | Census release to pin |
CXG_CENSUS_MCP_CACHE_DIR | platformdirs default | Disk cache root |
CXG_CENSUS_MCP_MOCK_MODE | 0 | If 1, never opens a real Census handle |
CXG_CENSUS_MCP_LOG_LEVEL | WARNING | stdlib log level |
Full list and validation: src/cxg_census_mcp/config.py.
Quick loop:
Operational tasks (cache pre-warm, schema diff, container build, metrics
dump, plan-cache vacuum, weekly hint/facet refresh) live in the
Makefile
and are documented in
docs/operational-playbook.md.
| Topic | Where |
|---|---|
| System architecture | docs/architecture.md |
| Tool reference | docs/tool-reference.md |
| Example agent questions | docs/example-questions.md |
| Ontology resolution | docs/ontology-resolution.md |
| Schema-drift handling | docs/schema-drift-format.md |
| Census version pinning | docs/version-pinning.md |
| Progress / cancellation | docs/progress-and-cancellation.md |
| Error model | docs/error-model.md |
| Known limitations | docs/limitations.md |
| Ops runbook | docs/operational-playbook.md |
| Changelog | CHANGELOG.md |
Source code: MIT. The MIT license covers only the code in this repository, not the upstream data, ontologies, or third-party trademarks.
attribution field; downstream users must
preserve attribution and indicate that changes were made.This project is a client of the CZ CELLxGENE Discover Census; it does not host, mirror, or redistribute Census data.
Full notice in LICENSE.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/cxg-census-mcp)<a href="https://allmcps.com/mcp/cxg-census-mcp"><img src="https://allmcps.com/api/badge/cxg-census-mcp?style=directory" alt="Cxg Census Mcp on AllMCPs" /></a>