Pandemic Supply Chain Cascade

by apifyforge

117 downloads
Not rated
GitHub Website

About

Pandemic Supply Chain Cascade MCP is a Model Context Protocol server for pharmaceutical supply chain disruption modelling during health emergencies.

Details

Author
apifyforge
Downloads
117
Categories
Other

- Pharma supply chain hypergraph construction with typed nodes and edges
- Substitutability scoring per entity with single-source dependency flags
- Concentration risk per drug computed as 1/alternative manufacturer paths
- Buldyrev interdependent network percolation for cascading disruption
- SEIR-supply coupling ODE model over a 120-day horizon
- Bond percolation shortage prediction with probability and severity rating

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Pandemic Supply Chain Cascade
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Add the server’s endpoint URL and your Apify API token to your MCP client configuration (e.g., Claude Desktop, Cursor, Windsurf). Then ask your AI agent to call any of the eight tools—for example, “predict drug shortage risk for amoxicillin”—and the server returns structured JSON results.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pandemic supply chain cascade": {
            "pandemic-supply-chain-cascade-mcp": {
                "url": "https://ryanclinton--pandemic-supply-chain-cascade-mcp.apify.actor/mcp"
            }
        }
    }
}

McpServers

{
    "pandemic-supply-chain-cascade-mcp": {
        "url": "https://ryanclinton--pandemic-supply-chain-cascade-mcp.apify.actor/mcp"
    }
}

Pandemic Supply Chain Cascade MCP

> View on ApifyForge | Use on Apify Store

---

Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf):

