Access Swiss meteorological open data from MeteoSwiss, powered by foehn
io.github.kayhendriksen/foehn โ MCP Server (MeteoSwiss Open Data)
This MCP server provides access to Swiss meteorological open data from MeteoSwiss, powered by foehn. It exposes data in tabular form as DataFrames/Parquet and in gridded form as xarray/Zarr, supporting use of climate datasets alongside common Python data tooling.
๐ ๏ธ Key Features
MeteoSwiss open data access
Powered by foehn
Tabular data as DataFrames/Parquet
Gridded data as xarray/Zarr
Server associated with the project foehn
๐ Use Cases
Query and analyze MeteoSwiss climate/weather datasets
Work with tabular datasets using DataFrames and Parquet workflows
Use gridded datasets with xarray/Zarr for spatial data processing
foehn downloads every MeteoSwiss OGD collection via the STAC API, converts CSV/TXT station data to Parquet with Polars, and opens gridded collections โ NetCDF climate grids, GRIB2 forecasts, and ODIM radar composites โ as xarray Datasets or Zarr stores. It can optionally ingest everything into Databricks Unity Catalog Delta tables on a daily schedule, and ships an MCP server so LLMs can query Swiss weather data directly.
Daily weather in Bern, powered by foehn's MCP server and MeteoSwiss open data.
Why foehn?
20+ collections in one command โ weather stations, radar, hail maps, forecasts, climate scenarios, and more
Tabular and gridded โ CSV station data as Polars DataFrames or Parquet; NetCDF, GRIB2 and ODIM radar grids as xarray Datasets or Zarr stores
MCP server for LLMs โ give your favorite LLM live access to MeteoSwiss data with the MCP server
Significantly smaller on disk โ columnar Parquet with Zstandard compression vs. raw CSVs
Incremental by default โ only re-downloads files that changed since your last run, tracked via _last_run.json
No Spark required locally โ download + conversion uses Polars only; Spark is optional for Delta ingestion
Ships a Declarative Automation Bundle โ ready-to-deploy daily job and historical backfill, no pipeline config needed
Quick start
bash
pip install foehn
foehn download
Recent data (Jan 1 to yesterday) is downloaded and converted to Parquet under ./data/meteoswiss/.
foehn CLI demo
Installation
From PyPI:
bash
pip install foehn
From source:
bash
git clone https://github.com/kayhendriksen/foehn
cd foehn
pip install -e .
With extras:
bash
pip install "foehn[databricks]"# PySpark + Delta
pip install "foehn[mcp]"# MCP server
pip install "foehn[grids]"# xarray + Zarr for all gridded data (NetCDF, GRIB2, radar)
Load data directly into Polars DataFrames, explore metadata, download to disk, and convert to Parquet โ all from Python. See the full Python API documentation.
CLI
bash
foehn download smn pollen
foehn load smn --station BER --frequency d
The CLI mirrors the Python API with subcommands for downloading, converting, loading, and inspecting metadata. See the full CLI documentation.
Gridded data
python
ds = foehn.open_dataset("surface_derived_grid", match="rhiresd") # NetCDF climate grid
ds = foehn.open_dataset("forecast_icon_ch1", match="202605231500-0-t_2m-ctrl") # one GRIB2 field
ds = foehn.open_dataset("radar_precip", match="cpc2613000000") # one radar composite
foehn.to_zarr("surface_derived_grid", match="rhiresd") # Zarr store
NetCDF climate grids/normals/scenarios, GRIB2 forecasts (ICON-CH1/CH2, KENDA), and HDF5/ODIM radar composites all open as xarray Datasets instead of DataFrames. One extra covers them: pip install "foehn[grids]". See the gridded data documentation.