npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

swiss-weather-mcp

v0.1.1

Published

MCP server for Swiss weather — MeteoSwiss forecasts, current conditions, and travel weather for any AI assistant

Downloads

443

Readme

swiss-weather-mcp

npm version License: FSL-1.1-MIT

MCP server for Swiss weather -- MeteoSwiss forecasts for Switzerland, Open-Meteo worldwide. Works with Claude, Cursor, Windsurf, or any MCP client.

Features

  • 6 weather tools -- daily forecast, hourly forecast, current conditions, multi-day overview, travel weather, location search
  • MeteoSwiss STAC API -- official Swiss government data for ~6,000 Swiss locations (stations, ZIP codes, mountains)
  • Open-Meteo worldwide -- automatic fallback for locations outside Switzerland, up to 16-day forecasts
  • On-demand CSV fetching -- downloads MeteoSwiss forecast CSVs with TTL cache (no bulk data storage)
  • Dual export -- use as an MCP server for AI assistants or import library functions directly in Node.js
  • Zero auth required -- no API keys, no credentials, works out of the box

Quick Start

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "swiss-weather-mcp"]
    }
  }
}

Claude Code

claude mcp add weather -- npx -y swiss-weather-mcp

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "swiss-weather-mcp"]
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "swiss-weather-mcp"]
    }
  }
}

VS Code Copilot

Add to .vscode/mcp.json:

{
  "servers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "swiss-weather-mcp"]
    }
  }
}

Demo Mode

Set WEATHER_MOCK=1 to use mock data for testing without network calls:

WEATHER_MOCK=1 npx swiss-weather-mcp

Tools

get_forecast

Get daily weather forecast for a location and date.

Input:

  • location (string, required) -- City name, ZIP code, or "lat,lon" (e.g. "Zermatt", "8001", "46.02,7.75")
  • date (string, required) -- Forecast date YYYY-MM-DD (up to 9 days ahead for Swiss, 16 days worldwide)

Example output:

## Weather: Zermatt -- 2026-04-12

| | |
|---|---|
| **Condition** | sunny |
| **Temperature** | 4°C -- 18°C |
| **Precipitation** | 0% chance |
| **Wind** | 12 km/h SW |

get_hourly_forecast

Get hour-by-hour weather for a specific day. Useful for planning departure/arrival times.

Input:

  • location (string, required) -- City name, ZIP code, or "lat,lon"
  • date (string, required) -- Forecast date YYYY-MM-DD

Example output:

## Hourly Forecast: Zurich -- 2026-04-12

| Hour | Temp | Precip | Wind | Cloud | Sun |
|------|------|--------|------|-------|-----|
| 09:00 | 12°C | 0mm | 8km/h SW | 20% | 48min |
| 10:00 | 14°C | 0mm | 10km/h SW | 25% | 45min |

get_current_weather

Get real-time weather conditions. Uses MeteoSwiss stations for Switzerland (updated every 10 min), Open-Meteo for worldwide.

Input:

  • location (string, required) -- City name, ZIP code, or "lat,lon"

Example output:

## Current Weather: Zurich Fluntern

| | |
|---|---|
| **Temperature** | 15°C |
| **Wind** | 12 km/h SW |
| **Humidity** | 62% |
| **Pressure** | 1018 hPa |
| **Precipitation** | 0 mm |
| **Measured at** | 2026-04-09T14:30:00Z |

get_multi_day_forecast

Get a multi-day weather overview for trip planning. Returns one row per day.

Input:

  • location (string, required) -- City name, ZIP code, or "lat,lon"
  • start_date (string, required) -- First day YYYY-MM-DD
  • days (number, optional) -- Number of days, 1-16 (default: 5)

get_travel_weather

Get weather at both origin and destination for a travel day. Shows side-by-side comparison.

Input:

  • from (string, required) -- Origin location (city, ZIP, or "lat,lon")
  • to (string, required) -- Destination location
  • date (string, required) -- Travel date YYYY-MM-DD

search_locations

Search Swiss weather locations by name or ZIP code. Returns location IDs, coordinates, and altitude. Covers ~6,000 Swiss locations.

Input:

  • query (string, required) -- Location name or ZIP code (e.g. "Zermatt", "8001", "Jungfraujoch")
  • limit (number, optional) -- Maximum results (default: 10)

Example output:

- **Zermatt** (plz, 1616m) -- 46.02, 7.75
- **Zermatt / Sunnegga** (station, 2288m) -- 46.03, 7.78

Library Usage

Import weather functions directly in Node.js -- no MCP protocol involved:

import { getWeatherSummary, getWeatherForecast, getMultiDayForecast } from 'swiss-weather-mcp'

// One-liner for embedding in other results (e.g. train connections)
const summary = await getWeatherSummary(46.02, 7.75, '2026-04-12')
// -> "4-18°C, sunny, 0% rain"

// Full structured data
const forecast = await getWeatherForecast(46.95, 7.45, '2026-04-12')
// -> { tempMin: 6, tempMax: 17, precipProb: 10, symbol: 'partly cloudy', ... }

// Multi-day for trip itineraries
const days = await getMultiDayForecast(46.95, 7.45, '2026-04-12', 5)

Exported types: WeatherData, HourlyForecast, CurrentWeather, Location.

Data Sources

MeteoSwiss (Swiss locations)

Uses the official MeteoSwiss STAC API to discover forecast URLs, then fetches on-demand CSVs for ~6,000 Swiss locations. Data is free and licensed under CC-BY from the Swiss Federal Office of Meteorology and Climatology.

  • Daily forecasts: up to 9 days ahead
  • Hourly forecasts: up to 5 days ahead
  • Current conditions: real-time station data updated every 10 minutes

Open-Meteo (worldwide fallback)

For locations outside Switzerland, falls back to Open-Meteo -- a free, open-source weather API with worldwide coverage.

  • Daily forecasts: up to 16 days ahead
  • No API key required (free tier)
  • WMO weather code mapping for consistent symbol names

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | WEATHER_MOCK | No | Set to any value to use mock data (no network calls) |

No API keys or authentication required. Both MeteoSwiss and Open-Meteo are free and open.

Self-Hosting

Docker

docker build -t swiss-weather-mcp .
docker run -p 3002:3002 swiss-weather-mcp

The HTTP server exposes an SSE-based MCP endpoint on port 3002.

Railway

Deploy on Railway

Deploy from the repository and set the port to 3002. No environment variables required.

License

FSL-1.1-MIT -- Functional Source License. Free to use for any non-competing purpose. Converts to MIT after 2 years. See LICENSE for details.