pypi foehnstdioMITupdated 8d ago
MeteoSwiss Open Data — Python API, CLI & MCP server · tabular as DataFrames/Parquet, gridded as xarray/Zarr
¿Qué puedes hacer con foehn?
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.
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
pip install foehn
foehn download
Recent data (Jan 1 to yesterday) is downloaded and converted to Parquet under ./data/meteoswiss/.
Installation
From PyPI:
pip install foehn
From source:
git clone https://github.com/kayhendriksen/foehn
cd foehn
pip install -e .
With extras:
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)
Requires Python 3.11 or later.
Python API
import foehn
df = foehn.load("smn", station="BER", frequency="d")
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
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
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.
MCP server
{
"mcpServers": {
"foehn": {
"command": "foehn",
"args": ["mcp"]
}
}
}
Give any MCP-compatible LLM live access to MeteoSwiss data. See the full MCP server documentation.
Documentation
| Collections | All 20+ MeteoSwiss datasets, categories, and time slice conventions |
| Python API | Loading data, metadata, downloading, and Parquet conversion |
| Gridded data | NetCDF grids as xarray Datasets and Zarr stores |
| CLI | All subcommands, flags, and environment variables |
| MCP Server | Setup, configuration, and available tools |
| Databricks Pipeline | Declarative Automation Bundle deployment |
Data sources
| STAC API | https://data.geo.admin.ch/api/stac/v1 |
| Documentation | https://opendatadocs.meteoswiss.ch |
| MeteoSwiss OGD | https://github.com/MeteoSwiss/opendata |
License
MIT
Instalación
Añade foehn a tu cliente. Elige el que uses.
claude mcp add foehn -- uvx foehncodex mcp add foehn -- uvx foehnamp mcp add foehn -- uvx foehn{
"mcpServers": {
"foehn": {
"command": "uvx",
"args": [
"foehn"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"foehn": {
"command": "uvx",
"args": [
"foehn"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"foehn","command":"uvx","args":["foehn"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"foehn": {
"command": "uvx",
"args": [
"foehn"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"foehn": {
"command": "uvx",
"args": [
"foehn"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"foehn": {
"command": "uvx",
"args": [
"foehn"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"foehn": {
"type": "local",
"command": "uvx",
"args": [
"foehn"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"foehn": {
"command": {
"path": "uvx",
"args": [
"foehn"
]
}
}
}
}Add to your Zed `settings.json`.
uvx foehnRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Puntuación
39 / 100
Incompleta
- Documentación21/25
- Mantenimiento25/25
- Confianza13/20
- Capacidad0/15
- Instalación12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 0 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Historial de versiones
| Versiones | Publicada |
|---|---|
| 0.4.0Última | 28 ago 2026 |
| 0.3.4 | 27 jul 2026 |
| 0.3.3 | 21 jul 2026 |
| 0.3.2 | 10 jun 2026 |
| 0.3.1 | 2 jun 2026 |
| 0.3.0 | 26 may 2026 |
| 0.2.23 | 21 may 2026 |
| 0.2.22 | 9 may 2026 |
| 0.2.21 | 25 abr 2026 |
| 0.2.20 | 18 abr 2026 |
| 0.2.19 | 17 abr 2026 |
| 0.2.18 | 17 abr 2026 |
| 0.2.17 | 17 abr 2026 |
| 0.2.16 | 17 abr 2026 |
| 0.2.15 | 7 abr 2026 |
| 0.2.14 | 4 abr 2026 |
| 0.2.13 | 4 abr 2026 |