foehn
MCP server for querying MeteoSwiss open weather data, providing access to station data, forecasts, radar composites, and more via natural language.
README
<h1 align="center"> <img src="https://raw.githubusercontent.com/kayhendriksen/foehn/main/assets/banner.svg" alt="foehn" width="600"> </h1>
<p align="center"> <strong>MeteoSwiss Open Data — Python API, CLI & MCP server · tabular as DataFrames/Parquet, gridded as xarray/Zarr</strong> </p>
<p align="center"> <a href="https://pypi.org/project/foehn/"> <img src="https://img.shields.io/pypi/v/foehn.svg" alt="PyPI Latest Release"> </a> <a href="https://pypi.org/project/foehn/"> <img src="https://img.shields.io/pypi/pyversions/foehn.svg" alt="Python Versions"> </a> <a href="https://github.com/kayhendriksen/foehn/blob/main/LICENSE"> <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License"> </a> <a href="https://scorecard.dev/viewer/?uri=github.com/kayhendriksen/foehn"> <img src="https://api.scorecard.dev/projects/github.com/kayhendriksen/foehn/badge" alt="OpenSSF Scorecard"> </a> <a href="https://pypi.org/project/foehn/"> <img src="https://img.shields.io/pypi/dm/foehn.svg" alt="Monthly Downloads"> </a> </p>
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.
<p align="center"> <img src="https://raw.githubusercontent.com/kayhendriksen/foehn/main/assets/mcp_demo.png" alt="Daily weather in Bern, powered by foehn" width="700"> </p> <p align="center"> <em>Daily weather in Bern, powered by foehn's MCP server and MeteoSwiss open data.</em> </p>
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/.
<img src="https://raw.githubusercontent.com/kayhendriksen/foehn/main/assets/cli_demo.gif" alt="foehn CLI demo" width="800">
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
<!-- mcp-name: io.github.kayhendriksen/foehn -->
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。