{
  "mcpServers": {
    "pandemic-supply-chain-cascade-mcp": {
      "url": "https://ryanclinton--pandemic-supply-chain-cascade-mcp.apify.actor/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. 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 actor | Example use |
|-----------|----------------|-------------|
| 📋 Clinical trial records | Clinical Trial Tracker | Phase, enrollment, disease indication, trial status |
| 📄 Biomedical literature | PubMed Research Search | Drug-disease research links, publication frequency trends |
| 🏥 Global health indicators | WHO GHO Search | Disease burden, WHO notification events by country |
| 💊 Adverse drug event reports | openFDA Drug Events | Drug names, seriousness, adverse event reporting trends |
| 🇪🇺 European medicines registry | EMA Medicines Search | Authorisation status, ATC codes, manufacturer details |
| 🏭 FDA food recalls | FDA Food Recall Monitor | Recalling firm, facility, recall classification |
| 🔬 FDA device recalls | FDA Device Recalls | Recalling firm, device type, recall event ID |
| 🌪️ Global disaster alerts | GDACS Disaster Alerts | Country, alert level (green/orange/red), event severity |
| 🌩️ Weather warnings | NOAA Weather Alerts | State-level weather event severity and area |
| 🌏 Seismic activity | USGS Earthquake Search | Magnitude, place (M≥4.0 events trigger hazard scoring) |
| 💨 Air quality anomalies | OpenAQ Air Quality | AQI values; readings above 150 flagged as hazard events |
| 🚢 International trade flows | UN COMTRADE | Reporter/partner country, trade value, commodity code |
| 📈 Macroeconomic indicators | IMF Economic Data | GDP, economic vulnerability proxies |
| 🌍 Development indicators | World Bank Indicators | Country-level development and governance data |
| 🏢 Corporate registry | OpenCorporates Search | Manufacturer 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | Yes | — | Drug name, disease, manufacturer, or supply chain entity |
| sources | string[] | 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | Yes | — | Drug, disease, or supply chain entity to simulate |
| sources | string[] | No | all 7 groups | Data 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | Yes | — | Drug name, therapeutic area, or manufacturer |
| sources | string[] | No | 5 source groups | Data 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | Yes | — | Disease area, drug target, or therapeutic category |
| sources | string[] | No | 4 source groups | Data 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | Yes | — | Drug, disease, or supply chain entity to monitor |
| sources | string[] | No | 4 source groups | Data 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | Yes | — | Drug, API ingredient, or manufacturing category |
| sources | string[] | No | 4 source groups | Data 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | Yes | — | Drug name, therapeutic area, or disease |
| sources | string[] | No | 3 source groups | Data 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

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| query | string | Yes | — | Drug, disease, therapeutic area, or emergency scenario |
| sources | string[] | No | all 7 groups | Data 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

| Field | Type | Description |
|-------|------|-------------|
| query | string | Input query string |
| result / report | object | Primary algorithm output (tool-specific) |
| summary | object | Key metrics for quick interpretation |
| dataSources | object | Record count per source actor (e.g., {"emaMedicines": 18, "comtrade": 12, ...}) |
| result.layers[] | array | Supply chain entity list, sorted by criticality descending (Tool 1) |
| result.layers[].entity | string | Entity name (max 50 chars) |
| result.layers[].role | string | Node type: drug, manufacturer, facility, country, etc. |
| result.layers[].country | string | Jurisdiction or country |
| result.layers[].criticality | number | degree / max_degree across all nodes, 0–1 |
| result.layers[].alternativeCount | number | Count of same-type nodes with non-zero degree |
| result.layers[].substitutabilityWeight | number | Weighted substitutability score, 0–1 |
| result.concentrationRiskPerDrug[] | array | { drug, risk } where risk = 1 / manufacturer_count |
| result.percolationSteps[] | array | Iterative cascade steps up to 20 iterations (Tool 2) |
| result.percolationSteps[].giantComponentFractionA | number | Fraction of physical supply layer surviving |
| result.percolationSteps[].giantComponentFractionB | number | Fraction of regulatory layer surviving |
| result.criticalThreshold | number | Initial failure fraction that triggered cascade |
| result.giantComponentCollapsed | boolean | True when physical layer fell below 30% of initial size |
| result.supplyDemandCrossoverDay | number \| null | Day when stockpile < 50% of current demand; null if no crossover |
| result.systemicImpact | number | (total nodes removed) / (total network nodes), 0–1 |
| result.seirTimeSeries[] | array | Daily SEIR compartment fractions plus supply and demand levels |
| result.predictions[].probabilityOfShortage | number | Bond percolation shortage probability, 0–1 |
| result.predictions[].percolationThreshold | number | p_c = 1/⟨k⟩ for the drug's supply chain subgraph |
| result.predictions[].timeToShortageWeeks | number | Estimated weeks to shortage onset |
| result.predictions[].driverFactors | string[] | Enumerated shortage driver factors |
| result.predictions[].severity | string | low / medium / high / critical |
| result.dagNodes[].advancementProbability | number | Historical phase advancement rate |
| result.dagNodes[].impact | number | downstream_trials × patient_population × advancement_probability |
| result.criticalPath | string[] | Ordered trial IDs on longest weighted DAG path |
| result.criticalPathWeight | number | Sum of impact scores along the critical path |
| result.grangerLinks[].fStatistic | number | F-statistic from VAR(2) model |
| result.grangerLinks[].pValue | number | p-value; significant when < 0.05 |
| result.grangerLinks[].lagOrder | number | Lag order of VAR model (fixed at 2) |
| result.topCausalDrivers[] | array | { series, outDegree } — time series with most outgoing causal links |
| result.warningLevel | string | low / elevated / high / critical |
| result.risks[].herfindahlIndex | number | Country-level HHI contribution |
| result.risks[].compositeRisk | number | HHI × hazard_exposure for this country |
| result.globalHHI | number | Aggregate HHI across all manufacturing countries |
| result.pathways[].overallSubstitutability | number | Weighted substitutability score, 0–1 |
| result.pathways[].switchTimeDays | number | Estimated days to transition to substitute |
| report.findings[].severity | string | low / medium / high / critical |
| report.overallScore | number | Preparedness score 0–100 (higher = better prepared) |
| report.riskGrade | string | CRITICAL / HIGH / ELEVATED / MODERATE / LOW |
| report.criticalGaps | number | Count of critical-severity findings |
| algorithmResults | object | Summary 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.

| Tool | Price 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

| Scenario | Tools called | Total cost |
|----------|-------------|------------|
| Quick shortage check (1 drug) | predict_drug_shortage × 1 | $0.045 |
| Substitution options for 1 drug | identify_substitution_pathways × 1 | $0.040 |
| Full disruption analysis (cascade + shortage) | 2 tools × 1 | $0.095 |
| Comprehensive preparedness report | generate_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

```python
import requests
import json

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.