
cxg-census-mcp
io.github.MaxMLang由 GitHub 账号 MaxMLang 发布v0.1.2更新于 Oct 24, 2026
MCP server for the CZ CELLxGENE Census. Single-cell, ontology-aware. Community, unaffiliated.
概览
用于查询 CZ CELLxGENE Discover 单细胞 Census 的 MCP 服务器,支持本体感知过滤、成本上限与来源标注,让助手用自然语言回答细胞图谱问题。
- 可以做什么
- 汇总 Census 版本与服务器限制,并按过滤条件统计细胞数或列出数据集(census_summary、get_census_versions、count_cells、list_datasets、get_server_limits)。
- 适用场景
- 适合单细胞图谱的研究与探索性问题,例如某组织的细胞类型组成或健康与疾病样本对比,可在 MCP 客户端中用自然语言提问。
- 运行要求
- 以 Python 包形式通过 uv 或 pip 安装,作为本地进程经 stdio 运行;需要 census 附加组件才能使用真实数据,否则以固定样例的模拟模式运行。需要访问 EBI OLS4 与 CELLxGENE Census 的网络。未声明账号、API 密钥或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 cxg-census-mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
cxg-census-mcp
[PyPI] [PyPI downloads] [CI] [License: MIT] [Python] [Ruff] [Checked with mypy] [pre-commit] [MCP] [Status: alpha] [Last commit]
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
Demos
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.
Architecture at a glance
Full architecture notes: docs/architecture.md.
Tool reference: docs/tool-reference.md.
Example questions: docs/example-questions.md.
Install
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):
MCP client config
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.
Tools (13 total)
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.
Configuration
All env vars use the CXG_CENSUS_MCP_ prefix. Most useful:
Full list and validation: src/cxg_census_mcp/config.py.
Development & operations
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.
Documentation index
License & attribution
Source code: MIT. The MIT license covers only the code in this repository, not the upstream data, ontologies, or third-party trademarks.
- Data. Tool responses are derived (filtered/aggregated) from the
CZ CELLxGENE Discover Census, distributed by the Chan Zuckerberg
Initiative under CC BY 4.0.
Every response carries an
attributionfield; downstream users must preserve attribution and indicate that changes were made. - Ontologies are fetched via EBI Ontology Lookup Service (OLS4) from CL, UBERON, MONDO, EFO, HANCESTRO, and others; each carries its own license.
- Trademarks ("CELLxGENE", "Cursor", "Claude", "Anthropic", "Model Context Protocol", …) belong to their respective owners. Use here is descriptive only and does not imply affiliation.
This project is a client of the CZ CELLxGENE Discover Census; it does not host, mirror, or redistribute Census data.
Full notice in LICENSE.
来源:README.md,提交 ffcddcd
工具
0版本历史
1- v0.1.2最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。