Skip to main content
Glama
halizz821

Environment Canada Weather Alerts MCP Server

by halizz821

Environment Canada Weather Alerts MCP Server

An 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:

    • get_weather_alerts: Search and filter weather alerts by province, alert type, or keyword (includes status in results).

    • 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.

    • get_alert_details: Retrieve full alert details, affected features, and official English/French text by feature ID.

  • 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.

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNoen
feature_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It does disclose the return shape (JSON string with alert metadata and polygon geometry), which tells the agent to expect geometry data, but it is silent on permissions, rate limits, whether the alert can expire or be unavailable, and error behavior for an unknown feature_id.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with a one-sentence purpose, then cleanly separated Args/Returns sections. Every line carries information, though the Returns section partially duplicates what the output schema already conveys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter read whose output schema already defines the response, the description supplies everything needed to invoke it correctly: both parameters are explained and the language enum is enumerated. Minor gaps are the provenance of feature_id and any failure mode for an invalid ID.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and largely does: feature_id is described as a unique feature or item ID of the alert, and language is documented with its permitted values ('en' or 'fr') and default ('en') — enum-like detail the schema itself lacks. It stops short of saying where a feature_id comes from, which is the one remaining semantic gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb (retrieves) and resource (full alert details) with the scope explicitly spelled out: text description plus boundary geometry. Read against the sibling get_alert_summary, the word 'full' makes the distinction between the detail view and the summary view immediately apparent without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: you call this when you already have a feature_id and need the complete record. There is no explicit guidance on when to prefer this over get_alert_summary, get_weather_alerts, or get_alerts_near_coordinates, nor any stated prerequisites for obtaining a feature_id. Adequate but leaves the routing decision to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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'.

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNoen
latitudeYes
longitudeYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full behavioral burden. 'Checks for' implies a read-only query, and it notes that each returned alert includes its 'status' field, but there is no mention of rate limits, authentication, error behavior, or what happens for coordinates outside coverage. Adequate but sparse for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded single-sentence purpose followed by clearly labeled Args and Returns sections. The Args block is slightly redundant with the schema shape but earns its place by adding units, examples, and enum values; nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is not required, yet the description still gives a useful summary of the returned payload. Parameter semantics are fully covered and the coordinate scope is unambiguous, leaving only routing guidance as a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well: it documents all three parameters, gives the unit ('decimal degrees') with concrete examples for latitude and longitude, and — importantly — supplies the enum values ('en' or 'fr') and default that the schema itself omits.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Checks for weather alerts') plus a clear scope qualifier ('intersecting a specific latitude and longitude coordinate'). This distinguishes it from get_alert_summary and get_alert_details by implying a point query, though it never explicitly names or contrasts those siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only inferable from the coordinate-scoping phrase; there is no explicit statement of when to prefer this tool over get_weather_alerts or the other siblings. No prerequisites, exclusions, or alternative-selection guidance are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
provinceNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden, and it says almost nothing beyond the return shape — no auth/permission needs, no rate limits, no definition of what 'active' means or how current the data is. The return-shape sentence largely duplicates the existing output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short, front-loaded with the purpose sentence, and uses clear Args/Returns structure with no filler. The Returns block partly restates the output schema, which is mild redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-optional-parameter read tool with an output schema already defining the return value, the definition covers the essentials: what it returns and how to scope by province. The main gap is the absence of any when-to-use guidance relative to three sibling alert tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: it explains that 'province' is an optional two-letter province code and gives a concrete example ('ON'). That is meaningful format guidance the schema lacks, though it does not specify behavior for invalid codes.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Gets an executive breakdown summary of active Canadian weather alerts') and the word 'summary' implicitly contrasts with the sibling get_alert_details. However, it never explicitly names or differentiates itself from get_weather_alerts or get_alerts_near_coordinates, so it falls short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer this is the aggregate/overview tool versus the per-alert detail sibling, but there is no explicit 'use this when…' or exclusion statement. No prerequisites or freshness caveats are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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').

ParametersJSON Schema
NameRequiredDescriptionDefault
languageNoen
provinceNo
alert_typeNo
search_queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden; it does disclose the source (Environment Canada), that results are real-time, and the response format with a 'status' field. It omits any auth/rate-limit context and does not clarify whether all params are optional filters (which the schema makes optional but is easy to misread).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then cleanly organized into Args and Returns blocks. Slightly verbose in the province enumeration, but every element is informative and earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the return-value prose is partly redundant, but the parameter documentation is complete and the read-only nature is clear. Only minor gaps (no auth/limits, no explicit sibling differentiation) remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate fully, and it does: it enumerates the valid province codes, lists the accepted alert_type values, explains search_query matches against location names or descriptions with examples, and documents the language default. This is exactly the meaning the bare schema lacks.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Fetches') and resource ('real-time weather alerts') with the data source ('Environment Canada'), so the agent knows exactly what it does. It does not, however, distinguish itself from siblings like get_alert_summary or get_alerts_near_coordinates, leaving the agent to infer the difference from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use or when-not-to-use guidance, and no sibling tool is named as an alternative. The filter parameters imply a 'use this to search alerts by region/keyword' scenario, but the agent must infer it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updatesv0.1.0
    • First observedget_alert_details
    • First observedget_alert_summary
    • First observedget_alerts_near_coordinates
    • First observedget_weather_alerts

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

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers