MeteoSwiss MCP Server

io.github.eins78由 GitHub 账号 eins78 发布v2.0.2更新于 Oct 26, 2026

Swiss weather data for AI assistants — forecasts, measurements, stations, pollen.

已验证Streamable HTTP可网页运行位置与生活网页搜索与抓取

概览

AI 生成的概览

MeteoSwiss 天气 MCP 服务器,让助手获取瑞士天气预报、实时站点观测、花粉数据、气候序列和网站内容检索。

可以做什么
  • 按邮编、站点或地名查询瑞士多地天气预报
  • 读取约 300 个自动气象站的实时观测数据
  • 按名称、州或坐标搜索和浏览气象站网络
  • 获取 7 种监测物种的当前花粉浓度
  • 调取国家气候网络数十年尺度的气候序列与气候指标
  • 以德、法、意、英四种语言检索 MeteoSwiss 网站内容,并将页面抓取为 markdown 或纯文本
适用场景
适合需要助手回答瑞士天气、预报、实时天气状况、花粉或长期气候数据问题的场景,支持四种语言,无需自行搭建数据管道。
运行要求
可使用托管远程端点(无需安装),也可本地运行。npm 包需要 Node.js;用 Docker 或源码自建需 Node.js v22+ 与 pnpm。未声明账号、API 密钥或请求头。自建实例通过 PORT、PUBLIC_URL、BIND_ADDRESS、MAX_SESSIONS、TRUST_PROXY 等变量配置。
安装前请注意
该服务器为只读:仅获取公开的天气与网站数据,不会修改任何内容。请求会发往 MeteoSwiss 开放数据与 MeteoSwiss 网站,查询内容对上游服务可见。自建时需正确设置 TRUST_PROXY,否则客户端可伪造 IP 绕过速率限制。

安装

在 SourceWeft 中

  1. 打开 控制台中的 MeteoSwiss MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.eins78%2Fmeteoswiss-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "meteoswiss": {
      "type": "http",
      "url": "https://meteoswiss-mcp.ars.is/mcp"
    }
  }
}

README

🌦️ MeteoSwiss MCP Server

[npm version] [License: CC0-1.0] [Node.js >= 22] [Cursor Directory]

MCP server for MeteoSwiss weather data — powered by MeteoSwiss Open Data, the same data behind the MeteoSwiss app and website.

This package is the server half of the repo's skill vs. MCP case study — the same data is also available as a no-infrastructure agent skill.

meteoswiss-mcp.ars.is — try it now, no setup needed.

📖 Documentation — using the tools, running your own instance (full environment variable reference), and development.

  • Multi-day forecasts for ~6000 Swiss locations (postal codes, stations, place names)
  • Real-time measurements from ~300 stations (~160 full weather + ~140 precipitation-only), updated every 10 minutes
  • Station discovery by name, canton, or GPS coordinates
  • Pollen monitoring from ~15 stations across Switzerland
  • Climate series from the National Basic Climatic Network (NBCN), going back decades
  • MeteoSwiss website search and content retrieval

Use the Hosted Service

No installation required — the server is hosted at https://meteoswiss-mcp.ars.is.

Claude Code

bash
claude mcp add --transport http meteoswiss https://meteoswiss-mcp.ars.is/mcp

Claude Desktop

Add to your configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "meteoswiss": {      "command": "npx",      "args": ["mcp-remote", "https://meteoswiss-mcp.ars.is/mcp"]    }  }}

Cursor

Install from the Cursor Directory, or add manually via Settings → MCP → Add Server → paste https://meteoswiss-mcp.ars.is/mcp.

Claude.ai

Go to Settings → Integrations → Add MCP Server → paste https://meteoswiss-mcp.ars.is/mcp.

Example Questions

  • "What's the weather forecast for Zurich this week?"
  • "Wie wird das Wetter in Bern morgen?"
  • "Quelle est la météo à Genève?"
  • "Che tempo fa a Lugano?"
  • "How windy is it at Jungfraujoch right now?"
  • "Show me pollen data for Zurich"

Available Tools

