AIDEVELOPER TOOLS

Pandemic Supply Chain Cascade MCP

Pandemic Supply Chain Cascade MCP is a Model Context Protocol server for pharmaceutical supply chain disruption modelling during health emergencies. It gives AI agents eight analytical tools built on six quantitative algorithms — Buldyrev interdependent network percolation, SEIR-supply coupling ODEs, bond percolation shortage prediction, research pipeline DAG criticality, Granger causality early warning, and HHI geographic concentration risk — grounded in live data from 15 public-data actors. Th

Try on Apify Store
$0.08per event
0
Users (30d)
0
Runs (30d)
90
Actively maintained
Maintenance Pulse
$0.08
Per event

Maintenance Pulse

90/100
Last Build
Today
Last Version
1d ago
Builds (30d)
8
Issue Response
N/A

Cost Estimate

How many results do you need?

map-drug-supply-chains
Estimated cost:$8.00

Pricing

Pay Per Event model. You only pay for what you use.

EventDescriptionPrice
map-drug-supply-chainPharma supply chain hypergraph construction$0.08
simulate-disruption-cascadeBuldyrev percolation on interdependent networks$0.10
predict-drug-shortageSEIR-supply coupled ODE simulation$0.10
assess-research-pipeline-riskClinical trial DAG criticality analysis$0.08
detect-early-warning-signalsGranger causality early warning network$0.08
compute-geographic-concentration-riskHHI on manufacturing capacity x hazard$0.06
identify-substitution-pathwaysAlternative drug supply pathway analysis$0.06
generate-preparedness-reportFull pandemic supply chain assessment$0.15

Example: 100 events = $8.00 · 1,000 events = $80.00

Connect to your AI agent

Add this MCP server to Claude Desktop, Cursor, Windsurf, or any MCP-compatible client.

MCP Endpoint
https://ryanclinton--pandemic-supply-chain-cascade-mcp.apify.actor/mcp
Claude Desktop Config
{
  "mcpServers": {
    "pandemic-supply-chain-cascade-mcp": {
      "url": "https://ryanclinton--pandemic-supply-chain-cascade-mcp.apify.actor/mcp"
    }
  }
}

Documentation

Pandemic Supply Chain Cascade MCP is a Model Context Protocol server for pharmaceutical supply chain disruption modelling during health emergencies. It gives AI agents eight analytical tools built on six quantitative algorithms — Buldyrev interdependent network percolation, SEIR-supply coupling ODEs, bond percolation shortage prediction, research pipeline DAG criticality, Granger causality early warning, and HHI geographic concentration risk — grounded in live data from 15 public-data actors. The result is a computable, evidence-grounded view of which drugs are at shortage risk, when supply-demand crossover will occur, and which preparedness gaps are most critical.

Connect any MCP-compatible AI agent or LLM client to the /mcp endpoint to access all eight tools. The server runs on Apify's infrastructure in Standby mode — always available, no cold-start wait time.

What data does this MCP server analyse?

Data type📌 Source actorExample use
📋 Clinical trial recordsClinical Trial TrackerPhase, enrollment, disease indication, trial status
📄 Biomedical literaturePubMed Research SearchDrug-disease research links, publication frequency trends
🏥 Global health indicatorsWHO GHO SearchDisease burden, WHO notification events by country
💊 Adverse drug event reportsopenFDA Drug EventsDrug names, seriousness, adverse event reporting trends
🇪🇺 European medicines registryEMA Medicines SearchAuthorisation status, ATC codes, manufacturer details
🏭 FDA food recallsFDA Food Recall MonitorRecalling firm, facility, recall classification
🔬 FDA device recallsFDA Device RecallsRecalling firm, device type, recall event ID
🌪️ Global disaster alertsGDACS Disaster AlertsCountry, alert level (green/orange/red), event severity
🌩️ Weather warningsNOAA Weather AlertsState-level weather event severity and area
🌏 Seismic activityUSGS Earthquake SearchMagnitude, place (M≥4.0 events trigger hazard scoring)
💨 Air quality anomaliesOpenAQ Air QualityAQI values; readings above 150 flagged as hazard events
🚢 International trade flowsUN COMTRADEReporter/partner country, trade value, commodity code
📈 Macroeconomic indicatorsIMF Economic DataGDP, economic vulnerability proxies
🌍 Development indicatorsWorld Bank IndicatorsCountry-level development and governance data
🏢 Corporate registryOpenCorporates SearchManufacturer name, jurisdiction, incorporation date

Why use Pandemic Supply Chain Cascade MCP?

Manual pharmaceutical supply chain risk assessment requires a biostatistician, a network scientist, a trade data analyst, and weeks of data collection. Commercial platforms like Resilinc or Interos cost $50,000–$200,000 per year for enterprise access. Academic tools require MATLAB or Python expertise and proprietary datasets that are not publicly available.

This MCP server automates the entire analytical pipeline. An AI agent calls one tool, the server fetches data from up to 15 actors in parallel, constructs a typed supply chain hypergraph, runs the relevant algorithms, and returns structured JSON — all in a single MCP tool call.

Platform benefits:

  • Always-on Standby mode — the server stays warm between requests; no cold-start latency between tool calls
  • Parallel data fetching — all applicable actors run concurrently via Promise.all, minimising wall-clock time
  • Pay-per-tool-call pricing — no subscription, no minimum commitment; costs scale with actual use at $0.040–$0.050 per tool call
  • Budget controls — set a per-run spending limit in the Apify Console; the server returns a graceful error when the limit is reached
  • MCP protocol compatibility — works with Claude Desktop, Cursor, Cline, LibreChat, Continue, and any framework implementing the MCP 2024-11-05 specification

