Skip to content

Commit 0def842

Browse files
authored
Merge pull request #116 from vikramgorla/develop
release: v0.7.0 — SLF snow conditions module
2 parents facc357 + a04eccf commit 0def842

15 files changed

Lines changed: 1289 additions & 29 deletions

README.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
`mcp-swiss` is a [Model Context Protocol](https://modelcontextprotocol.io) server that gives any AI assistant direct access to Swiss open data — trains, weather, rivers, maps, and companies.
2626

27-
**73 tools. No API keys. No registration. No server to run. Just `npx mcp-swiss`.**
27+
**76 tools. No API keys. No registration. No server to run. Just `npx mcp-swiss`.**
2828

2929
```
3030
🚆 Transport — SBB, PostBus, trams, live departures, journey planning
@@ -280,7 +280,7 @@ docker pull ghcr.io/vikramgorla/mcp-swiss
280280

281281
## Module Filtering
282282

283-
By default, mcp-swiss loads all 20 modules (73 tools). For better token efficiency, load only the modules you need:
283+
By default, mcp-swiss loads all 21 modules (76 tools). For better token efficiency, load only the modules you need:
284284

285285
### Select specific modules
286286
```json
@@ -309,11 +309,11 @@ By default, mcp-swiss loads all 20 modules (73 tools). For better token efficien
309309
| Preset | Modules | Tools | Token Savings |
310310
|--------|---------|-------|---------------|
311311
| `commuter` | transport, weather, holidays | 14 | 81% |
312-
| `outdoor` | weather, avalanche, hiking, earthquakes, dams | 16 | 78% |
312+
| `outdoor` | weather, avalanche, hiking, earthquakes, dams, snow | 19 | 75% |
313313
| `business` | companies, geodata, post, energy, statistics, snb | 24 | 67% |
314314
| `citizen` | parliament, voting, holidays, news | 17 | 77% |
315315
| `minimal` | transport | 5 | 93% |
316-
| `full` | all 20 modules (default) | 73 ||
316+
| `full` | all 21 modules (default) | 76 ||
317317

318318
Combine preset + modules: `--preset commuter --modules parliament`
319319

@@ -347,7 +347,7 @@ Once connected, try asking your AI:
347347

348348
## Tools
349349

350-
> 73 tools across 20 modules. Full specifications: [`docs/tool-specs.md`](docs/tool-specs.md) · Machine-readable: [`docs/tools.schema.json`](docs/tools.schema.json)
350+
> 76 tools across 21 modules. Full specifications: [`docs/tool-specs.md`](docs/tool-specs.md) · Machine-readable: [`docs/tools.schema.json`](docs/tools.schema.json)
351351
352352
### 🚆 Transport (5 tools)
353353

@@ -522,6 +522,14 @@ Once connected, try asking your AI:
522522
| `get_earthquake_details` | Full details for a specific seismic event by SED event ID |
523523
| `search_earthquakes_by_location` | Earthquakes near given coordinates with configurable radius, time range, and limit |
524524

525+
### ❄️ Snow Conditions / SLF (3 tools)
526+
527+
| Tool | Description |
528+
|------|-------------|
529+
| `get_snow_conditions` | Current snow depth and new snow (24h) across Switzerland from SLF IMIS stations, filterable by canton/altitude |
530+
| `list_snow_stations` | All 307 SLF snow measurement stations (IMIS automatic + manual study plots) |
531+
| `get_snow_measurements` | Detailed snow and weather measurements for a specific SLF station |
532+
525533
---
526534

527535
## Data Sources
@@ -550,6 +558,7 @@ All official Swiss open data — no API keys required:
550558
| [pxweb.bfs.admin.ch](https://www.pxweb.bfs.admin.ch) | BFS property prices + rent index | [BFS housing](https://www.bfs.admin.ch/bfs/en/home/statistics/construction-housing.html) |
551559
| [geo.admin.ch](https://api3.geo.admin.ch) — ASTRA | Traffic counting stations + daily volumes | [ASTRA](https://www.astra.admin.ch) |
552560
| [arclink.ethz.ch](http://arclink.ethz.ch) | Swiss Seismological Service earthquakes (SED/ETH) | [SED](http://www.seismo.ethz.ch) |
561+
| [measurement-api.slf.ch](https://measurement-api.slf.ch/public/api) | SLF snow depth + measurements (IMIS + study plots, CC BY 4.0) | [SLF](https://www.slf.ch) |
553562

554563
---
555564

docs/tool-specs.md

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- [Real Estate Module (3 tools)](#real-estate)
3030
- [Traffic / ASTRA Module (3 tools)](#traffic)
3131
- [Earthquakes / SED Module (3 tools)](#earthquakes)
32+
- [Snow Conditions / SLF Module (3 tools)](#snow-conditions)
3233

3334
---
3435

@@ -2468,5 +2469,50 @@ Search for earthquakes near given coordinates using the SED FDSN API.
24682469

24692470
---
24702471

2472+
---
2473+
2474+
## Snow Conditions
2475+
2476+
### `get_snow_conditions`
2477+
2478+
Get current snow conditions across Switzerland from SLF (WSL Institute for Snow and Avalanche Research). Returns snow depth and new snow (24h) for IMIS stations, sorted by snow depth. Data updated daily.
2479+
2480+
### Input
2481+
2482+
| Parameter | Type | Required | Description |
2483+
|-----------|------|----------|-------------|
2484+
| canton | string || Filter by canton abbreviation (e.g. GR, VS, BE, UR, TI) |
2485+
| min_altitude | number || Minimum station altitude in metres (e.g. 2000) |
2486+
| limit | number || Maximum number of stations to return (default: 20, max: 100) |
2487+
2488+
---
2489+
2490+
### `list_snow_stations`
2491+
2492+
List all SLF snow measurement stations in Switzerland (IMIS automatic stations and manual study plots). Returns station code, name, altitude, canton, and type. Sorted by elevation descending.
2493+
2494+
### Input
2495+
2496+
| Parameter | Type | Required | Description |
2497+
|-----------|------|----------|-------------|
2498+
| canton | string || Filter by canton abbreviation (e.g. GR, VS, BE) |
2499+
| type | string || Station type: "imis" (automatic) or "study-plot" (manual). Returns both by default |
2500+
| limit | number || Maximum number of stations to return (default: 20, max: 200) |
2501+
2502+
---
2503+
2504+
### `get_snow_measurements`
2505+
2506+
Get detailed snow and weather measurements for a specific SLF station. IMIS stations return 30-min data (snow depth, temperature, humidity, wind, radiation). Study plots return daily data (snow depth, new snow, water equivalent).
2507+
2508+
### Input
2509+
2510+
| Parameter | Type | Required | Description |
2511+
|-----------|------|----------|-------------|
2512+
| station_code | string || Station code (e.g. DAV2, WFJ2, 4AO0). Use list_snow_stations to find codes |
2513+
| type | string || Station type: "imis" (default) or "study-plot". Determines which API endpoint to query |
2514+
2515+
---
2516+
24712517
*Specification generated from mcp-swiss source code.*
2472-
*API sources: transport.opendata.ch, api.existenz.ch, api3.geo.admin.ch, zefix.admin.ch, openholidaysapi.org, ws.parlament.ch, aws.slf.ch/whiterisk.ch, geo.admin.ch (NABEL), service.post.ch, strompreis.elcom.admin.ch, pxweb.bfs.admin.ch, opendata.swiss, data.snb.ch, openerz.metaodi.ch, srf.ch, data.bs.ch, geo.admin.ch (SFOE dams), geo.admin.ch (hiking), api3.geo.admin.ch (ASTRA traffic), arclink.ethz.ch (SED earthquakes)*
2518+
*API sources: transport.opendata.ch, api.existenz.ch, api3.geo.admin.ch, zefix.admin.ch, openholidaysapi.org, ws.parlament.ch, aws.slf.ch/whiterisk.ch, geo.admin.ch (NABEL), service.post.ch, strompreis.elcom.admin.ch, pxweb.bfs.admin.ch, opendata.swiss, data.snb.ch, openerz.metaodi.ch, srf.ch, data.bs.ch, geo.admin.ch (SFOE dams), geo.admin.ch (hiking), api3.geo.admin.ch (ASTRA traffic), arclink.ethz.ch (SED earthquakes), measurement-api.slf.ch (SLF snow)*

docs/tools.schema.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,51 @@
14391439
}
14401440
},
14411441
"outputExample": { "count": 3, "center": { "lat": 46.948, "lon": 7.447 }, "radius_km": 50, "events": [] }
1442+
},
1443+
{
1444+
"name": "get_snow_conditions",
1445+
"module": "snow",
1446+
"description": "Get current snow conditions across Switzerland from SLF (WSL Institute for Snow and Avalanche Research)",
1447+
"apiSource": "https://measurement-api.slf.ch/public/api",
1448+
"inputSchema": {
1449+
"type": "object",
1450+
"properties": {
1451+
"canton": { "type": "string" },
1452+
"min_altitude": { "type": "number" },
1453+
"limit": { "type": "number" }
1454+
}
1455+
},
1456+
"outputExample": { "count": 20, "stations": [{ "station": "Zermatt", "altitude_m": 3150, "canton": "VS", "snow_depth_cm": 245, "new_snow_24h_cm": 32 }] }
1457+
},
1458+
{
1459+
"name": "list_snow_stations",
1460+
"module": "snow",
1461+
"description": "List all SLF snow measurement stations in Switzerland (IMIS automatic + manual study plots)",
1462+
"apiSource": "https://measurement-api.slf.ch/public/api",
1463+
"inputSchema": {
1464+
"type": "object",
1465+
"properties": {
1466+
"canton": { "type": "string" },
1467+
"type": { "type": "string", "enum": ["imis", "study-plot"] },
1468+
"limit": { "type": "number" }
1469+
}
1470+
},
1471+
"outputExample": { "count": 20, "total_stations": 307, "stations": [{ "code": "DAV2", "name": "Bärentälli", "altitude_m": 2558, "canton": "GR", "type": "imis" }] }
1472+
},
1473+
{
1474+
"name": "get_snow_measurements",
1475+
"module": "snow",
1476+
"description": "Detailed snow and weather measurements for a specific SLF station",
1477+
"apiSource": "https://measurement-api.slf.ch/public/api",
1478+
"inputSchema": {
1479+
"type": "object",
1480+
"required": ["station_code"],
1481+
"properties": {
1482+
"station_code": { "type": "string" },
1483+
"type": { "type": "string", "enum": ["imis", "study-plot"] }
1484+
}
1485+
},
1486+
"outputExample": { "station_code": "DAV2", "type": "imis", "measurements": [{ "time": "2026-03-15T08:30:00Z", "snow_depth_cm": 139, "air_temp_c": -6.8 }] }
14421487
}
14431488
]
14441489
}

manifest.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"manifest_version": "0.3",
33
"name": "mcp-swiss",
44
"display_name": "Switzerland MCP \ud83c\udde8\ud83c\udded",
5-
"version": "0.6.0",
6-
"description": "Swiss open data for AI \u2014 73 tools, zero API keys. Transport, weather, geodata, companies, parliament, and 15 more modules.",
7-
"long_description": "mcp-swiss gives any AI assistant direct access to Swiss open data. 73 tools across 20 modules: train schedules (SBB), weather (MeteoSwiss), river levels (BAFU), geodata (swisstopo), company registry (ZEFIX), parliament (OpenParlData.ch), avalanche bulletins, holidays, postal services, electricity prices, population statistics, exchange rates (SNB), recycling schedules, news (SRF), voting results, dam registry, hiking trail alerts, real estate data, traffic counts, and earthquake monitoring. All APIs are free and require zero authentication.",
5+
"version": "0.7.0",
6+
"description": "Swiss open data for AI \u2014 76 tools, zero API keys. Transport, weather, geodata, companies, parliament, and 16 more modules.",
7+
"long_description": "mcp-swiss gives any AI assistant direct access to Swiss open data. 76 tools across 21 modules: train schedules (SBB), weather (MeteoSwiss), river levels (BAFU), geodata (swisstopo), company registry (ZEFIX), parliament (OpenParlData.ch), avalanche bulletins, holidays, postal services, electricity prices, population statistics, exchange rates (SNB), recycling schedules, news (SRF), voting results, dam registry, hiking trail alerts, real estate data, traffic counts, earthquake monitoring, and snow conditions (SLF). All APIs are free and require zero authentication.",
88
"author": {
99
"name": "Vikram Gorla",
1010
"url": "https://github.com/vikramgorla"
@@ -300,6 +300,18 @@
300300
"name": "search_earthquakes_by_location",
301301
"description": "Search earthquakes near a location"
302302
},
303+
{
304+
"name": "get_snow_conditions",
305+
"description": "Get current snow conditions across Switzerland from SLF"
306+
},
307+
{
308+
"name": "list_snow_stations",
309+
"description": "List all SLF snow measurement stations"
310+
},
311+
{
312+
"name": "get_snow_measurements",
313+
"description": "Get detailed measurements for a specific SLF station"
314+
},
303315
{
304316
"name": "search_parliament_speeches",
305317
"description": "Search speeches given in Swiss parliament"
@@ -347,7 +359,8 @@
347359
"hiking",
348360
"real-estate",
349361
"traffic",
350-
"earthquakes"
362+
"earthquakes",
363+
"snow"
351364
],
352365
"license": "MIT",
353366
"compatibility": {

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mcp-swiss",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"description": "Swiss open data MCP server — 68 tools across 20 modules. Zero API keys.",
55
"main": "dist/index.js",
66
"bin": {

server.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
33
"name": "io.github.vikramgorla/swiss",
4-
"title": "Switzerland MCP \ud83c\udde8\ud83c\udded",
5-
"description": "Swiss open data MCP server. 73 tools, zero API keys. Transport, weather, geodata, news, rates.",
4+
"title": "Switzerland MCP 🇨🇭",
5+
"description": "Swiss open data MCP server. 76 tools, zero API keys. Transport, weather, geodata, news, rates.",
66
"repository": {
77
"url": "https://github.com/vikramgorla/mcp-swiss",
88
"source": "github"
99
},
10-
"version": "0.6.0",
10+
"version": "0.7.0",
1111
"icons": [
1212
{
1313
"src": "https://raw.githubusercontent.com/vikramgorla/mcp-swiss/main/assets/icon.svg",
@@ -25,7 +25,7 @@
2525
{
2626
"registryType": "npm",
2727
"identifier": "mcp-swiss",
28-
"version": "0.6.0",
28+
"version": "0.7.0",
2929
"runtimeHint": "npx",
3030
"transport": {
3131
"type": "stdio"

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { hikingTools, handleHiking } from "./modules/hiking.js";
2626
import { realEstateTools, handleRealEstate } from "./modules/realestate.js";
2727
import { trafficTools, handleTraffic } from "./modules/traffic.js";
2828
import { earthquakeTools, handleEarthquakes } from "./modules/earthquakes.js";
29+
import { snowTools, handleSnow } from "./modules/snow.js";
2930

3031
// ── Module Registry ──────────────────────────────────────────────────────────
3132

@@ -57,13 +58,14 @@ export const moduleRegistry: Record<string, ModuleEntry> = {
5758
realestate: { tools: realEstateTools, handler: handleRealEstate },
5859
traffic: { tools: trafficTools, handler: handleTraffic },
5960
earthquakes: { tools: earthquakeTools, handler: handleEarthquakes as ToolHandler },
61+
snow: { tools: snowTools, handler: handleSnow },
6062
};
6163

6264
// ── Presets ───────────────────────────────────────────────────────────────────
6365

6466
export const presets: Record<string, string[]> = {
6567
commuter: ["transport", "weather", "holidays"],
66-
outdoor: ["weather", "avalanche", "hiking", "earthquakes", "dams"],
68+
outdoor: ["weather", "avalanche", "hiking", "earthquakes", "dams", "snow"],
6769
business: ["companies", "geodata", "post", "energy", "statistics", "snb"],
6870
citizen: ["parliament", "voting", "holidays", "news"],
6971
minimal: ["transport"],

0 commit comments

Comments
 (0)