viva-mcp
An MCP server that fronts compose-api — the hosted cosimulation service for reproducible biological workflows. It exposes compose-api's run / status / fetch / catalog surface as MCP tools, so any MCP client — a chat session, Claude Science, or Claude Code — can run process-bigraph composites without a local Workbench server.
This is Phase 1 (P1) of RFC-0009: a thin, stateless FastMCP wrapper over the typed compose-api-client. compose-api runs the same process-bigraph / bigraph-schema runtime as the viva ecosystem, so it executes viva composites natively.
Tools
| Tool | What it does | compose-api |
|---|---|---|
whoami |
Who the server is authed as (or anonymous) + service health | whoami, health |
list_simulators |
The simulators the service can run | simulators |
list_processes |
Registered process-bigraph processes | processes |
run_simulation |
Submit a composite/SED-ML document (detached by default; wait=True to block) |
submit / run_and_wait |
simulation_status |
Poll a run's status | status |
fetch_results |
Download a finished run's results to a local file | download |
list_simulations |
Recent runs (filter by status / only yours) | simulations |
cancel_simulation |
Cancel a running simulation | cancel_simulation |
Typical flow: list_simulators → run_simulation(document_path=…) → simulation_status(id) until terminal → fetch_results(id).
Observability, datasets, and registry
| Tool | What it does | compose-api |
|---|---|---|
simulation_detail |
One run's detail — latest job, event/dataset counts | simulation |
simulation_events |
A page of a run's events (filter by level/name; paged) | events |
simulation_trace |
A run's execution trace as a tree of spans | trace |
list_datasets |
Data files a run (or the caller) advertised | datasets |
fetch_dataset |
Download one dataset file locally | download_dataset |
catalog |
The registry — entries, curation level, providing environments | catalog |
list_environments |
The environments documents run in | environments |
list_steps |
Registered process-bigraph Steps (the /core steps) |
steps |
Read catalog / list_environments before authoring a document to see which process/step classes are available and in which environment.
Install & run
uv pip install -e . # or: pip install -e .
viva-mcp # serves over stdio (the default MCP transport)
Register it with an MCP client (Claude Code example):
claude mcp add viva-mcp -- viva-mcp
Hosted (HTTP) transport
For remote MCP clients that connect over a fixed URL (e.g. claude.ai Chat), run the same server over streamable-HTTP instead of stdio:
viva-mcp --transport http --host 0.0.0.0 --port 8000 # serves at http://<host>:8000/mcp
All of these are also environment variables (VIVA_MCP_TRANSPORT, VIVA_MCP_HOST,
VIVA_MCP_PORT — PORT is honored too — and VIVA_MCP_PATH), so a container just
sets VIVA_MCP_TRANSPORT=http. Auth still comes from COMPOSE_API_TOKEN in the
environment, so a hosted instance is single-identity or anonymous for now;
per-request token passthrough is a follow-up.
Configuration (environment)
| Variable | Default | Meaning |
|---|---|---|
COMPOSE_API_URL |
https://compose.cam.uchc.edu |
compose-api base URL (point at a local instance for dev) |
COMPOSE_API_TOKEN |
(unset) | Bearer token. Omit to run anonymously — anonymous runs are public. |
Without a token the server runs anonymously (public runs). To run as yourself, obtain a token via the compose-api CLI (compose-api auth login, then an automation token) and set COMPOSE_API_TOKEN. See the compose-api CLI docs.
Develop
uv venv .venv && . .venv/bin/activate
uv pip install -e ".[dev]"
pytest -q # unit tests run offline (compose-api is mocked)
Status & roadmap
P1 + P2 cover the full run/status/fetch/catalog surface plus observability
(trace/events), datasets, and registry/core — 16 tools, validated live (anonymously)
against compose.cam.uchc.edu. A streamable-HTTP transport (above) is now built
in (RFC-0009 P3), and the connector is bundled in the viva plugin for Claude Code /
Cowork over stdio (P4). Remaining: deploy the HTTP transport at a public URL (with
per-request token passthrough) and list it so claude.ai Chat picks it up.
Submitting documents.
run_simulationtakes a.pbg(process-bigraph composite) or.omex. A.pbgthat references an external model file needs an.omexbundle instead. The environment is inferred from the document's process classes; this deployment currently offersviva-biogearsandviva-pde-particle.
License
Apache-2.0.
Metadata
Release files for viva-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| viva_mcp-0.1.0.tar.gz | 100.5 kB | With provenance | Details for viva_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| viva_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for viva_mcp-0.1.0-py3-none-any.whl |
Total release size: 113.1 kB
Release files / viva_mcp-0.1.0.tar.gz
| Download URL | viva_mcp-0.1.0.tar.gz |
|---|---|
| Size | 100.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14a551d895725aa1a4ea6eb54a900dd935e7e1fe42bf0eb4417f67b96acae174
|
|
BLAKE2b-256 checksum How to use checksums |
534f1d17467376137c50f1555983f3c7c57934ba3b67a26c9a6484730d98df39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logRelease files / viva_mcp-0.1.0-py3-none-any.whl
| Download URL | viva_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bdabd108b69e6c9be87cd8aa87e329614a8fb9cc94b6c5b7c768314c64046331
|
|
BLAKE2b-256 checksum How to use checksums |
d05f4e855df892fc0e509be98379d246cac4b6c0e12986cfc22fe91a1f30a08d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logSecurity for viva-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for viva_mcp-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.