Features

  • Pharma supply chain hypergraph construction — typed nodes for drugs, manufacturers, API suppliers, excipient suppliers, packagers, distributors, countries, facilities, regulators, and clinical trials; 9 edge relationship types (manufactures, supplies, imports, distributes, treats, researches, packages, api_source, regulates); hyperedges grouping all supply chain participants per drug product
  • Substitutability scoring per entity — weighted combination of capacity overlap (shared neighbours), lead-time similarity over a ±90-day window, and regulatory equivalence (0.9 same jurisdiction, 0.5 cross-jurisdiction); entities with zero alternatives flagged as single-source dependencies
  • Concentration risk per drug — computed as 1 / number_of_alternative_manufacturer_paths; higher score indicates higher single-source exposure; returned as a ranked concentrationRiskPerDrug array
  • Buldyrev interdependent network percolation — two coupled layers: physical supply (manufacturers, facilities, countries) and regulatory approval (drugs, trials, regulators); BFS giant-component tracking; iterative mutual percolation seeded from disaster-exposed nodes or highest-degree node; convergence detection up to 20 iterations
  • SEIR-supply coupling ODE — Euler forward integration over 120-day horizon; β=0.3, σ=0.2, γ=0.1, dt=0.5 days; dSupply/dt = production×(1−worker_illness_fraction) − demand×(1+panic_factor×I/N) with panic_factor=2.0; supplyDemandCrossoverDay detected when stockpile falls below 50% of current demand
  • Bond percolation shortage prediction — per-drug percolation threshold p_c = 1/⟨k⟩ where ⟨k⟩ is average degree of the supply chain subgraph; node failure probability from hazard exposure, disaster flag (+0.35), and seeded base rates (5–20%); shortage probability = avg_fail_prob / p_critical, capped at 1.0; severity: critical ≥ 0.75, high ≥ 0.50, medium ≥ 0.25
  • Research pipeline DAG criticality — directed acyclic graph across Phase 1 → Phase 2 → Phase 3 → Approval; impact per node = downstream_trials × patient_population × advancement_probability; historical phase advancement rates: Phase 1 = 63%, Phase 2 = 31%, Phase 3 = 58%; critical path = longest weighted path via topological sort
  • Granger causality early warning network — VAR(2) model across 6 time series: PubMed publication frequency, WHO notifications, OpenAQ anomalies, GDACS disaster events, FDA adverse events, and COMTRADE trade volumes; F-test at p < 0.05; directed causal graph with leading-indicator out-degree ranking; warning level: critical when significant links ≥ 5
  • HHI geographic concentration risk — Herfindahl-Hirschman Index (HHI = Σ market_share²) for pharmaceutical manufacturing capacity by country; composite risk = HHI × max(hazard_exposure); hazard map accumulates GDACS alert severity (red=3, orange=2, green=1) × 0.3, NOAA events +0.2 each, USGS magnitude × 0.1 (M≥4.0), OpenAQ AQI > 150 +0.15; CRITICAL threshold: HHI > 0.25
  • Jaccard disease-treatment substitution scoring — substitutability = 0.30 × Jaccard(treated_diseases) + 0.30 × capacity_overlap + 0.20 × lead_time_similarity + 0.20 × regulatory_equivalence; switchTimeDays estimated from lead-time delta between substitute and original
  • Comprehensive preparedness report — runs all six algorithms in one call; produces categorised findings with severity ratings, evidence strings, and recommendations; overallScore 0–100; riskGrade (CRITICAL/HIGH/ELEVATED/MODERATE/LOW); criticalGaps count; algorithmResults summary object

Use cases for pandemic supply chain analysis

Government and public health emergency preparedness

Public health agencies and national stockpile managers need to know which essential medicines face the greatest shortage risk before the next pandemic peaks. The predict_drug_shortage tool maps the supply chain hypergraph for a drug class, applies bond percolation to compute shortage probability for each drug, and returns a ranked list with time-to-shortage estimates and enumerated driver factors — turning months of manual analysis into a single tool call.

Pharmaceutical company supply chain resilience

Supply chain and operations teams at drug manufacturers need to identify single-source API suppliers and geographic concentration risks before an auditor or regulator asks. The map_drug_supply_chain and compute_geographic_concentration_risk tools quantify these exposures with HHI scores, substitutability weights per entity, and concentration risk per drug — outputs that feed directly into supplier diversification decisions.

Healthcare investment and pipeline risk analysis

Investment analysts assessing pharmaceutical companies or biotech portfolios need to understand R&D pipeline vulnerability during health crises. The assess_research_pipeline_risk tool builds a clinical trial DAG, computes critical path weights using historical phase advancement rates, and identifies which trial disruptions would cascade to the most downstream programs — directly informing risk-adjusted valuations.

Regulatory and compliance reporting

Regulatory affairs teams preparing submissions for drug shortage prevention requirements need structured, quantitative risk assessments. The generate_preparedness_report tool produces categorised findings with evidence strings, severity ratings, and actionable recommendations in a format that maps directly to regulatory reporting frameworks.

AI agent supply chain monitoring workflows

Teams building LLM-powered monitoring pipelines can connect this MCP server to a Claude or other agent that runs periodic supply chain assessments, compares warningLevel and riskGrade values over time, and triggers alerts when conditions deteriorate. The structured JSON output makes downstream diff-tracking and alerting straightforward to implement.

Academic and policy research on pandemic preparedness

Researchers modelling pandemic preparedness scenarios can use the SEIR-supply ODE and percolation cascade tools to explore disruption scenarios with different initial failure fractions, supply chain topologies, and pandemic parameters — grounded in real clinical trial and trade data rather than synthetic networks.

How to connect Pandemic Supply Chain Cascade MCP to an AI agent

  1. Get the MCP endpoint URL — Find the actor's Standby URL in the Apify Console under the actor's API tab. The URL follows the pattern https://[actor-standby-host]/mcp.
  2. Add your Apify API token — Pass it as the Authorization: Bearer YOUR_API_TOKEN header in the MCP client configuration.
  3. Configure your MCP client — In Claude Desktop, Cursor, or Cline, add the server to your MCP configuration. The server uses the Streamable HTTP transport at POST /mcp.
  4. Call a tool — Ask your AI agent to "predict drug shortage risk for amoxicillin" or "generate a preparedness report for insulin supply chains". The agent selects the appropriate tool, passes the query, and returns structured JSON results.

