Environment Agency Flood Monitoring MCP Server
This server provides access to the UK Environment Agency's Real Time Flood Monitoring API, enabling near real-time flood and water data retrieval with no API key required.
Flood Warnings & Alerts
Retrieve current flood warnings and alerts, filtering by location (lat/long/distance), county, or severity level (Severe, Warning, Alert, No longer in force)
Get full details for a specific warning by ID
Flood Areas
Browse flood alert and warning areas with geographic and pagination filters
Retrieve details for a specific flood area by its area code
Monitoring Stations
Discover stations measuring water levels, flows, temperature, wind, and more
Filter by location, town, river, catchment, station type (SingleLevel, Coastal, Groundwater, etc.), status, or parameter
Get comprehensive details for a specific station by ID
Measurement Types (Measures)
List available measurement types across all stations or for a specific station
Real-time & Historical Readings
Access readings updated every 15 minutes; filter by date, date range, latest only, parameter, or qualifier
Retrieve time-series data for a specific measure or all readings from a specific station
Supports pagination and sorting for large datasets
General Capabilities
Geographic filtering using latitude, longitude, and distance (km)
Pagination via
limitandoffsetparametersContext-window safe responses: capped at 500 items, polygons omitted, and truncated at ~60 KB
No API key or registration required — uses open government data freely
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Environment Agency Flood Monitoring MCP Server show me current flood warnings in Yorkshire"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Environment Agency Flood Monitoring MCP Server
A Model Context Protocol (MCP) server that provides access to the UK Environment Agency's Real Time Flood Monitoring API. This server allows you to access near real-time flood warnings, water level measurements, flow data, and monitoring station information.
🆕 What's new in 1.1.0
Migrated to the modern MCP SDK (@modelcontextprotocol/sdk 1.x), added Zod input validation (range, format, and cross-field checks), 30s request timeouts with actionable errors, id sanitization, and response capping (polygon omission, default/max limits, and 60 KB truncation) to protect the client's context window.
Related MCP server: mcp-usgs-water-data
🌊 Features
🚨 Flood Warnings & Alerts: Get current flood warnings and alerts with severity levels
📍 Flood Areas: Access information about flood alert and warning areas
🏭 Monitoring Stations: Find water level and flow monitoring stations across the UK
📊 Real-time Measurements: Access water levels, flows, and other measurements updated every 15 minutes
📈 Historical Data: Retrieve historical readings and measurements
🗺️ Geographic Filtering: Filter data by location using latitude, longitude, and distance
🔓 No API Key Required: Uses open government data with no registration needed
📦 Installation
For Claude Desktop Users
Add this to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"environment-agency": {
"command": "npx",
"args": ["-y", "mcp-server-environment-agency"]
}
}
}For Developers
npm install -g mcp-server-environment-agency🛠️ Available Tools
Flood Warning Tools
get_flood_warnings- Get current flood warnings and alertsget_flood_warning- Get details of a specific flood warningget_flood_areas- Get flood areas (regions where warnings may apply)get_flood_area- Get details of a specific flood area
Monitoring Station Tools
get_monitoring_stations- Get monitoring stations that measure water levels, flows, etc.get_monitoring_station- Get detailed information about a specific monitoring stationget_measures- Get measurement types available across all stationsget_station_measures- Get all measurement types from a specific station
Reading Tools
get_readings- Get measurement readings from all stationsget_measure_readings- Get readings for a specific measurement typeget_station_readings- Get all readings from a specific monitoring station
💬 Usage Examples
Get detailed information for station 1029TH (Bourton Dickler)
Find monitoring stations within 25km of Cambridge
Find monitoring stations in Yorkshire
Show me today's water level readings from any 5 stations📊 Data Types
Flood Warning Severity Levels
Severe Flood Warning - Severe Flooding, Danger to Life
Flood Warning - Flooding is Expected, Immediate Action Required
Flood Alert - Flooding is Possible, Be Prepared
Warning no Longer in Force - The warning is no longer in force
Measurement Parameters
Water Level (
level) - Water levels at monitoring stationsFlow (
flow) - Water flow ratesTemperature (
temperature) - Air temperatureWind (
wind) - Wind direction and speed
Station Types
SingleLevel - Single water level measurement
MultiTraceLevel - Multiple level measurements
Coastal - Coastal monitoring stations
Groundwater - Groundwater level monitoring
Meteorological - Weather measurements
🚀 Development
Prerequisites
Node.js 20+
TypeScript
Setup
git clone https://github.com/dwain-barnes/mcp-server-environment-agency.git
cd mcp-server-environment-agency
npm installBuild
npm run buildTest
# Build and run the end-to-end smoke test (spawns the server over stdio,
# lists tools, exercises a live query, and checks id sanitization)
npm testLocal Development
# Link for local testing
npm link
# Test with Claude Desktop using local version📄 Data Attribution
This server uses Environment Agency flood and river level data from the real-time data API (Beta), provided under the Open Government Licence.
🔄 API Updates and Reliability
Data is updated every 15 minutes
The API may redirect during high load - the client follows redirects automatically
Responses may be cached for short periods
No service level guarantee - not suitable for safety-critical applications
📋 Rate Limits and Best Practices
For tracking all measurements, use a single call every 15 minutes
Use geographic and parameter filters to reduce response sizes
The API has built-in limits: default 500 items, maximum 10,000 for readings
Use pagination with
limitandoffsetparameters for large datasets
📉 Response Limits
To keep responses friendly to LLM context windows, this server shapes and caps API results:
Default page size: 50 items for stations, measures and flood areas; 100 for readings (applied when you don't pass
limit).Maximum
limit: 500 for any list tool. The Environment Agency API itself allows more, but this server caps for context safety — useoffsetto paginate.Polygon geometry omitted: flood-area and flood-warning polygons are replaced with a short placeholder, as they are the single largest field in the API.
60 KB truncation: if a rendered response still exceeds ~60,000 characters, the items list is progressively truncated and a note explains how many items were omitted and which filters (
county,river_name,town, orlat+long+dist) or pagination to use.Responses use a compact
{ meta, count, items }envelope with the API@contextfield stripped.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Environment Agency for providing open flood monitoring data
Model Context Protocol team for the excellent framework
UK Government for open data initiatives
Built by Dwain Barnes 🇬🇧
Available Tools
11 toolsget_flood_areaB
Get details of a specific flood area by area code
Inputs: area_code (required).
get_flood_areasC
Get flood areas (regions where warnings/alerts may apply)
Inputs: lat, long, dist, limit, +1 more.
get_flood_warningC
Get details of a specific flood warning by ID
Inputs: id (required).
get_flood_warningsA
Get current flood warnings and alerts. Updated every 15 minutes.
Inputs: min_severity, county, lat, long, +1 more.
get_measure_readingsC
Get readings for a specific measurement type
Inputs: measure_id (required), latest, today, date, +7 more.
get_measuresC
Get measurement types available across all stations
Inputs: parameter_name, parameter, qualifier, station_reference, +3 more.
get_monitoring_stationC
Get detailed information about a specific monitoring station
Inputs: station_id (required).
get_monitoring_stationsC
Get monitoring stations that measure water levels, flows, etc.
Inputs: parameter_name, parameter, qualifier, town, +11 more.
get_readingsA
Get measurement readings from all stations. Updated every 15 minutes.
Inputs: latest, today, date, startdate, +9 more.
get_station_measuresC
Get all measurement types available from a specific station
Inputs: station_id (required).
get_station_readingsC
Get all readings from a specific monitoring station
Inputs: station_id (required), latest, today, date, +7 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools have distinct purposes targeting specific resources like flood areas, warnings, stations, or readings, with clear boundaries. However, some overlap exists between get_readings (all stations) and get_station_readings (specific station), which could cause minor confusion if not carefully read.
All tools follow a consistent verb_noun pattern with 'get_' prefix, using snake_case throughout. The naming is highly predictable and readable, making it easy for agents to understand the action and target resource.
With 11 tools, the count is well-scoped for a flood monitoring domain, covering key resources like areas, warnings, stations, and readings. Each tool appears to earn its place without feeling excessive or insufficient.
The toolset provides comprehensive read-only coverage for monitoring flood data, including areas, warnings, stations, and readings. A minor gap is the lack of tools for historical data queries or subscription/alert management, but core real-time monitoring workflows are well-supported.
Maintenance
Related MCP Connectors
Access UK flood warnings, river levels, water quality, Met Office forecasts, and carbon data
Live Environment Agency river levels, flows, rainfall and tide gauges across England
UK river levels and rainfall, bathing waters, flood warnings, weather, earthquakes and the GB…
UK Environment Agency real-time flood-monitoring MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides access to real-time water data from the USGS Water Services API, allowing users to fetch instantaneous measurements like stream flow, gage height, temperature, and water quality parameters from thousands of monitoring stations across the US.3-
- AlicenseAqualityCmaintenanceEnables querying USGS water data including real-time and historical streamflow, gage height, and water temperature from USGS gauges across the United States.3MIT
- AlicenseAqualityCmaintenanceProvides hydrology data (river levels, streamflow, flood forecasts, water quality) from USGS, NOAA, and SWOT, preserving units, datums, timezones, and data quality for AI agents.1371 PyPIMIT
- AlicenseNot gradedqualityBmaintenanceEnables river discharge monitoring and multi-day flood forecasting with severity assessments via the Open-Meteo Flood API.323 npmMIT