ToolDescription
meteoswissLocalForecastMulti-day forecasts for any Swiss location by postal code, station, or place name
meteoswissCurrentWeatherReal-time measurements from automatic weather stations (temperature, wind, humidity, pressure)
meteoswissStationsSearch and browse the MeteoSwiss station network by name, canton, or coordinates
meteoswissPollenDataCurrent pollen concentration data from monitoring stations
meteoswissClimateDataNBCN climate series — temperature, precipitation, sunshine, and climate indicators going back decades
searchSearch MeteoSwiss website content (DE, FR, IT, EN)
fetchFetch full content from MeteoSwiss pages in markdown, text, or HTML

Prompts

Pre-configured prompts for common weather queries:

PromptLanguageDescription
wetterNordschweizGermanForecast and current weather for Northern Switzerland
wetterSchweizGermanWeather for any Swiss location
meteoSuisseRomandeFrenchForecast and current weather for Western Switzerland
meteoTicinoItalianForecast and current weather for Southern Switzerland

Self-Hosting

Docker

bash
docker run -p 3000:3000 ghcr.io/eins78/meteoswiss-mcp:latest

With custom URL:

bash
docker run -p 3000:3000 -e PUBLIC_URL=https://your-domain.com ghcr.io/eins78/meteoswiss-mcp:latest

Docker Compose

bash
docker compose up

From Source

bash
git clone https://github.com/eins78/meteoswiss-llm-tools.gitcd meteoswiss-llm-tools/packages/meteoswiss-mcppnpm installpnpm buildpnpm start

The server will be available at http://localhost:3000. MCP endpoint: http://localhost:3000/mcp.

Local MCP Configuration

json
{  "mcpServers": {    "meteoswiss-local": {      "command": "npx",      "args": ["mcp-remote", "http://localhost:3000/mcp"]    }  }}

Environment Variables