Example Claude Desktop configuration

{
  "mcpServers": {
    "pandemic-supply-chain-cascade": {
      "url": "https://YOUR-ACTOR-STANDBY-HOST/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Tool reference

Tool 1: map_drug_supply_chain

Builds the pharmaceutical supply chain hypergraph for a query. Computes substitutability weights per entity (capacity overlap × lead-time similarity × regulatory equivalence), returns criticality scores (degree / max_degree), alternative counts, single-source flags, and concentration risk per drug (1 / manufacturer_path_count). Hyperedges connect each drug to all participating manufacturers and sourcing countries.

Default sources: clinical, health, pharma, trade, corporate (up to 9 actors)

Pricing: $0.045 per call

ParameterTypeRequiredDefaultDescription
querystringYesDrug name, disease, manufacturer, or supply chain entity
sourcesstring[]No["clinical","health","pharma","trade","corporate"]Data source groups to query

Tool 2: simulate_disruption_cascade

Runs two coupled models: (1) Buldyrev interdependent network percolation — physical supply layer A (manufacturers, facilities, countries) and regulatory approval layer B (drugs, trials, regulators), iterative mutual percolation up to 20 iterations with BFS giant-component tracking; (2) SEIR-supply ODE — Euler forward, β=0.3, σ=0.2, γ=0.1, 120-day horizon, panic-amplified demand (factor=2.0). Detects supplyDemandCrossoverDay when stockpile < 50% of demand.

Default sources: all 7 source groups (up to 15 actors)

Pricing: $0.050 per call

ParameterTypeRequiredDefaultDescription
querystringYesDrug, disease, or supply chain entity to simulate
sourcesstring[]Noall 7 groupsData source groups

Tool 3: predict_drug_shortage

Bond percolation shortage prediction per drug. p_c = 1/⟨k⟩; node failure probability from hazard exposure + disaster flag (0.35) + seeded base rate (5–20%); shortage probability = avg_fail_prob / p_critical. Driver factors enumerated: single_source_dependency, high_supplier_failure_risk, disaster_exposed_supplier, low_supply_redundancy, long_lead_time, low_percolation_threshold. Severity: critical ≥ 0.75, high ≥ 0.50, medium ≥ 0.25.

Default sources: clinical, health, pharma, trade, environment (up to 11 actors)

Pricing: $0.045 per call

ParameterTypeRequiredDefaultDescription
querystringYesDrug name, therapeutic area, or manufacturer
sourcesstring[]No5 source groupsData source groups

Tool 4: assess_research_pipeline_risk

Directed acyclic graph of clinical trial phases (Phase 1 → Phase 2 → Phase 3 → Approval). Impact per node = downstream_trials × patient_population × advancement_probability. Historical advancement rates: Phase 1 = 63%, Phase 2 = 31%, Phase 3 = 58%. Critical path = longest weighted path. Returns criticalPath trial ID list, criticalPathWeight, and per-trial impact scores.

Default sources: clinical, health, pharma, corporate (up to 7 actors)

Pricing: $0.045 per call

ParameterTypeRequiredDefaultDescription
querystringYesDisease area, drug target, or therapeutic category
sourcesstring[]No4 source groupsData source groups

Tool 5: detect_early_warning_signals

Granger causality network across 6 time series: PubMed publication frequency, WHO notifications, OpenAQ air quality anomalies, GDACS disaster events, FDA adverse events, and COMTRADE trade volumes. VAR(2) model per pair; F-test at p < 0.05 for significant causal links. Top leading-indicator series ranked by causal out-degree. Warning level: critical when significant links ≥ 5.

Default sources: health, pharma, environment, trade (up to 7 actors)

Pricing: $0.045 per call

ParameterTypeRequiredDefaultDescription
querystringYesDrug, disease, or supply chain entity to monitor
sourcesstring[]No4 source groupsData source groups

Tool 6: compute_geographic_concentration_risk

HHI = Σ(market_share²) for pharmaceutical manufacturing capacity by country. Composite risk = HHI × max(hazard_exposure_per_location). Hazard map: GDACS severity (red=3×0.3), NOAA events (+0.2 each), USGS M≥4.0 magnitude (×0.1), OpenAQ AQI > 150 (+0.15). Risk thresholds: HHI > 0.25 = CRITICAL, > 0.15 = HIGH, > 0.10 = ELEVATED.

Default sources: trade, corporate, pharma, environment (up to 8 actors)

Pricing: $0.045 per call

ParameterTypeRequiredDefaultDescription
querystringYesDrug, API ingredient, or manufacturing category
sourcesstring[]No4 source groupsData source groups

Tool 7: identify_substitution_pathways

Therapeutic substitute scoring: overallSubstitutability = 0.30 × Jaccard(treated_diseases) + 0.30 × capacity_overlap + 0.20 × lead_time_similarity + 0.20 × regulatory_equivalence. switchTimeDays estimated from lead-time delta. Drugs with no viable substitutes (score < 0.1) flagged as critical vulnerabilities. Returns ranked pathways array and viableCount.

Default sources: clinical, health, pharma (up to 7 actors)

Pricing: $0.040 per call

ParameterTypeRequiredDefaultDescription
querystringYesDrug name, therapeutic area, or disease
sourcesstring[]No3 source groupsData source groups

Tool 8: generate_preparedness_report

Runs all six algorithms sequentially and synthesises findings. Returns findings[] with category, severity, evidence, and recommendation; overallScore 0–100; riskGrade (CRITICAL/HIGH/ELEVATED/MODERATE/LOW); criticalGaps count; recommendations[] list; and algorithmResults object with summary stats from all six sub-analyses.

Default sources: all 7 source groups (up to 15 actors)

Pricing: $0.050 per call

ParameterTypeRequiredDefaultDescription
querystringYesDrug, disease, therapeutic area, or emergency scenario
sourcesstring[]Noall 7 groupsData source groups

Output examples

predict_drug_shortage — response

{
  "query": "amoxicillin",
  "result": {
    "predictions": [
      {
        "drug": "Amoxicillin Trihydrate",
        "probabilityOfShortage": 0.6821,
        "percolationThreshold": 0.3125,
        "timeToShortageWeeks": 6,
        "driverFactors": [
          "single_source_dependency",
          "disaster_exposed_supplier",
          "long_lead_time"
        ],
        "severity": "high"
      },
      {
        "drug": "Amoxicillin/Clavulanate",
        "probabilityOfShortage": 0.3140,
        "percolationThreshold": 0.4167,
        "timeToShortageWeeks": 11,
        "driverFactors": ["low_supply_redundancy"],
        "severity": "medium"
      }
    ],
    "totalDrugsAnalyzed": 14,
    "highRiskCount": 3,
    "avgProbability": 0.2943
  },
  "summary": {
    "totalDrugsAnalyzed": 14,
    "highRiskCount": 3,
    "avgProbability": 0.2943,
    "topRisk": {
      "drug": "Amoxicillin Trihydrate",
      "probabilityOfShortage": 0.6821,
      "severity": "high"
    },
    "riskIndicator": "HIGH"
  }
}

simulate_disruption_cascade — response (excerpt)

{
  "query": "insulin supply chain pandemic",
  "result": {
    "percolationSteps": [
      {
        "iteration": 1,
        "layerA_removed": ["Wuhan API Ingredients Co", "Sichuan Distribution Hub"],
        "layerB_removed": [],
        "giantComponentFractionA": 0.7143,
        "giantComponentFractionB": 0.9500
      },
      {
        "iteration": 2,
        "layerA_removed": ["Hebei Formulation Plant"],
        "layerB_removed": ["Insulin Biosimilar Phase 3"],
        "giantComponentFractionA": 0.5714,
        "giantComponentFractionB": 0.8000
      }
    ],
    "criticalThreshold": 0.1429,
    "giantComponentCollapsed": false,
    "totalNodesRemoved": 7,
    "supplyDemandCrossoverDay": 43,
    "systemicImpact": 0.2187,
    "seirTimeSeries": [
      { "day": 0,  "S": 0.9999, "E": 0.000005, "I": 0.000005, "R": 0.0000, "supply": 500.00, "demand": 80.00 },
      { "day": 10, "S": 0.9978, "E": 0.0008,   "I": 0.0014,   "R": 0.0003, "supply": 467.32, "demand": 80.22 },
      { "day": 30, "S": 0.9621, "E": 0.0089,   "I": 0.0249,   "R": 0.0041, "supply": 361.18, "demand": 84.99 },
      { "day": 43, "S": 0.9301, "E": 0.0142,   "I": 0.0488,   "R": 0.0069, "supply": 172.10, "demand": 175.81 }
    ]
  },
  "summary": {
    "giantComponentCollapsed": false,
    "criticalThreshold": 0.1429,
    "totalNodesRemoved": 7,
    "supplyDemandCrossoverDay": 43,
    "systemicImpact": 0.2187,
    "riskIndicator": "MODERATE"
  }
}

generate_preparedness_report — response (excerpt)

{
  "query": "antibiotic supply chain pandemic preparedness",
  "report": {
    "findings": [
      {
        "category": "Geographic Concentration",
        "finding": "86% of amoxicillin API production concentrated in 2 countries",
        "severity": "critical",
        "evidence": "UN COMTRADE: CN accounts for 0.64 market share, IN 0.22. HHI = 0.459.",
        "recommendation": "Establish minimum 3-country API sourcing policy; maintain 180-day strategic reserves"
      },
      {
        "category": "Supply Chain Resilience",
        "finding": "4 drugs identified with zero viable therapeutic substitutes",
        "severity": "high",
        "evidence": "Jaccard substitutability scoring: 4 drugs with overallSubstitutability < 0.1",
        "recommendation": "Prioritise biosimilar development for zero-substitute drugs"
      },
      {
        "category": "Early Warning",
        "finding": "PubMed publication frequency Granger-causes FDA adverse events at lag 2",
        "severity": "medium",
        "evidence": "F-statistic: 4.82, p-value: 0.031, lag order: 2",
        "recommendation": "Monitor PubMed publication surge as 2-week leading indicator"
      }
    ],
    "overallScore": 38,
    "criticalGaps": 2,
    "riskGrade": "HIGH",
    "recommendations": [
      "Diversify API sourcing across minimum 3 jurisdictions for all critical medicines",
      "Establish 90-day strategic reserves for high-shortage-probability drugs",
      "Deploy Granger causality dashboard monitoring GDACS and WHO feeds"
    ]
  },
  "algorithmResults": {
    "supplyChainSummary":   { "totalEntities": 47, "singleSourceCount": 6 },
    "cascadeSummary":       { "collapsed": false, "criticalThreshold": 0.1429, "crossoverDay": 43 },
    "shortageSummary":      { "highRiskCount": 3, "avgProbability": 0.2943 },
    "pipelineSummary":      { "totalTrials": 12, "criticalPathWeight": 4840 },
    "earlyWarningSummary":  { "warningLevel": "elevated", "significantLinks": 3 },
    "concentrationSummary": { "globalHHI": 0.459, "highRiskCountries": 1 },
    "substitutionSummary":  { "viableCount": 18, "avgScore": 0.3812 }
  }
}

Output fields

FieldTypeDescription
querystringInput query string
result / reportobjectPrimary algorithm output (tool-specific)
summaryobjectKey metrics for quick interpretation
dataSourcesobjectRecord count per source actor (e.g., {"emaMedicines": 18, "comtrade": 12, ...})
result.layers[]arraySupply chain entity list, sorted by criticality descending (Tool 1)
result.layers[].entitystringEntity name (max 50 chars)
result.layers[].rolestringNode type: drug, manufacturer, facility, country, etc.
result.layers[].countrystringJurisdiction or country
result.layers[].criticalitynumberdegree / max_degree across all nodes, 0–1
result.layers[].alternativeCountnumberCount of same-type nodes with non-zero degree
result.layers[].substitutabilityWeightnumberWeighted substitutability score, 0–1
result.concentrationRiskPerDrug[]array{ drug, risk } where risk = 1 / manufacturer_count
result.percolationSteps[]arrayIterative cascade steps up to 20 iterations (Tool 2)
result.percolationSteps[].giantComponentFractionAnumberFraction of physical supply layer surviving
result.percolationSteps[].giantComponentFractionBnumberFraction of regulatory layer surviving
result.criticalThresholdnumberInitial failure fraction that triggered cascade
result.giantComponentCollapsedbooleanTrue when physical layer fell below 30% of initial size
result.supplyDemandCrossoverDaynumber | nullDay when stockpile < 50% of current demand; null if no crossover
result.systemicImpactnumber(total nodes removed) / (total network nodes), 0–1
result.seirTimeSeries[]arrayDaily SEIR compartment fractions plus supply and demand levels
result.predictions[].probabilityOfShortagenumberBond percolation shortage probability, 0–1
result.predictions[].percolationThresholdnumberp_c = 1/⟨k⟩ for the drug's supply chain subgraph
result.predictions[].timeToShortageWeeksnumberEstimated weeks to shortage onset
result.predictions[].driverFactorsstring[]Enumerated shortage driver factors
result.predictions[].severitystringlow / medium / high / critical
result.dagNodes[].advancementProbabilitynumberHistorical phase advancement rate
result.dagNodes[].impactnumberdownstream_trials × patient_population × advancement_probability
result.criticalPathstring[]Ordered trial IDs on longest weighted DAG path
result.criticalPathWeightnumberSum of impact scores along the critical path
result.grangerLinks[].fStatisticnumberF-statistic from VAR(2) model
result.grangerLinks[].pValuenumberp-value; significant when < 0.05
result.grangerLinks[].lagOrdernumberLag order of VAR model (fixed at 2)
result.topCausalDrivers[]array{ series, outDegree } — time series with most outgoing causal links
result.warningLevelstringlow / elevated / high / critical
result.risks[].herfindahlIndexnumberCountry-level HHI contribution
result.risks[].compositeRisknumberHHI × hazard_exposure for this country
result.globalHHInumberAggregate HHI across all manufacturing countries
result.pathways[].overallSubstitutabilitynumberWeighted substitutability score, 0–1
result.pathways[].switchTimeDaysnumberEstimated days to transition to substitute
report.findings[].severitystringlow / medium / high / critical
report.overallScorenumberPreparedness score 0–100 (higher = better prepared)
report.riskGradestringCRITICAL / HIGH / ELEVATED / MODERATE / LOW
report.criticalGapsnumberCount of critical-severity findings
algorithmResultsobjectSummary stats from all 6 sub-algorithms (Tool 8 only)

How much does it cost to run pandemic supply chain analysis?

Each tool call is charged as a single pay-per-event at the prices below. Platform compute costs are included.

ToolPrice per call
map_drug_supply_chain$0.045
simulate_disruption_cascade$0.050
predict_drug_shortage$0.045
assess_research_pipeline_risk$0.045
detect_early_warning_signals$0.045
compute_geographic_concentration_risk$0.045
identify_substitution_pathways$0.040
generate_preparedness_report$0.050

Usage cost scenarios

ScenarioTools calledTotal cost
Quick shortage check (1 drug)predict_drug_shortage × 1$0.045
Substitution options for 1 drugidentify_substitution_pathways × 1$0.040
Full disruption analysis (cascade + shortage)2 tools × 1$0.095
Comprehensive preparedness reportgenerate_preparedness_report × 1$0.050
Portfolio audit (10 drug categories)predict_drug_shortage × 10$0.45
Full analyst workflow (all 8 tools once)All 8 tools × 1$0.370
Weekly monitoring (7 days × 1 warning check)detect_early_warning_signals × 7$0.315

You can set a maximum spending limit per run in the Apify Console to control costs. The server returns a graceful { "error": true, "message": "Spending limit reached..." } JSON response when the limit is reached — no partial charges, no silent failures.

New Apify accounts receive $5 of free monthly credits — enough for approximately 100 individual tool calls to test the complete analytical pipeline.

Note: pricing above reflects the MCP tool-call charge only. Underlying data actors run on your Apify account and may consume additional compute credits depending on result volume. In practice, each actor run is allocated 256 MB memory and 120–180 second timeout.

Connecting via the API

Python

import requests
import json

# MCP endpoint — get the standby URL from the Apify Console
mcp_url = "https://YOUR-ACTOR-STANDBY-HOST/mcp"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

# Predict shortage risk for a drug
payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
        "name": "predict_drug_shortage",
        "arguments": {
            "query": "amoxicillin antibiotic",
            "sources": ["clinical", "health", "pharma", "trade", "environment"]
        }
    }
}

response = requests.post(mcp_url, json=payload, headers=headers)
result = response.json()

data = json.loads(result["result"]["content"][0]["text"])
for pred in data["result"]["predictions"][:5]:
    print(f"{pred['drug']}: {pred['probabilityOfShortage']:.1%} shortage risk "
          f"({pred['severity']}) — {pred['timeToShortageWeeks']} weeks")

JavaScript

const mcpUrl = "https://YOUR-ACTOR-STANDBY-HOST/mcp";

const payload = {
    jsonrpc: "2.0",
    id: 1,
    method: "tools/call",
    params: {
        name: "compute_geographic_concentration_risk",
        arguments: {
            query: "insulin API manufacturing",
            sources: ["trade", "corporate", "pharma", "environment"]
        }
    }
};

const response = await fetch(mcpUrl, {
    method: "POST",
    headers: {
        "Authorization": "Bearer YOUR_API_TOKEN",
        "Content-Type": "application/json"
    },
    body: JSON.stringify(payload)
});

const result = await response.json();
const data = JSON.parse(result.result.content[0].text);

console.log(`Global HHI: ${data.result.globalHHI}`);
console.log(`Risk indicator: ${data.summary.riskIndicator}`);
for (const risk of data.result.risks.slice(0, 5)) {
    console.log(`${risk.country}: HHI=${risk.herfindahlIndex.toFixed(3)}, `
              + `composite=${risk.compositeRisk.toFixed(3)}, level=${risk.riskLevel}`);
}

cURL

# Predict drug shortage risk
curl -X POST "https://YOUR-ACTOR-STANDBY-HOST/mcp" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "predict_drug_shortage",
      "arguments": {
        "query": "amoxicillin shortage risk",
        "sources": ["clinical", "health", "pharma", "trade", "environment"]
      }
    }
  }'

