dwain-barnes/mcp-server-environment-agency
If you are the rightful owner of mcp-server-environment-agency and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Environment Agency Flood Monitoring MCP Server provides access to the UK Environment Agency's Real Time Flood Monitoring API, offering real-time data on flood warnings, water levels, and more.
get_flood_warnings
Get current flood warnings and alerts
get_flood_warning
Get details of a specific flood warning
get_flood_areas
Get flood areas (regions where warnings may apply)
get_monitoring_stations
Get monitoring stations that measure water levels, flows, etc.
get_readings
Get measurement readings from all stations
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.
π 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 stations - Flow (
flow
) - Water flow rates - Temperature (
temperature
) - Air temperature - Wind (
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 18+
- TypeScript
Setup
git clone https://github.com/dwain-barnes/mcp-server-environment-agency.git
cd mcp-server-environment-agency
npm install
Build
npm run build
Test
# Test the server
npm start
# Run test script
node test-server.js
Local 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
limit
andoffset
parameters for large datasets
π License
This project is licensed under the MIT License - see the 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 π¬π§