# Pandemic Biosurveillance MCP (`ryanclinton/pandemic-biosurveillance-mcp`) Actor

Stochastic metapopulation epidemic simulation and phylodynamic analysis for pandemic preparedness, public health research, and outbreak response.

- **URL**: https://apify.com/ryanclinton/pandemic-biosurveillance-mcp.md
- **Developed by:** [ryan clinton](https://apify.com/ryanclinton) (community)
- **Categories:** AI, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event + usage

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Pandemic Biosurveillance MCP Server

**Stochastic metapopulation epidemic simulation and phylodynamic analysis for pandemic preparedness, public health research, and outbreak response.** This MCP server orchestrates **16 data sources** spanning WHO health data, clinical trials, FDA/EMA drug databases, biomedical literature, ecological species data, environmental monitoring, and geospatial intelligence to power **8 mathematically rigorous epidemic modeling tools**. Implements Gillespie SSA, particle MCMC, birth-death skyline phylodynamics, augmented synthetic control, mean-field game theory, and MaxEnt species distribution modeling.

### What data can you access?

| Data Point | Source |
|---|---|
| Global health indicators and disease burden | WHO Global Health Observatory |
| Active clinical trials for vaccines and therapeutics | ClinicalTrials.gov |
| Adverse drug events and safety signals | openFDA FAERS |
| European medicines authorizations | EMA |
| Biomedical literature and citation data | PubMed, OpenAlex, Europe PMC |
| Species distribution and conservation status | IUCN Red List, GBIF |
| Natural disaster alerts and impact estimates | GDACS |
| Weather, climate, and air quality data | NOAA, OpenAQ |
| Disaster declarations and emergency management | FEMA |
| Country demographics and socioeconomic data | REST Countries, World Bank |
| Geolocation and spatial data | Nominatim |

### MCP Tools

| Tool | Price | Description |
|------|-------|-------------|
| `simulate_epidemic_metapopulation` | $0.04 | Stochastic SEIR-HCD metapopulation simulation via Gillespie SSA on radiation mobility network |
| `infer_parameters_pmcmc` | $0.04 | Infer R0, latent period, IFR, hospitalization rate via particle MCMC with alive particle filter |
| `estimate_phylodynamic_Re` | $0.04 | Estimate effective reproduction number Re over time using birth-death skyline model |
| `evaluate_intervention_causality` | $0.04 | Evaluate causal NPI/pharmaceutical intervention effects via augmented synthetic control |
| `compute_vaccination_equilibrium` | $0.04 | Compute vaccination Nash equilibrium vs social optimum via mean-field game theory |
| `forecast_variant_fitness` | $0.04 | Forecast variant frequency trajectories using multinomial logistic regression |
| `assess_zoonotic_spillover` | $0.04 | Assess zoonotic spillover risk using MaxEnt species distribution modeling |
| `model_seasonal_waning_dynamics` | $0.04 | Model seasonal Re forcing with power-law antibody waning dynamics |

### Data Sources

- **WHO Global Health Observatory** -- Global disease burden, mortality, and health system indicators
- **ClinicalTrials.gov** -- Vaccine and therapeutic trial data with enrollment, phases, and outcomes
- **openFDA Drug Events** -- Adverse event reporting for pharmaceutical interventions
- **EMA Medicines** -- European authorized medicines and regulatory status
- **PubMed** -- Biomedical literature for epidemiological evidence
- **OpenAlex** -- Academic publication metadata and citation networks
- **Europe PMC** -- European biomedical literature and preprints
- **IUCN Red List** -- Species conservation status and distribution for zoonotic host assessment
- **GBIF** -- Global biodiversity occurrence data for species distribution modeling
- **GDACS** -- Global disaster alerting for events affecting health infrastructure
- **NOAA** -- Weather and climate data for seasonal forcing analysis
- **OpenAQ** -- Air quality monitoring data as environmental health proxy
- **FEMA** -- US disaster declarations and emergency management data
- **REST Countries** -- Country demographics, population, and geographic data
- **Nominatim** -- Geolocation and spatial reference data
- **World Bank** -- Development indicators and socioeconomic data

### How the scoring works

Each tool implements a distinct mathematical model:

**Gillespie SSA Metapopulation** (Tool 1) simulates stochastic epidemic spread across connected populations using 7 compartments (S, E, I, R, H, C, D). Inter-population transmission follows the radiation mobility model (Simini et al. 2012). Tau-leaping approximation enables efficient simulation across 20+ populations.

**Particle MCMC** (Tool 2) infers epidemic parameters from observed data using an alive particle filter for unbiased likelihood estimation. Metropolis-Hastings acceptance with Gelman-Rubin R-hat convergence diagnostics ensures reliable posterior distributions for R0, latent period, IFR, and hospitalization rate.

**Birth-Death Skyline** (Tool 3) estimates Re trajectories using piecewise-constant birth rates cross-validated with epidemiological estimates via Bayesian model averaging with thermodynamic integration.

**Augmented Synthetic Control** (Tool 4) estimates causal intervention effects by constructing synthetic counterfactuals with conformal prediction intervals for valid uncertainty quantification.

**Mean-Field Game** (Tool 5) solves coupled HJB backward and Fokker-Planck forward PDEs to find vaccination Nash equilibrium. Quantifies the free-rider gap between individual rational behavior and social optimum.

**Multinomial Logistic Regression** (Tool 6) forecasts variant frequency trajectories. Fitness advantages are estimated as selection coefficients on a Maynard-Smith fitness landscape.

**MaxEnt Species Distribution** (Tool 7) models zoonotic spillover probability as P(host) x P(contact) x P(adaptation) using species occurrence data and deforestation frontier kernel density estimation.

**Fourier Seasonal Forcing** (Tool 8) models seasonal Re oscillation with power-law antibody waning (Khoury et al. 2021) to compute optimal booster timing and seasonal wave predictions.

### How to connect this MCP server

#### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "pandemic-biosurveillance": {
      "url": "https://pandemic-biosurveillance-mcp.apify.actor/mcp"
    }
  }
}
````

