Skip to main content

MCP server for scvi-tools - deep probabilistic analysis of single-cell omics data

Project description

scvi-tools-mcp

An MCP (Model Context Protocol) server that gives LLMs structured access to scvi-tools knowledge: model documentation, tutorials, API reference, workflow templates, pretrained Hugging Face Hub models, and community FAQ.

No runtime model execution — pure knowledge layer. Works with Claude Desktop, Cursor, and any MCP-compatible client.


Quick Start

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "scvi-tools": {
      "command": "uvx",
      "args": ["scvi-tools-mcp"]
    }
  }
}

Cursor / other clients

{ "command": "uvx", "args": ["scvi-tools-mcp"] }

Local install

pip install scvi-tools-mcp
scvi-tools-mcp

Tools

Tool Description
recommend_model Rank models by task and data type — start here
get_model_overview Full model description, use cases, inputs, outputs
get_model_parameters Key __init__ and train() parameters with defaults
get_setup_anndata_guide Exact setup_anndata() call + required obs/var fields
validate_data_requirements Pass/fail checklist for your AnnData against a model
list_tutorials Browse tutorials by category
get_tutorial Paginated tutorial content (code + prose, no outputs)
search_tutorials Keyword search across all tutorials
get_api_reference Signature + docstring for any public class or function
search_api Search public symbols by keyword
get_workflow_template Step-by-step code template for an analysis task
get_downstream_guide Guide for DE, clustering, embedding, label transfer
list_hub_models Browse official scvi-tools Hugging Face Hub models
get_hub_model Inspect one pretrained HubModel repo
suggest_hub_models Suggest Hub models for reference/query workflows
get_faq Curated FAQ from docs, GitHub issues, and Discourse
search_knowledge Cross-search all knowledge (catch-all)

Knowledge Sources

All knowledge is baked into the package as Markdown files at build time. No network calls at tool-call time.

Directory Content
knowledge/models/ One .md per model — description, use case, parameters
knowledge/tutorials/ 60+ tutorials converted from .ipynb (code + prose only)
knowledge/api/ Extracted class signatures and docstrings
knowledge/hub/models.json Normalized Hugging Face Hub model registry snapshot
knowledge/hub/summary.md Searchable summary of Hub model classes and modalities
knowledge/user_guide/ Narrative documentation from the scvi-tools user guide
knowledge/faq/github_issues.md Top GitHub issues snapshot
knowledge/faq/discourse_threads.md Discourse forum thread snapshot

Knowledge Refresh (CI)

Automated GitHub Actions jobs keep knowledge current — each opens a PR if a diff is found:

Workflow Schedule What it does
refresh_knowledge.yaml 1st of month Re-scrapes GitHub issues + Discourse threads
sync_tutorials.yaml 1st of month Fetches new .ipynb from scvi-tools, converts to .md
sync_model_knowledge.yaml 1st of month Checks CHANGELOG, regenerates model docs for changed models
sync_huggingface_hub.yaml Quarterly Refreshes the scvi-tools Hugging Face Hub model registry

All workflows also support workflow_dispatch for manual runs.


Development

git clone https://github.com/Yoseflab/scvi-tools-mcp
cd scvi-tools-mcp
pip install -e ".[dev]"
pytest

Rebuild knowledge manually

# Convert tutorials from a local scvi-tools checkout
python scripts/convert_notebooks.py /path/to/scvi-tools/docs/tutorials/notebooks \
    src/scvi_tools_mcp/knowledge/tutorials

# Extract API docs (requires scvi-tools installed)
pip install -e ".[scvi]"
python scripts/extract_api_docs.py

# Re-scrape external knowledge
python scripts/scrape_external.py

# Refresh Hugging Face Hub model registry snapshot
python scripts/scrape_huggingface_hub.py

Adding a new model

  1. Run scripts/extract_api_docs.py after updating scvi-tools.
  2. Add the model name to MODEL_NAMES in src/scvi_tools_mcp/tools/_constants.py.
  3. Add requirements to MODEL_REQUIREMENTS in _data_prep.py if needed.

License

BSD 3-Clause License

BioContextAI - Registry

Copyright (c) 2026, Yosef Lab, Weizmann Institute of Science

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scvi_tools_mcp-0.1.4.tar.gz (458.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scvi_tools_mcp-0.1.4-py3-none-any.whl (646.7 kB view details)

Uploaded Python 3

File details

Details for the file scvi_tools_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: scvi_tools_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 458.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scvi_tools_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 ee97f8d61926a2e1ce001aa623c54fb4ab8b5859b129f24ca85b20ce7fb68775
MD5 b48d01c19ef49615553f0fe302945666
BLAKE2b-256 451d9e3dc7d829304c460d6c06b9ace492eb4f89f6f88c9de426563192c5047c

See more details on using hashes here.

Provenance

The following attestation bundles were made for scvi_tools_mcp-0.1.4.tar.gz:

Publisher: release.yaml on YosefLab/scvi-tools-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scvi_tools_mcp-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: scvi_tools_mcp-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 646.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scvi_tools_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 23ffe342e550200873f62acc145420d370b2b92462c2af194c66928cb729415e
MD5 01ee1122095a0d3aa12465846488170a
BLAKE2b-256 dd448fddba1f83fb054a46c0038afc0067f9dc9d66962f301869fbcdb8f89693

See more details on using hashes here.

Provenance

The following attestation bundles were made for scvi_tools_mcp-0.1.4-py3-none-any.whl:

Publisher: release.yaml on YosefLab/scvi-tools-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page