# Water Utility Risk Intelligence MCP (`darknezz/water-utility-risk-intelligence`) Actor

Municipal water system risk assessment and compliance intelligence: contamination, infrastructure, drought/climate and affordability scores from 8+ US government data sources. MCP-native, transparent 0-100 Composite Water Risk Score.

- **URL**: https://apify.com/darknezz/water-utility-risk-intelligence.md
- **Developed by:** [Oaida Adrian](https://apify.com/darknezz) (community)
- **Categories:** AI, Developer tools, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $350.00 / 1,000 water system risk assessments

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Water Utility Risk Intelligence MCP

Municipal water system risk assessment and compliance intelligence for utility analysts, bond credit teams, ESG investors, and environmental consultants. This actor orchestrates **8+ US government data sources in parallel** and applies **4 transparent scoring models** to produce a **Composite Water Risk Score (0–100)** across contamination exposure, infrastructure stress, drought and climate, and affordability dimensions.

**MCP-native** — the same engine is exposed as 8 Model Context Protocol tools, so it plugs directly into Claude, Cursor, Windsurf, or any MCP-compatible client with zero glue code.

### Why use it?

Manually checking EPA SDWIS, pulling FEMA disaster declarations, finding NOAA drought monitors, digging through Federal Register rulemaking notices, and cross-referencing local economic data takes 4–6 hours per utility. This actor automates the whole pipeline in under 2 minutes, with every signal that drove the score returned in the output.

| Data Point | Source |
|---|---|
| 📡 Seismic events near the system | USGS Earthquake Search |
| 🚨 Disaster declarations affecting the area | FEMA Disaster Declarations |
| 🌩️ Drought, flood, and extreme weather alerts | NOAA Weather Alerts |
| 📋 EPA MCL changes, PFAS/lead/arsenic rulemaking | Federal Register |
| 💬 Water utility billing and service complaints | CFPB Consumer Complaints |
| 💼 Regional unemployment and inflation | BLS Economic Data |
| 🌍 Freshwater availability, precipitation, poverty, Gini | World Bank Indicators |
| 🏭 Industrial PM2.5 air-quality contamination proxy | OpenAQ (optional API key) |
| 🎯 Composite Water Risk Score (0–100) | Scoring model |

### Input

```json
{
  "waterSystem": "Flint, Michigan",
  "assessmentType": "full",
  "state": "Michigan"
}
```

| Field | Type | Required | Description |
|---|---|---|---|
| `waterSystem` | string | yes | Water utility name, municipality, `"lat,lon"`, or EPA PWS ID (e.g. `"NY1100301"`) |
| `assessmentType` | string | no | `full` (default), `contaminant`, `infrastructure`, `drought`, `affordability`, `regulatory` |
| `state` | string | no | US state name/abbreviation for geographic disambiguation |
| `contaminant` | string | no | Focus regulatory scan: `PFAS`, `lead`, `arsenic` |
| `systems` | array | no | List of systems for a side-by-side comparison |
| `openaqApiKey` | string | no | Optional OpenAQ v3 key to enable the air-quality proxy |

### Output

A single dataset item per assessment:

```json
{
  "system": "Flint, Michigan",
  "compositeScore": 67,
  "verdict": "HIGH_RISK",
  "waterVulnerability": {
    "score": 52,
    "contaminantAlerts": 5,
    "airQualityImpact": 0,
    "environmentalRisk": 10,
    "riskLevel": "ELEVATED",
    "signals": ["5 PFAS-related regulatory actions"]
  },
  "infrastructure": { "score": 58, "seismicRisk": 20, "disasterExposure": 24, "climateStress": 14, "riskLevel": "DETERIORATING", "signals": [] },
  "droughtClimate": { "score": 62, "droughtAlerts": 2, "heatEvents": 4, "waterStressLevel": "SCARCE", "signals": [] },
  "affordability": { "score": 61, "complaints": 8, "economicStress": 18, "affordabilityLevel": "UNAFFORDABLE", "signals": [] },
  "allSignals": ["..."],
  "recommendations": ["..."],
  "dataSources": ["USGS Earthquake Search", "..."]
}
```

#### Scoring methodology (fully transparent)

| Dimension | Weight | Sub-scores | Sources |
|---|---|---|---|
| Water Vulnerability | 30% | regulatory contaminant actions (0–30), air-quality proxy (0–25), environmental risk (0–20) | Federal Register, OpenAQ |
| Infrastructure | 25% | seismic (0–30, M4.0+ = 10 each, cap 30), disaster exposure (0–30), climate stress (0–25) | USGS, FEMA, NOAA |
| Drought / Climate | 25% | drought alerts (0–100 base), heat events, compounding +15, low-rainfall flag +10 | NOAA, World Bank |
| Affordability | 20% | billing complaints, unemployment >6% +10, CPI >4% +8, poverty >15% +10, Gini >40 +5 | CFPB, BLS, World Bank |

**Composite** = vulnerability×0.30 + infrastructure×0.25 + drought×0.25 + affordability×0.20.
**Verdicts**: CRITICAL ≥ 80, HIGH\_RISK ≥ 60, ELEVATED ≥ 40, MANAGEABLE ≥ 20, LOW\_RISK < 20.
Every signal that moved a score is listed in that dimension's `signals` array — the audit trail is the output.

### Run from API

```bash
## Full assessment
curl -X POST "https://api.apify.com/v2/acts/darknezz~water-utility-risk-intelligence/run-sync-get-dataset-items?token=YOUR_TOKEN&timeout=180" \
  -H "Content-Type: application/json" \
  -d '{"waterSystem":"Phoenix, Arizona","assessmentType":"full"}'
```

### Use cases

- **Municipal bond credit analysis** — infrastructure condition, regulatory exposure, and affordability risk in one tool call
- **ESG portfolio water risk screening** — quantify drought/climate exposure aligned with TCFD physical risk frameworks
- **PFAS and contaminant monitoring** — track Federal Register rulemaking against specific systems
- **Peer benchmarking** — standardized per-dimension scores across a portfolio of utilities
- **Recurring monitoring** — run on Apify Scheduler to track risk score changes over time, alert via webhooks

### Limitations

- **No direct SDWIS violation-level access.** Data.gov and EPA ECHO violation records are not keyless; this actor uses Federal Register rulemaking, FEMA, NOAA, USGS, CFPB, BLS and World Bank signals instead. For per-PWS violation history use EPA ECHO directly.
- **No water sample concentrations.** Scores reflect regulatory and environmental risk signals, not laboratory results.
- **Air quality is a proxy** (and optional — requires an OpenAQ key). It indicates industrial proximity, not causation.
- **World Bank indicators are country-level**; sub-national precision is limited.
- **Scores reflect current data availability.** Run on a schedule and persist datasets to build trend tracking.

### Pricing

Pay-per-event. Full assessment events are the primary charge; focused tools cost less.

### FAQ

**How accurate is the score?** It is a relative risk indicator reflecting the density and severity of public risk signals — calibrated to flag systems warranting investigation, not to certify compliance.

**Can I assess non-US systems?** Most sources are US-focused; World Bank signals work globally. US regulatory/infrastructure scores will be sparse elsewhere.

**How long does it take?** Full assessments typically 60–120s; focused tools faster.

### Support

Open an issue on the actor page, or reach out via the Apify platform for custom water risk workflows.

# Actor input Schema

## `waterSystem` (type: `string`):

Water utility name, municipality, 'lat,lon' coordinates, or EPA PWS ID (e.g. 'Flint, Michigan', '40.7128,-74.0060', 'NY1100301')

## `assessmentType` (type: `string`):

Which risk assessment to run

## `state` (type: `string`):

US state name or abbreviation for geographic disambiguation (e.g. 'Michigan', 'AZ')

## `contaminant` (type: `string`):

Specific contaminant to focus regulatory scan on: PFAS, lead, arsenic

## `systems` (type: `array`):

List of water systems for a side-by-side comparison

## `openaqApiKey` (type: `string`):

Optional OpenAQ v3 API key to enable the air-quality contamination proxy (industrial PM2.5). Without it the proxy is skipped.

## `mcpMode` (type: `boolean`):

Start the actor as an MCP server (standby mode) instead of a batch assessment

## Actor input object example

```json
{
  "waterSystem": "New York City",
  "assessmentType": "full",
  "mcpMode": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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("darknezz/water-utility-risk-intelligence").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("darknezz/water-utility-risk-intelligence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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 darknezz/water-utility-risk-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,darknezz/water-utility-risk-intelligence"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/QWczMKbr9kvkMpQVC/builds/t6xbJZq0NudaYTV4o/openapi.json
