Repository avatar
Other Tools
v0.1.2
active

eu261-metar-engine

io.github.gsailing19/eu261-metar-engine

Deterministic EU261, UK261 & EU 2026/2202 compensation calculator + NOAA/IEM METAR weather auditor.

Documentation

eu261-metar-engine

Zero-LLM, zero-PII, deterministic TypeScript compensation calculator for Regulation (EC) No 261/2004, UK261, and Regulation (EU) 2026/2202, paired with a free NOAA AviationWeather + Iowa Environmental Mesonet (IEM ASOS) historical METAR weather excuse auditor and MCP Server (eu261-mcp).

Built for Cavoko under the MIT License.

Features

  • 1,988+ Commercial Airports (OurAirports CC0): Instant offline IATA/ICAO lookup, EU/EEA/CH/UK jurisdiction tagging (including EU outermost regions), and WGS-84 Vincenty great-circle distance (ECJ C-559/16 Bossen).
  • Exact Regulation Transition (2027-10-23):
    • flightDate < 2027-10-23 -> EC 261/2004 with national 1–6 year limitation periods (non-retroactive).
    • flightDate >= 2027-10-23 -> Regulation (EU) 2026/2202 (adopted 2026-09-16, published 2026-10-02, preserves 3-hour threshold €250/€400/€600, uniform 9-month claim deadline, 30-day mandatory airline response).
    • UK261 (£220 / £350 / £520, 6-year limitation in England/Wales, 5 years in Scotland).
  • Free Historical & Live METAR Fact-Checking ($0/mo):
    • Decodes raw ICAO METAR winds, gusts, visibility (meters & statute miles), ceilings, RVR, and severe phenomena (TS, FZRA, FG, +SN, VA, SQ).
    • Automatically queries NOAA AviationWeather (<40h) and Iowa Environmental Mesonet ASOS (>40h, decades of archive) with polite 1.1s throttling.
  • 4-Language DIY Claim Letters (en, de, es, pl): Deterministic templates citing exact case law (C-559/16 Bossen, C-452/13 Henning, C-402/07 Sturgeon, C-549/07 Wallentin-Hermann) and raw METAR logs with zero PII collection.
  • Built-in MCP Server (eu261-mcp): Connect Claude Desktop, Cursor, or any MCP host directly to deterministic EU261 + METAR tools.

Quick Start

import { evaluateCompensation, auditRouteMetar, generateDiyClaimLetter } from "eu261-metar-engine";

const verdict = evaluateCompensation({
  departureCode: "STN",
  arrivalCode: "MAD",
  operatingCarrierIata: "FR",
  flightDate: "2026-07-15",
  disruptionType: "delay",
  arrivalDelayMinutes: 215,
});

const metarAudit = await auditRouteMetar("STN", "MAD", "2026-07-15", {
  scheduledHourUtc: 12,
});

const letter = generateDiyClaimLetter({
  locale: "en",
  verdict,
  flightNumber: "FR5992",
  metarAudit,
  airlineCitedWeather: true,
});

MCP Server (eu261-mcp)

Run directly via npx (or from GitHub via npx -y github:gsailing19/eu261-metar-engine):

{
  "mcpServers": {
    "eu261-mcp": {
      "command": "npx",
      "args": ["-y", "eu261-metar-engine"]
    }
  }
}

Tools exposed:

  • evaluate_flight_compensation
  • audit_airport_weather_metar
  • generate_diy_claim_letter
  • lookup_airport_or_airline

Live Web App & Regulatory Guides

Try the zero-email interactive checker, historical METAR weather evidence cards, and 4-language (EN / DE / ES / PL) airline rejection guides live at cavoko.com:

Disclaimer

This library is an automated informational verification tool based on public regulations and official METAR archives. It does not constitute formal legal advice.

NPM
eu261-metar-engine
Install Command
npm install eu261-metar-engine