Skip to main content
Glama
Environment Canada Weather Alerts MCP Server

Environment Canada Weather Alerts MCP Server

by halizz821

Environment Canada Weather Alerts MCP Server

A Model Context Protocol (MCP) server providing real-time weather alerts and warnings from the Environment Canada API (https://api.weather.gc.ca/collections/weather-alerts/items).

Features

  • Tools:

    • search_alerts: Search and filter weather alerts by feature_id, alert_id, province, alert type, or keyword, with optional boundary geometry (include_geometry=True). Returns all concurrent alerts for a zone.

    • get_alert_summary: View national and provincial alert counts (warnings, watches, advisories).

    • get_alerts_near_coordinates: Check for weather alerts affecting a specific latitude and longitude.

  • Resources:

    • weather-alerts://active: Live JSON feed of active Canadian weather alerts.

    • weather-alerts://summary: Executive summary statistics.

    • weather-alerts://province/{province}: Province-filtered weather alert JSON streams (e.g. ON, BC, AB).

  • Prompts:

    • analyze_weather_safety: Generates emergency safety advice based on current weather warnings.

    • daily_weather_alert_briefing: Generates concise daily weather risk briefings for target regions.

    • severe_weather_report: Generates structured incident reports for severe weather events.

Related MCP server: Weather MCP Server

Running the MCP Server (Zero Setup)

With uv installed, there is no need to manually create a virtual environment or run pip install. uvx will automatically provision an isolated environment, resolve dependencies from pyproject.toml, and run the server:

# Run directly from the project directory:
uvx --from . environment-canada-mcp

# Or run from anywhere by specifying the absolute path:
uvx --from /path/to/MCP_wearther_alert environment-canada-mcp

Local Development / Contributing

If you are developing or modifying the code directly:

uv venv
uv pip install -e ".[dev]"

Integration with MCP Clients

Add the server to your MCP client configuration. Because it uses uvx, dependencies install automatically in the background on first launch with zero upfront manual steps.

Note: Replace /path/to/MCP_wearther_alert with the actual absolute path to where you cloned this repository (e.g. C:/projects/MCP_wearther_alert on Windows or /home/user/MCP_wearther_alert on Linux/macOS).

Claude Desktop Configuration

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "environment-canada-weather": {
      "command": "uvx",
      "args": [
        "--from",
        "/path/to/MCP_wearther_alert",
        "environment-canada-mcp"
      ]
    }
  }
}

Cursor / Antigravity / VS Code Configuration

Add the following to your MCP settings:

{
  "mcp": {
    "servers": {
      "environment-canada-weather": {
        "command": "uvx",
        "args": [
          "--from",
          "/path/to/MCP_wearther_alert",
          "environment-canada-mcp"
        ]
      }
    }
  }
}

Available Tools

4 tools
get_alert_detailsA

Retrieves full details including text description and boundary geometry for a specific alert.

Args: feature_id: Unique feature ID or item ID of the weather alert. language: Output language ('en' or 'fr'). Default is 'en'.

Returns: JSON string containing detailed alert metadata and polygon geometry.

Inputs: feature_id (required), language. Returns: result

get_alerts_near_coordinatesA

Checks for weather alerts intersecting a specific latitude and longitude coordinate.

Args: latitude: Latitude in decimal degrees (e.g., 43.6532 for Toronto). longitude: Longitude in decimal degrees (e.g., -79.3832 for Toronto). language: Output language ('en' or 'fr'). Default is 'en'.

Returns: JSON string of alerts affecting the given coordinates. Each alert includes its 'status'.

Inputs: latitude (required), longitude (required), language. Returns: result

get_alert_summaryB

Gets an executive breakdown summary of active Canadian weather alerts.

Args: province: Optional two-letter province code to restrict summary (e.g. 'ON').

Returns: JSON string summarizing alert counts (warnings, watches, advisories) by province.

Inputs: province. Returns: result

get_weather_alertsA

Fetches real-time weather alerts from Environment Canada.

Args: province: Two-letter Canadian province/territory code (e.g. 'ON', 'BC', 'AB', 'QC', 'NS', 'NB', 'MB', 'SK', 'PE', 'NL', 'YT', 'NT', 'NU'). alert_type: Type of alert filter ('warning', 'watch', 'advisory', 'statement'). search_query: Optional keyword to search in location names or alert description (e.g., 'Toronto', 'blizzard', 'fog'). language: Language for names and description ('en' for English, 'fr' for French). Default is 'en'.

Returns: JSON formatted string containing matching weather alerts. Each alert includes its 'status' (e.g. 'active', 'ended').

Inputs: language, province, alert_type, search_query. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 4 tools

    Disambiguation4/5

    The four tools split into clear roles: summary (aggregate), details (single alert), list/filter (by province/keyword), and spatial (coordinates). The only mild overlap is between get_weather_alerts and get_alerts_near_coordinates, since both return alert lists, but their inputs (province/filters vs lat/lon) distinguish them well.

    Naming Consistency4/5

    All tools share a consistent 'get_' prefix and snake_case convention. Minor deviations exist in noun form ('alert' vs 'alerts', 'weather_alerts' vs 'alerts_near_coordinates'), but the pattern remains predictable.

    Tool Count4/5

    Four tools is a reasonable, well-scoped set for a read-only weather-alert service covering aggregate, detail, list, and spatial views. It is slightly lean and could arguably support one or two more query modes, but nothing is redundant.

    Completeness4/5

    The domain is alert retrieval, and the surface covers the main access patterns: summary, per-alert detail, filtered listing, and coordinate lookup. As a read-only external data feed, no CRUD lifecycle is expected, so coverage is nearly complete with only minor gaps.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers