Swiss Hiking Trails MCP
by OpenCoreCH
README.md
# 🥾 Swiss Hiking Trails MCP
An [MCP](https://modelcontextprotocol.io) server for Swiss hiking routes, built on Swiss open
government data. Ask your AI agent things like *"I want to do a not-too-hard 4-hour hike in Valais
this week — what do you recommend, is it open, how do I get there by train, and give me the GPX."*
**Live endpoint:** `https://wandern.opencore.ch/api/mcp` (Streamable HTTP, no auth)
## What it knows
- **355 official SchweizMobil Wanderland routes** (7 national, ~60 regional, local day hikes) with
**887 stages** — official hiking times in both directions, distance, ascent/descent, min/max
elevation, fitness and technique difficulty, start/end places, cantons.
- **Live closures & diversions** from the federal closures layer.
- **Elevation profiles** from the swisstopo terrain model.
- **Weather** at route elevation (Open-Meteo), **public transport** to/from trailheads
(transport.opendata.ch), **POIs** along the trail — huts, water, restaurants (OpenStreetMap).
- **GPX generation** with elevation data: `GET /api/gpx/{routeId}.gpx` (e.g. `/api/gpx/39.2.gpx`).
## Tools
| Tool | Purpose |
| --- | --- |
| `search_routes` | Search routes by name/place with filters (length, duration, difficulty, canton, single/multi-day) |
| `find_routes_near` | Routes near a Swiss place name or coordinates |
| `get_route_details` | Full route details incl. stages and GPX links |
| `get_elevation_profile` | Elevation profile (distance/elevation pairs) |
| `check_closures` | Current closures/diversions near the route |
| `generate_gpx` | GPX download link for a route or stage |
| `get_weather` | Daily forecast at route elevation |
| `get_transit_connections` | Public transport to the start / back from the end |
| `find_pois_along_route` | Huts, drinking water, restaurants, picnic spots, viewpoints, transit stops |
All tools take `lang` (`de` default, `fr`, `it`, `en`). Route ids are SchweizMobil route numbers
(`"1"` = Via Alpina), stage ids are `"1.5"` (route 1, stage 5).
## Development
```bash
pnpm install
pnpm dev # MCP endpoint at http://localhost:3000/api/mcp
```
### Rebuilding the route index
The bundled route index (`data/`) is generated from the official Wanderland dataset
(updated roughly yearly):
```bash
curl -LO https://data.geo.admin.ch/ch.astra.wanderland/wanderland/wanderland_2056.shp.zip
unzip wanderland_2056.shp.zip -d wanderland
pnpm build-index wanderland/2026_shape_wanderland
```
## Data sources & licenses
| Source | Data | License / terms |
| --- | --- | --- |
| [Wanderland Schweiz](https://opendata.swiss/en/dataset/langsamverkehr-wanderland-schweiz) (FEDRO/SchweizMobil) | Routes, stages, times, difficulty | [FSDI terms of use](https://www.geo.admin.ch/en/terms-of-use-fsdi) (free with attribution) |
| [GeoAdmin API](https://docs.geo.admin.ch) | Closures, elevation, geocoding | FSDI terms of use |
| [Open-Meteo](https://open-meteo.com) | Weather | CC-BY 4.0 |
| [transport.opendata.ch](https://transport.opendata.ch) | Public transport | Free, fair use |
| [OpenStreetMap](https://www.openstreetmap.org/copyright) | POIs | ODbL |
Not an official service of SchweizMobil, swisstopo or the Swiss Confederation.
## License
MIT — see [LICENSE](LICENSE).
This server cannot be deployed
Maintenance
ActivityStale
ResponsivenessNo issues