#### Programmatic (HTTP)

```bash
curl -X POST https://pandemic-biosurveillance-mcp.apify.actor/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"simulate_epidemic_metapopulation","arguments":{"query":"H5N1 avian influenza pandemic"}},"id":1}'
```

This MCP also works with **Cursor**, **Windsurf**, **Cline**, and any other MCP-compatible client.

### Use cases for pandemic biosurveillance intelligence

#### Outbreak Response Simulation

Simulate how a novel pathogen would spread across connected populations using the stochastic metapopulation model. Estimate peak timing, herd immunity thresholds, and geographic spread patterns to inform resource allocation.

#### Vaccination Strategy Optimization

Use the mean-field game equilibrium to understand vaccination incentive structures. Quantify the free-rider gap and identify optimal age-group prioritization strategies that balance individual and social welfare.

#### Variant Tracking and Forecasting

Forecast which pathogen variants will dominate using fitness advantage estimation. Identify high-risk escape mutations and track variant competition dynamics to inform vaccine strain selection.

#### Zoonotic Spillover Risk Mapping

Identify geographic hotspots where deforestation frontiers intersect with high-diversity bat or rodent populations. Assess spillover probability for pandemic preparedness planning and surveillance resource deployment.

#### Intervention Impact Assessment

Estimate the causal effect of lockdowns, mask mandates, or vaccination campaigns using augmented synthetic control methodology. Quantify lives saved and transmission reduction with proper uncertainty quantification.

#### Seasonal Wave Prediction

Model seasonal forcing of respiratory pathogen transmission with antibody waning dynamics. Compute optimal booster timing to minimize population-level susceptibility during peak transmission seasons.

### How much does it cost?

This MCP uses **pay-per-event** pricing. Each tool call costs $0.04.

The **Apify Free plan** includes $5 of monthly platform credits, which covers 125 tool calls.

| Example Use | Approximate Cost |
|---|---|
| Single epidemic simulation | $0.04 |
| Parameter inference for an outbreak | $0.04 |
| Full suite of 8 analyses for one pathogen | $0.32 |