# List all 8 available tools
curl -X POST "https://YOUR-ACTOR-STANDBY-HOST/mcp" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

How Pandemic Supply Chain Cascade MCP works

Phase 1: Parallel data collection

When a tool is called, fetchAllData determines which of the 7 source groups are needed. All applicable actors are dispatched simultaneously via runActorsParallel, which wraps Promise.all over individual runActor calls. Each actor is allocated 256 MB memory and a 120–180 second timeout. predict_drug_shortage with default sources triggers 11 actors; simulate_disruption_cascade and generate_preparedness_report trigger all 15. Results are mapped back to named arrays by call-order index after all actors complete.

Phase 2: Hypergraph construction

buildSupplyNetwork assembles raw actor results into a typed SupplyNetwork in a single pass. Nodes are deduplicated using simpleHash-based IDs (deterministic hash from entity name or ID string). Nine edge relationship types are validated for source/target existence before insertion. The hazard map is constructed in the same pass — accumulating GDACS, NOAA, USGS, and OpenAQ contributions into a per-location exposure score — and annotated directly onto country nodes before hyperedges are assembled. Hyperedges group each drug with all connected manufacturers and sourcing countries from the physical supply layer.

Phase 3: Algorithm execution

Each tool calls one or more of the eight scoring functions exported from scoring.ts. The cascade simulation seeds initial failures from nodes where metadata.disaster === true or metadata.hazardExposure > 0.5; if no disaster seeds exist, the highest-degree node in the physical layer is removed as the seed. Iterative mutual percolation runs until no further nodes are removed or the 20-iteration limit is reached. The SEIR ODE runs in the same function immediately after percolation, recording daily state every 0.5-day Euler step over 120 days. Shortage prediction and substitution scoring iterate per-drug over hyperedge-linked supply subgraphs. Tool 8 runs all six algorithms sequentially and passes all outputs to generatePreparednessReport.

