cell2location Remote Tool (MCP Server)#
TOU validation and deployment status (2026-08-16)#
The scientific environment, GB10 execution, loopback discovery, and a bounded synthetic single-cell/spatial deconvolution call passed with finite abundance output. Public publication, cross-user isolation, representative accuracy, broad concurrency, and recovery remain incomplete; keep this deployment private. Authenticated private Platform import and owner testing passed on 2026-08-16; public publication and independent-caller authorization/isolation remain untested.
Operation:
run_cell2location_deconvolutionStart:
python -m tooluniverse.remote.cell2location.cell2location_toolEndpoint:
http://127.0.0.1:8019/mcpProvider configuration: set
TOOLUNIVERSE_REMOTE_DATA_ROOTto provider-owned reference and spatial H5AD files; callers supply relative paths only.TOU check:
tu doctor --forward http://127.0.0.1:8019/mcp --jsonPrivate relay:
tu serve --share --forward http://127.0.0.1:8019/mcp --name validation-cell2location --workers 1
Non-loopback binding requires TOOLUNIVERSE_API_TOKEN; otherwise keep the server on loopback. The relay requires TOOLUNIVERSE_SERVICE_KEY. Public publication and independent-caller testing were not run.
New-user check: python scripts/remote_validation/setup_skill_preflight.py --implementation cell2location. Add --check-provider-env before launch, --live after launch, and --check-connect-prereqs before sharing. Live preflight checks exact MCP discovery only; it does not run or validate a model. The pinned relay SDK is not on PyPI and currently requires authorized GitHub repository access plus a configured SSH key, so a working local MCP server does not by itself prove that a new operator can share it.
The authenticated 2026-08-16 Platform matrix found all 30 private owner relays online and all 41 operations discoverable. This implementation was imported as unpublished owner draft(s), configured with a 120-second timeout, and invoked through /expert-sessions/{id}/test. Across the set, 38 unique operations passed return-schema and semantic validation; the three USPTO operations returned exact provider HTTP 403 and remain credential-blocked. Public publication, independent-caller authorization/isolation, broad saturation, and persistent supervision were not tested.
See the complete setup and verification guide.
Serves cell2location (Kleshchevnikov et al., Nature Biotechnology 2022) — Bayesian cell-type deconvolution of spatial transcriptomics — as the ToolUniverse remote tool run_cell2location_deconvolution.
cell2location is a two-step model: (1) a negative-binomial RegressionModel estimates per-cell-type reference signatures from an annotated single-cell/single-nucleus reference, then (2) Cell2location maps those signatures onto spatial data (e.g. 10x Visium) to estimate absolute cell-type abundance at every spot.
Served remotely (not bundled) because cell2location pulls in scvi-tools + PyTorch + Lightning + Pyro + scanpy. GPU-recommended: training is slow on CPU, so ref_epochs and sp_epochs default LOW (250 each). Raise them on a GPU for production-quality posteriors.
Deploy#
pip install -r requirements.txt # cell2location + scanpy + anndata
python cell2location_tool.py # starts the MCP server on 127.0.0.1:8019
Inputs are referenced by sc_path (annotated reference .h5ad of raw counts)
and sp_path (spatial .h5ad of raw counts), since single-cell/spatial
matrices are large. Expose remotely only behind TOOLUNIVERSE_API_TOKEN (SMCP
bind guard).
Register in ToolUniverse#
Tool definition: src/tooluniverse/data/remote_tools/cell2location_tools.json
(type: RemoteTool). Connect via the standard MCPAutoLoaderTool/server_url
mechanism.