# UK Environment Agency MCP

> UK Environment Agency MCP Server pulls real-time flood monitoring, sensor readings, and water levels directly from DEFRA's open data hub. It gives your AI agent immediate access to critical hydrological network data, allowing you to query active flood warnings (`list_floods`), check specific station metrics (`get_station`), or read continuous sea/river height archives without manual authentication.

## Overview
- **Category:** the-unthinkable
- **Price:** Free
- **Tags:** flood-monitoring, hydrology, sensor-data, environmental-science, real-time-data, open-data

## Description

Yo, listen up. This MCP Server connects your AI client straight into DEFRA and the UK Environment Agency’s open data hub. You're getting immediate access to real-time hydrological network data—no manual authentication needed for the whole mess. It lets you manage complex water monitoring workflows with nothing but a few simple commands.

**Checking Flood Status:**
You need to know if there’s trouble? Run `list_floods` and you get a complete rundown of every active flood warning across the UK region. If you're looking for specifics—say, just one area—you use `get_flood` to retrieve immediate details about that single warning location or zone.

**Monitoring Stations:**
To see what’s physically monitoring the water, first run `list_stations`. This gives you a list of every active physical flood-monitoring station in the network. Once you've got an ID, you use `get_station` to pull deep data points about that specific monitoring point, including its exact location and parameters. If you only need the raw numbers right now, executing `list_station_readings` pulls the actual, time-stamped measurements—like water level or flow rate—for any station ID.

**Diving into System Parameters:**
Want to know *what* data is even being tracked? You start by running `list_measures`, which returns a list of every type of metric the Environment Agency tracks. If you need to understand how a specific environmental measurement works, you use `get_measure` to see exactly how that metric is configured for tracking. For mapping out the whole system, run `list_hydrology_stations` to get a global roster of available saved hydrology measurement stations within the entire network. You can then drill down with `get_hydrology_station` to fetch explicit technical parameters for tracing any specific measurement line or hydrology trace.

**The Bottom Line:**
You're dealing with three core data sets here: 1) **Alerts**, which you nail down using the flood tools. 2) **Physical Hardware**, where `list_stations`, `get_station`, and `list_station_readings` give you everything from location to the last second reading. 3) **The Data Schema Itself**, which involves `list_measures`, `list_hydrology_stations`, and their corresponding 'get' functions, allowing your agent to understand the entire system’s structure.

This means you can get a full picture—from running `list_floods` for immediate alerts, checking station metadata with `get_station`, and pulling raw readings via `list_station_readings` all in one go. It's pure data access; it doesn't mess around with fluff.

## Tools

### get_flood
Retrieves specific, immediate information regarding a single flood warning location or area.

### get_hydrology_station
Fetches explicit technical parameters for tracking a specific hydrology trace or measurement line.

### get_measure
Grabs targeted details about how specific environmental measurements are configured to be tracked by the EA.

### get_station
Retrieves comprehensive, detailed data points for one specific flood monitoring station.

### list_floods
Gathers and returns a complete list of all currently active flood warnings across the region.

### list_hydrology_stations
Reads and returns a global list of available, saved hydrology measurement stations within the system.

### list_measures
Returns a list of all types of available metrics or measurements that the Environment Agency tracks.

### list_station_readings
Pulls the actual, latest sensor readings associated with an individual monitoring station ID.

### list_stations
Gathers and returns a list of all currently active physical flood-monitoring stations in the network.

## Prompt Examples

**Prompt:** 
```
List all active flood warnings.
```

**Response:** 
```
Here are the currently tracked flood warnings covering all severity blocks in your region...
```

**Prompt:** 
```
Provide the recent sensor readings for station 123.
```

**Response:** 
```
I've checked Station 123 metrics. Water levels currently sit at 2.45m...
```

**Prompt:** 
```
Show hydrology network measures for this week.
```

**Response:** 
```
Aggregating hydrology reports... Overall levels are within nominal boundaries across major river checkpoints.
```

## Capabilities

### Check for active flood warnings
Run `list_floods` to retrieve a full list of all currently active flood alerts in the UK region.