Phase 4: Output assembly

Results are serialised via json(), which formats the typed algorithm outputs with all numeric values rounded to 4 decimal places. The summary object extracts key indicators — riskIndicator, warningLevel, riskGrade — computed from threshold comparisons on the algorithm outputs (e.g., riskIndicator = giantComponentCollapsed ? "CRITICAL" : systemicImpact > 0.3 ? "HIGH" : "MODERATE"). The dataSources object records the count of records fetched from each source actor for auditability.

Tips for best results

  1. Start with predict_drug_shortage for triage. It uses 5 source groups ($0.045) and immediately ranks drugs by shortage probability with enumerated driver factors — identify which drugs warrant deeper cascade or preparedness analysis before spending on the heavier tools.

  2. Use generate_preparedness_report for executive deliverables. It runs all six algorithms in a single $0.050 call — less than calling each tool individually ($0.370 combined) and produces a synthesised risk grade with categorised findings ready for briefings or regulatory submissions.

  3. Narrow sources to reduce latency for targeted queries. compute_geographic_concentration_risk only needs trade, corporate, pharma, and environment. Specifying only those 4 groups reduces the number of actors from 15 to 8 and cuts typical execution time by 30–50%.

  4. Interpret supplyDemandCrossoverDay as a relative risk indicator. The SEIR-supply ODE uses fixed parameters (β=0.3, σ=0.2, γ=0.1, initial stockpile 500 units). Day 43 for drug A versus day 78 for drug B is a meaningful relative comparison, but neither is a precise forecast calibrated to a specific pathogen or supply chain.

  5. giantComponentCollapsed: true is the most severe percolation signal. It means more than 70% of physical supply layer nodes were removed through cascading interdependency failures. Treat this as a systemic risk signal and run generate_preparedness_report immediately for the full multi-algorithm view.

  6. Use detect_early_warning_signals as a scheduled monitoring trigger. Run weekly for critical drug categories. When warningLevel changes from elevated to high or critical, trigger generate_preparedness_report for full analysis. The Granger causality network identifies which time series (PubMed, GDACS, WHO, etc.) are the most predictive leading indicators for that specific query.

  7. Use INN names for best data coverage. The actors query public APIs using the query string as a search term. International Nonproprietary Names (e.g., "amoxicillin" rather than "Amoxil") match more records across EMA, FDA, and PubMed simultaneously and produce richer supply chain graphs.

  8. Cross-reference driverFactors with internal procurement data. The single_source_dependency and long_lead_time flags are derived from the public data network. Validate them against your supplier records to confirm or dismiss each modelled risk — the algorithm provides a screening list, not a final verdict.

