Skip to main content

viva-mcp

ci

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. Over the HTTP transports auth is per-request: each client's own Authorization: Bearer <token> header identifies it to compose-api, so one hosted instance serves many users. With no such header the server falls back to COMPOSE_API_TOKEN from the environment (the stdio / single-identity path), else anonymous public runs.

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 (stdio / single-identity). Omit to run anonymously — anonymous runs are public. Ignored for a request that carries its own Authorization header.

Token precedence per call: a client's Authorization: Bearer <token> on the incoming HTTP request (hosted multi-user), else COMPOSE_API_TOKEN from the environment (stdio / local), else anonymous (public runs). To run as yourself locally, 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) with per-request token passthrough (each HTTP client authenticates as itself), 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 and list it so claude.ai Chat picks it up.

Submitting documents. run_simulation takes a .pbg (process-bigraph composite) or .omex. A .pbg that references an external model file needs an .omex bundle instead. The environment is inferred from the document's process classes; this deployment currently offers viva-biogears and viva-pde-particle.

License

Apache-2.0.

Metadata

Release files for viva-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for viva-mcp 0.1.1
File Size Uploaded Provenance Actions
viva_mcp-0.1.1.tar.gz 101.7 kB With provenance Details for viva_mcp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for viva-mcp 0.1.1
File Interpreter ABI Platform Actions
viva_mcp-0.1.1-py3-none-any.whl Python 3 none any Details for viva_mcp-0.1.1-py3-none-any.whl

Total release size: 115.0 kB

Release files / viva_mcp-0.1.1.tar.gz

Download URL viva_mcp-0.1.1.tar.gz
Size 101.7 kB
Tags Source
SHA-256 checksum
How to use checksums
72ad0b8fb7f8e2610e327ea21582477e3878b4a9c5e3417a3a7d00a20fa3b150
BLAKE2b-256 checksum
How to use checksums
7d641c04ca1651a9c47c1fd8ff68a6b4c53315629e7e9c43c11cc202b123705d
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 6, 2026.

Transparency log

Release files / viva_mcp-0.1.1-py3-none-any.whl

Download URL viva_mcp-0.1.1-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4381d22dc177d9e855574183ee0de856a465a56cf2014c8fff0848bf1699cd8
BLAKE2b-256 checksum
How to use checksums
3a7d273a8fb8d8f715cb14a2a26a24aec1dbb655bdf8997e7ff0cf999e3da090
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 6, 2026.

Transparency log

Security for viva-mcp 0.1.1

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.

Select from 2 files

Attestation for viva_mcp-0.1.1.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 6, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page