Note: Each tool runs up to 16 actors in parallel, making the per-tool cost extremely efficient for the data volume processed.

### How it works

1. **You call a tool** with a disease, pathogen, or outbreak query
2. **Up to 16 Apify actors run in parallel** fetching data from WHO, clinical trials, literature, ecological databases, environmental monitoring, and geospatial sources
3. **An epidemic network is constructed** linking health data, species distributions, environmental factors, and geographic context
4. **The mathematical model runs** on the constructed network -- Gillespie SSA, particle MCMC, birth-death skyline, or whichever algorithm the tool implements
5. **Structured results are returned** with model outputs, convergence diagnostics, and supporting data

### FAQ

**Q: Are the simulations based on real data?**
A: Yes. Each tool fetches live data from 16 sources to parameterize the models. The simulation parameters are derived from WHO health indicators, clinical trial data, species distributions, and environmental conditions relevant to the query.

**Q: How accurate are the epidemic forecasts?**
A: The models implement published mathematical frameworks (Gillespie SSA, Stadler birth-death, Abadie synthetic control) with proper convergence diagnostics. Results should be interpreted as scenario analysis informed by current public data, not clinical-grade predictions.

**Q: Can this replace public health surveillance systems?**
A: No. This provides computational modeling capabilities powered by public data sources. It complements but does not replace dedicated public health surveillance infrastructure.

**Q: What pathogens can I analyze?**
A: Any pathogen with public health data -- respiratory viruses (influenza, SARS-CoV-2), vector-borne diseases, zoonotic threats, and emerging infectious diseases.

**Q: Is it legal to use this data?**
A: All 16 data sources are publicly available databases from international organizations and government agencies. See [Apify's guide on web scraping legality](https://blog.apify.com/is-web-scraping-legal/).

**Q: Can I combine this with other MCPs?**
A: Yes. Use alongside the Pharma Pipeline Intelligence MCP for vaccine/therapeutic pipeline tracking or the Travel Risk Intelligence MCP for destination health risk assessment.

### Related MCP servers

| MCP Server | Description |
|---|---|
| [ryanclinton/pharma-pipeline-intelligence-mcp](https://apify.com/ryanclinton/pharma-pipeline-intelligence-mcp) | Drug and vaccine pipeline competitive intelligence |
| [ryanclinton/travel-risk-intelligence-mcp](https://apify.com/ryanclinton/travel-risk-intelligence-mcp) | Travel destination health and safety risk |
| [ryanclinton/climate-economic-nexus-mcp](https://apify.com/ryanclinton/climate-economic-nexus-mcp) | Climate and environmental economic analysis |

### Integrations

This MCP server is built on the **Apify platform** and supports:

- **Apify API** for programmatic access and automated outbreak monitoring
- **Scheduled runs** via Apify Scheduler for recurring surveillance
- **Webhooks** for triggering alerts when Re estimates exceed thresholds
- **Integration with 200+ Apify actors** for extending epidemiological data coverage

# Actor input Schema

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("ryanclinton/pandemic-biosurveillance-mcp").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("ryanclinton/pandemic-biosurveillance-mcp").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call ryanclinton/pandemic-biosurveillance-mcp --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=ryanclinton/pandemic-biosurveillance-mcp",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Pandemic Biosurveillance MCP",
        "description": "Stochastic metapopulation epidemic simulation and phylodynamic analysis for pandemic preparedness, public health research, and outbreak response.",
        "version": "1.0",
        "x-build-id": "vKOzUJVEpg0NWLgTX"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/ryanclinton~pandemic-biosurveillance-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-ryanclinton-pandemic-biosurveillance-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/ryanclinton~pandemic-biosurveillance-mcp/runs": {
            "post": {
                "operationId": "runs-sync-ryanclinton-pandemic-biosurveillance-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/ryanclinton~pandemic-biosurveillance-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-ryanclinton-pandemic-biosurveillance-mcp",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {}
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