Combine with other Apify actors

ActorHow to combine
Clinical Trial TrackerDirect data source for this MCP. Run standalone with a specific NCT ID or disease area to retrieve full trial metadata before using assess_research_pipeline_risk with a targeted query for that indication.
openFDA Drug EventsRun standalone to pre-screen drug names and confirm FDA adverse event coverage before calling predict_drug_shortage — sparse FDA data for a drug indicates limited public supply chain visibility.
GDACS Disaster AlertsRun standalone with a region query to get live disaster context before calling simulate_disruption_cascade for manufacturers in that region — confirms whether disaster seeds in the percolation model reflect current events.
UN COMTRADE SearchRun standalone with a specific HS commodity code to get granular trade flow data before compute_geographic_concentration_risk — provides more precise HHI inputs than the general drug query.
EMA Medicines SearchUse standalone to enumerate all authorised drugs in a therapeutic category before building a monitoring loop that calls map_drug_supply_chain for each one.
Company Deep ResearchRun on high-criticality manufacturer entities returned by map_drug_supply_chain to get full company intelligence — financial health, ownership structure, regulatory history — before making supplier diversification decisions.
Website Tech Stack DetectorUse on manufacturer and distributor websites identified in supply chain mapping to assess digital infrastructure risk alongside physical supply chain vulnerability.