VariableDefaultDescription
PORT3000Server port
PUBLIC_URL—Full public URL for URL generation (e.g. https://meteoswiss-mcp.ars.is)
USE_TEST_FIXTURESfalseUse local test data instead of live API
BIND_ADDRESS0.0.0.0Interface to bind to
MAX_SESSIONS100Maximum concurrent sessions
MAX_SESSIONS_PER_CLIENT10Maximum concurrent sessions per client IP (as seen through TRUST_PROXY); further initialize requests get 429
SESSION_TIMEOUT_MS300000Session timeout in milliseconds
TRUST_PROXY0Number of reverse-proxy hops to trust for the client IP (X-Forwarded-For). Set 1 behind one proxy such as Caddy; leave 0 when clients reach the server directly, or they can spoof their IP past the rate limit
DEBUG—Debug namespaces (e.g. mcp:*)

This table lists the commonly used variables. The configuration reference documents all of them, including rate limiting, the data cache and the content cache.


Development

Prerequisites

  • Node.js v22+ (nvm recommended)
  • pnpm

Setup

bash
nvm usepnpm install

Commands

CommandDescription
pnpm devStart with hot reloading
pnpm startStart the server
pnpm buildBuild TypeScript
pnpm testRun tests
pnpm run lintType checking + ESLint
pnpm run fixAuto-fix lint errors
pnpm run ciFull CI (lint + build + test)
pnpm run dev:inspectTest with MCP Inspector

Project Structure

src/  index.ts              # Entry point  server.ts             # MCP server (factory pattern)  data/                 # Data access and transformation  schemas/              # Zod schemas for validation  tools/                # MCP tool implementations  support/              # Logging, validation, HTTP, sessions  views/homepage/       # Server homepage contenttest/  integration/          # Integration tests for all tools  __fixtures__/         # Test data

Debugging

Enable debug output with the DEBUG environment variable:

bash
DEBUG=mcp:* pnpm dev          # All debug outputDEBUG=mcp:tools pnpm dev      # Tool execution onlyDEBUG=mcp:transport pnpm dev  # Transport layer only

See docs/debugging-guide.md for more.

Contributing

Contributions are welcome! Run pnpm run fix && pnpm run ci before committing.

See docs/releasing.md for the release process.

License

CC0-1.0 — public domain

来源:packages/meteoswiss-mcp/README.md,提交 3d96194

工具

7

fetch

Fetch full content from a MeteoSwiss webpage and convert to markdown or plain text. Use the search tool first to discover valid page URLs, then pass the full URL as the id parameter.

输入参数id必填formatincludeMetadata

meteoswissLocalForecast

Get a multi-day weather forecast for any Swiss location. Returns daily summaries (temperature, precipitation, sunshine, wind, weather icon) plus a hierarchical hourly breakdown of every series. This uses official MeteoSwiss Open Data — the same forecasts powering the MeteoSwiss app and website. Accepts: - Postal codes: "8001" (Zurich), "3000" (Bern), "1200" (Geneva) - Station abbreviations: "SMA" (Zurich Fluntern), "BER" (Bern) - Place names: "Zurich", "Basel", "Lugano" Coverage: ~6000 Swiss locations (all postal codes + weather stations + mountain points). Forecast horizon: up to 9 days. Updated hourly. Each day's summary fields: temperature_min_c, temperature_max_c, precipitation_total_mm, sunshine_total_minutes, wind_avg_kmh, wind_gust_max_kmh, weather, weather_icon_url. Each day also includes "hourly": one array of per-hour objects covering every series together — { time, temperature_c, precip_mm, sunshine_minutes, wind_kmh, wind_gust_kmh } — useful for judging *when* rain, sun, or wind is expected, not just the daily summary: - Each entry's "time" is already local wall-clock time for the location (Europe/Zurich), with the UTC offset included, e.g. "2026-07-09T14:00:00+02:00". It is NOT UTC — do not convert it. - A dry/calm/sunless hour is reported as its measured value (often 0), not omitted. A fully dry day is still a full array of zero-precipitation hours, not an empty array. - Each field is independently null if just THAT series has no reading for a given hour — the other fields for that same hour are still populated. An hour is omitted entirely only when every series is missing for it. - "hourly" itself is null when no hourly breakdown exists for this location at all (a total data gap); [] only when this location supports hourly data but none was available for that specific day. - For weather stations, temperature_min_c/temperature_max_c/precipitation_total_mm are MeteoSwiss's own official daily aggregates — a different, separately-cura

输入参数dayslocation必填

meteoswissCurrentWeather

Get real-time weather measurements from ~300 Swiss automatic weather stations (~160 full weather + ~140 precipitation-only). Returns temperature, precipitation, wind, humidity, pressure, sunshine, and more. Data updates every 10 minutes. Precipitation-only stations return only rainfall data. For 8 stations (Zurich, Basel, Chur, Sion, Altdorf, Säntis, Jungfraujoch, Grand St-Bernard), also includes daily visual observations: cloud cover, fog, rain, snowfall, hail, and snow coverage. Accepts station names ("Zurich"), abbreviations ("SMA"), addresses ("Bahnhofplatz 1 Bern"), or WGS84 coordinates. Automatically finds the nearest station.

输入参数stationcoordinates

meteoswissStations

List and search MeteoSwiss measurement stations. Filter by name, canton, or browse the full network of ~300 stations (~160 full weather + ~140 precipitation-only) across Switzerland.

输入参数limitcantonsearch

meteoswissPollenData

Get current pollen concentration data from MeteoSwiss monitoring stations (~15 stations across Switzerland). Shows pollen levels for 7 measured species (alder, birch, hazel, beech, ash, oak, grasses) — each is always included, with a "no-current-data" status when out of season. Ambrosia (ragweed) is a MeteoSwiss forecast-only category and is not part of this OGD measurement network, so it is not included. Useful for allergy sufferers.

输入参数station

meteoswissClimateData

Get homogeneous climate measurement series from Switzerland's National Basic Climatic Network (NBCN). Returns temperature, precipitation, sunshine, radiation, wind, pressure, and climate indicators (frost days, summer days, heat days) going back decades. 29 climate stations + 46 precipitation stations with daily, monthly, and yearly resolution. Use cases: "What are typical January temperatures in Zurich?", "How has precipitation changed in Basel over 50 years?", "How many heat days did Lugano have last year?" Accepts station names ("Zurich", "Basel"), abbreviations ("SMA", "BAS"), or WGS84 coordinates.

输入参数limitstationend_dateresolutionstart_datecoordinates

版本历史

1
  1. v2.0.2最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分