### Get detailed station metadata
Use `get_station` or `list_stations` to pull deep information about specific monitoring points, including their location and parameters.

### Retrieve raw sensor readings
Execute `list_station_readings` to get the actual, time-stamped measurements (like water level or flow rate) for any given station.

### Analyze network parameters
Access hydrology metadata using `get_hydrology_station` or `list_measures` to understand what data points are being tracked across the entire system.

## Use Cases

### Assessing immediate flood risk for a region.
A disaster response team needs to know if there are any critical alerts. They ask their agent: 'What floods are active?' The agent runs `list_floods`, returning all current warnings immediately, letting the team focus on rescue rather than data gathering.

### Validating a new sensor location.
A developer needs to build an alert dashboard for a brand-new station. They run `list_stations` to get the available IDs, then use `get_station` on a specific ID to pull all metadata required for their validation script.

### Comparing historical measurements.
An environmental analyst wants to see if recent river levels are anomalous. They run `list_hydrology_stations`, select the relevant trace, and use `get_measure` to pull the required parameters for comparison.

### Generating a status report on multiple points.
The ops team needs to know the water levels at ten different spots. They run `list_stations`, iterate through the resulting IDs, and call `list_station_readings` for each one to build a single, comprehensive report.

## Benefits

- Stop sifting through web dashboards. Using `list_floods` instantly gives you a compiled list of every active flood warning, regardless of severity level.
- Need to know what data is available? Running `list_measures` shows you all the specific metrics (like flow rate or water temperature) that the EA tracks—it saves time figuring out the right API call.
- Instead of guessing a station ID, use `list_stations` to get a definitive list of active monitoring points. Then, pass those IDs to `list_station_readings` for the latest data batch.
- The network parameters aren't clear? Use `get_hydrology_station` and `get_measure` together. This lets you understand exactly what physical river or sea segment is being monitored and how the measurements are calculated.
- It works across all your preferred AI clients—Claude, Cursor, VS Code, etc.—meaning you get real-time sensor data right where you're coding or writing reports.

## How It Works

The bottom line is: your AI client runs the environmental queries, bypassing the need to manually interact with complex external web forms.

1. Subscribe to this server on Vinkius. Open your AI client (Claude, Cursor, etc.).
2. Directly instruct your agent what data you need—for instance, 'List all flood warnings for the Thames Valley.'
3. The agent executes the appropriate tool (e.g., `list_floods`) and returns structured data containing real-time water levels or alerts.

## Frequently Asked Questions

**How do I get started?**
Subscribe to the server and you're ready. The UK Environment Agency API is entirely public open data. No code, no setup, no webhooks — just connect and start querying through your AI agent.

**Can my AI agent check for active flood warnings in specific areas?**
Yes. Your agent queries the live flood alert endpoints, giving you precise warnings, severity levels, and regional bounds instantaneously. It handles the whole diagnostic flow directly from your prompt.

**What happens when I need to check exact river depth history?**
Just tell your AI agent. It targets individual measurement stations and reads their active water flow and level records, saving you from navigating complex CSV government databases.

**Can I monitor multiple geographic metrics simultaneously?**
Absolutely. Combine requests for hydrology network grids, list all active flood stations across county borders, and map their measures. Perfect for logistics teams, civic planners, and researchers parsing country-wide status loops.

**When I call list_stations, do I need to worry about authentication?**
No, you don't need any credentials. The server connects directly to the open data hub, meaning your AI agent handles the connection without requiring API keys or complex setup.

**If a sensor fails, how does list_station_readings show me the error?**
The response structure includes specific status codes and detailed JSON objects describing the failure. This lets your agent distinguish between missing data and an actual system error.

**What is the best way to check for all available metrics using list_measures?**
The tool returns a comprehensive list of every measurable parameter (like flow rate or temperature). This structure includes standardized units, so you know exactly what your agent is interpreting.

**Is there a limit when I query get_hydrology_station repeatedly?**
The service manages standard querying rates. For high-volume data pulls or continuous monitoring, schedule the queries in an autonomous pipeline rather than running them individually.