Limitations

  • SEIR parameters are fixed baselines. β=0.3, σ=0.2, γ=0.1 and 1,000,000-person population are not calibrated to any specific pathogen or region. Use supplyDemandCrossoverDay as a relative indicator across queries, not an absolute forecast.
  • Network topology is derived from public registry data. EMA, FDA, COMTRADE, OpenCorporates, and ClinicalTrials.gov are used. Private contract manufacturing agreements, secondary API sourcing arrangements, and undisclosed distributor relationships are not captured. Actual supply chains are typically more complex and interconnected than the modelled network.
  • Granger causality uses event-count proxies. The VAR(2) model uses the number of published papers, disaster alerts, and adverse event reports as time series proxies. These are coarse approximations of underlying trends; statistical significance values should be interpreted directionally, not as confirmatory causal evidence.
  • HHI market shares are inferred from trade volumes. UN COMTRADE trade values are used as a proxy for manufacturing capacity market share. Actual production capacity data is not publicly available at the required country and product granularity.
  • Percolation thresholds assume uniform random failure. The Buldyrev model seeds failures from disaster-exposed nodes, which is more realistic than fully random failure, but does not model targeted attacks on high-betweenness nodes or coordinated supply chain disruptions.
  • Data freshness varies by source. WHO GHO updates quarterly; GDACS is near-real-time; EMA updates weekly; UN COMTRADE has 3–12 month reporting lags for some commodity codes. Results reflect the most recently available data from each source.
  • The server is stateless. Each tool call re-fetches all data from scratch. There is no inter-call caching. Use generate_preparedness_report for comprehensive analysis rather than calling all 8 tools in rapid succession to avoid redundant data fetching costs.
  • Node deduplication uses name-hash IDs. "Amoxicillin", "AMOXICILLIN TRIHYDRATE", and "amoxicillin sodium" create separate drug nodes. Results may undercount alternatives for drugs with inconsistent naming across sources. Use the most specific canonical name in your query.

Integrations

  • Claude Desktop — Add the standby /mcp endpoint to claude_desktop_config.json to expose all 8 supply chain analysis tools directly to Claude
  • Cursor — Configure as an MCP server in .cursor/mcp.json for supply chain risk queries inside the IDE
  • Apify API — Call tools programmatically from any HTTP client via POST /mcp with the JSON-RPC 2.0 MCP protocol
  • Zapier — Trigger detect_early_warning_signals on a schedule and push results to Slack, email, or a ticketing system when warning level changes
  • Make — Build workflows that call predict_drug_shortage weekly and route critical-severity findings to procurement team notification channels
  • Webhooks — Fire a webhook when the MCP actor standby container starts or stops to trigger downstream system updates
  • LangChain / LlamaIndex — Wrap the /mcp endpoint as a LangChain tool for multi-step agent workflows combining supply chain analysis with internal document retrieval or CRM data

Troubleshooting

Tool returns minimal results or empty predictions for a well-known drug. The data actors use the query string as a search term against public APIs. Abbreviations, brand names, and salt forms may not match database entries. Use the INN (International Nonproprietary Name) — e.g., "amoxicillin" rather than "Amoxil" or "amoxicillin trihydrate". For rare drugs, try the disease area — e.g., "respiratory tract infection antibiotic" to broaden the data net.

supplyDemandCrossoverDay is null in cascade results. Supply never fell below 50% of demand in the 120-day simulation window. This indicates low short-term disruption risk under the baseline SEIR parameters. Check systemicImpact and giantComponentCollapsed for the network topology view — the crossover metric only measures inventory depletion timing, not structural supply chain fragility.

warningLevel returns "low" for every query. The Granger causality result depends on event count volume from the health, pharma, environment, and trade actors. Niche drugs or small therapeutic categories may return too few records to detect statistically significant causal links. Broaden the query to the disease area (e.g., "beta-lactam antibiotics" rather than a specific drug), or add the clinical and macro source groups to increase data density.

Run exceeds 3 minutes without completing. Tools using all 7 source groups trigger up to 15 actors in parallel. Wall-clock time depends on the slowest upstream API response. Clinical trial actors have a 180-second timeout. If consistent timeouts occur, reduce sources to the 4–5 most relevant groups for your query to eliminate the slowest data sources.

riskGrade is HIGH but the overallScore is above 50. The risk grade reflects the most severe single finding category, while overallScore is an aggregate across all categories. A single critical geographic concentration gap produces a HIGH grade regardless of moderate scores elsewhere. Read the findings array and focus on entries with severity: "critical" to identify the specific driver.

