foehn

io.github.kayhendriksen由 GitHub 帳號 kayhendriksen 發布v0.5.1更新於 Nov 8, 2026

Access Swiss meteorological open data from MeteoSwiss, powered by foehn

概覽

AI 產生的概覽

此 MCP 伺服器讓助理直接存取瑞士 MeteoSwiss 開放氣象資料,涵蓋測站、雷達、預報與氣候資料集。

可以做什麼
  • 透過內建的 MCP 伺服器查詢 MeteoSwiss 開放資料集合
  • 讀取測站觀測的表格資料,以及氣候、預報與雷達格點資料
  • 涵蓋 20 多個集合,包括氣象站、雷達、冰雹圖、預報與氣候情境
  • 底層程式庫負責下載、轉換為 Parquet,並以 xarray 或 Zarr 開啟格點資料
適用情境
適合讓助理根據 MeteoSwiss 官方資料回答瑞士天氣、氣候或雷達相關問題,不必手動下載檔案。也適合分析與探索瑞士官方氣象開放資料。
執行需求
以 Python 套件形式透過 stdio 在本機執行(需 Python 3.11 以上);安裝 mcp 附加元件後以 foehn mcp 指令啟動。需要網路連線至 MeteoSwiss 的 STAC API 以取得資料。未宣告任何帳號、API 金鑰或環境變數。
安裝前請注意
伺服器會從 MeteoSwiss 公開介面下載資料並寫入本機資料目錄,需預留磁碟空間與網路流量。資料來自第三方公開 API;預報與雷達檔案會在一天或兩週後輪替過期,近期時間切片可能無法取得。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 foehn,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[foehn]

MeteoSwiss Open Data — Python API, CLI & MCP server · tabular as DataFrames/Parquet, gridded as xarray/Zarr

[PyPI Latest Release] [Python Versions] [MIT License] [OpenSSF Scorecard] [Monthly Downloads]


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]

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 per dataset and time slice in _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 foehnfoehn 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/foehncd foehnpip install -e .

With extras:

bash
pip install "foehn[databricks]"   # PySpark + Delta, and Polars' build for CPUs without AVX2pip install "foehn[mcp]"          # MCP serverpip install "foehn[grids]"        # xarray + Zarr for all gridded data (NetCDF, GRIB2, radar)

Requires Python 3.11 or later.


Python API

python
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

bash
foehn download smn pollenfoehn 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 gridds = foehn.open_dataset("forecast_icon_ch1", match="YYYYMMDDHHMM-0-t_2m-ctrl")  # one GRIB2 fieldds = foehn.open_dataset("radar_precip", match="cpcYYDDDHHMM")  # one radar composite# Forecast and radar files roll off after a day / two weeks: fill in a recent time.# A match that finds nothing lists the times the collection holds now.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

json
{  "mcpServers": {    "foehn": {      "command": "foehn",      "args": ["mcp"]    }  }}

Give any MCP-compatible LLM live access to MeteoSwiss data. See the full MCP server documentation.


Documentation

CollectionsAll 20+ MeteoSwiss datasets, categories, and time slice conventions
Python APILoading data, metadata, downloading, and Parquet conversion
Gridded dataNetCDF grids as xarray Datasets and Zarr stores
CLIAll subcommands, flags, and environment variables
MCP ServerSetup, configuration, and available tools
Databricks PipelineDeclarative Automation Bundle deployment

Data sources


License

MIT

來源:README.md,提交 5605af1

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:伺服器未能啟動。

版本歷史

2
  1. v0.5.0Oct 25, 2026
  2. v0.4.0Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分