Responsible use

  • This server queries only publicly available government, intergovernmental, and open health databases: FDA, EMA, WHO, GDACS, NOAA, USGS, UN COMTRADE, OpenCorporates, ClinicalTrials.gov, PubMed, OpenAQ, IMF, and World Bank.
  • Results are analytical model outputs derived from public data and are not official regulatory assessments. Do not present them as substitute for qualified pharmaceutical supply chain expert analysis.
  • Do not use shortage probability outputs to make public statements about specific drug availability that could cause unnecessary hoarding or panic purchasing.
  • Respect the terms of service and usage policies of each underlying data source.
  • For guidance on responsible use of public health data, see the WHO data governance principles.
  • For guidance on web scraping legality, see Apify's legal guide.

FAQ

What is pandemic supply chain cascade modelling and why does it matter? Pharmaceutical supply chains are interdependent networks where a factory closure in one country can cascade through API suppliers, finished-dose manufacturers, and distributors to cause shortages months later. Cascade modelling uses network theory — specifically Buldyrev interdependent network percolation — to determine which failures will propagate to systemic collapse and which will be absorbed by redundant paths.

How does Buldyrev interdependent network percolation work? It models two coupled network layers simultaneously: the physical supply network (manufacturers, facilities, countries) and the regulatory approval network (drugs, trials, regulators). When nodes fail in layer A, dependent nodes in layer B also fail; those failures then cause further failures in layer A. This iterative mutual percolation converges to a stable failed state. The fraction of remaining nodes in the giant connected component indicates how much of the network is still functional.

How does the SEIR-supply coupling ODE model work? The model runs a standard SEIR epidemiological simulation and feeds the worker illness fraction (E+I)/workforce directly into the supply differential equation: dSupply/dt = production×(1−worker_illness_fraction) − demand×(1+panic_factor×I/N). As the epidemic grows, production falls and demand rises from panic buying (factor=2.0). The supplyDemandCrossoverDay is when the stockpile falls below 50% of daily demand.

How accurate is the drug shortage probability from predict_drug_shortage? The bond percolation model provides a theoretically grounded, comparative risk score. It depends heavily on data completeness — drugs with sparse EMA, FDA, or COMTRADE records will have simpler modelled supply graphs and potentially less reliable probability estimates. Use the scores for comparative prioritisation and screening across a drug portfolio, not as absolute probability forecasts.

How is this different from commercial platforms like Resilinc or Interos? Commercial platforms use proprietary supplier databases, direct EDI integration feeds, historical disruption records, and human-curated supply chain maps that are not publicly available. This MCP server uses only public data. The trade-offs: $0.04–$0.05 per analysis versus $50,000–$200,000/year enterprise subscriptions; composable with any MCP-compatible AI agent; but with less depth on specific private supplier relationships.

Can I run this MCP server on a portfolio of drugs on a recurring schedule? Yes. Call the relevant tool once per drug or therapeutic category. For scheduled monitoring, use Apify Schedules to trigger the tool on a cron expression, or connect it to a Zapier/Make workflow. A 20-drug portfolio weekly monitoring schedule using detect_early_warning_signals costs $0.045 × 20 × 52 = $46.80 per year.

What does giantComponentCollapsed: true mean in practical terms? More than 70% of physical supply layer nodes were removed through cascading interdependency failures. In supply chain terms: a majority of manufacturers, facilities, and countries in the modelled network became non-functional due to cascade effects from the initial disruption seed. This is the most severe structural risk signal the model produces — equivalent to a near-total supply network fragmentation scenario.

Is it legal to use this data for pharmaceutical supply chain analysis? All 15 data sources are public government and intergovernmental databases (FDA, EMA, WHO, UN, USGS, NOAA, etc.) provided for public use and research. Using them for supply chain risk analysis is entirely appropriate. See Apify's guide and consult your legal team for jurisdiction-specific obligations.

How do I interpret the criticalPath from assess_research_pipeline_risk? The critical path is the ordered sequence of clinical trials in the pipeline DAG whose combined weighted impact — downstream trials × patient population × historical advancement probability — is maximised. Disrupting any trial on the critical path has the largest aggregate downstream effect on that disease area's drug development pipeline. Use this to prioritise which trials need backup supply arrangements.

What happens if all 15 actors return empty results? The server returns a valid but minimal output with empty arrays and low/moderate risk indicators. It does not error out. This typically occurs when the query string does not match any records in the underlying public databases. Try a broader, more canonical search term — e.g., the drug's INN, its disease area, or the generic therapeutic category.

How long does a typical generate_preparedness_report call take? Between 90 seconds and 4 minutes, depending on upstream API response times. All 15 actors run in parallel, so wall-clock time is approximately equal to the slowest individual actor response (not the sum). Clinical trial actor calls have the longest typical response time at up to 180 seconds.

Can I use this with any MCP-compatible AI agent framework? Yes. The server implements the Streamable HTTP MCP transport at POST /mcp, conforming to the MCP 2024-11-05 specification. It is compatible with Claude Desktop, Cursor, Cline, Continue, LibreChat, LangChain's MCP adapter, and any framework implementing the current MCP specification.

Help us improve

If you encounter issues, you can help us debug faster by enabling run sharing:

  1. Go to Account Settings > Privacy
  2. Enable Share runs with public Actor creators

This lets us see your run details when something goes wrong. Your data is only visible to the actor developer, not publicly.

Support

Found a bug or have a feature request? Open an issue in the Issues tab on this actor's page. For custom pharmaceutical supply chain models, additional data sources, or enterprise integrations, reach out through the Apify platform.

How it works

01

Configure

Set your parameters in the Apify Console or pass them via API.

02

Run

Click Start, trigger via API, webhook, or set up a schedule.

03

Get results

Download as JSON, CSV, or Excel. Integrate with 1,000+ apps.

Use cases

Sales Teams

Build targeted lead lists with verified contact data.

Marketing

Research competitors and identify outreach opportunities.

Data Teams

Automate data collection pipelines with scheduled runs.

Developers

Integrate via REST API or use as an MCP tool in AI workflows.

Ready to try Pandemic Supply Chain Cascade MCP?

Start for free on Apify. No credit card required.

Open on Apify Store