mcp-swiss is a Model Context Protocol server that gives any AI assistant direct access to Swiss open data — trains, weather, rivers, maps, and companies.
22 tools. No API keys. No registration. No server to run. Just npx mcp-swiss.
🚆 Transport — SBB, PostBus, trams, live departures, journey planning
🌤️ Weather — MeteoSwiss live conditions + historical data
🌊 Hydrology — BAFU river & lake levels (great for Aare swimming!)
🗺️ Geodata — swisstopo geocoding, solar potential, geographic layers
🏢 Companies — ZEFIX federal registry, all 700K+ Swiss companies
Installation
Quick Start
npx mcp-swiss
That's it. No API keys, no .env files, no accounts. Pick your client below and paste the config.
Claude Desktop
Edit your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"swiss": {
"command": "npx",
"args": ["-y", "mcp-swiss"]
}
}
}
Restart Claude Desktop after saving.
Claude Code (CLI)
claude mcp add swiss -- npx -y mcp-swiss
That's it — Claude Code will use it in your next session.
Cursor
Requires Cursor 0.45.6+
Option A: Project config — create .cursor/mcp.json in your project root:
{
"mcpServers": {
"swiss": {
"command": "npx",
"args": ["-y", "mcp-swiss"]
}
}
}
Option B: Global config — create ~/.cursor/mcp.json:
{
"mcpServers": {
"swiss": {
"command": "npx",
"args": ["-y", "mcp-swiss"]
}
}
}
Option C: Via Cursor Settings UI
- Open Cursor Settings
- Go to Features → MCP Servers
- Click + Add new global MCP server
- Paste the JSON config above
VS Code (GitHub Copilot)
One-click Install
CLI Install
# VS Code
code --add-mcp '{"name":"swiss","command":"npx","args":["-y","mcp-swiss"]}'
# VS Code Insiders
code-insiders --add-mcp '{"name":"swiss","command":"npx","args":["-y","mcp-swiss"]}'
Manual Config
Add to your VS Code User Settings (JSON) — press Ctrl+Shift+P → Preferences: Open User Settings (JSON):
{
"mcp": {
"servers": {
"swiss": {
"command": "npx",
"args": ["-y", "mcp-swiss"]
}
}
}
}
Or add to .vscode/mcp.json in your workspace (shareable with your team):
{
"servers": {
"swiss": {
"command": "npx",
"args": ["-y", "mcp-swiss"]
}
}
}
Windsurf
Add to ~/.codeium/windsurf/model_config.json:
{
"mcpServers": {
"swiss": {
"command": "npx",
"args": ["-y", "mcp-swiss"]
}
}
}
Cline (VS Code)
Open VS Code settings.json and add:
{
"cline.mcpServers": {
"swiss": {
"command": "npx",
"args": ["-y", "mcp-swiss"]
}
}
}
Any MCP Client
mcp-swiss uses stdio transport and requires no environment variables. The universal config:
{
"command": "npx",
"args": ["-y", "mcp-swiss"]
}
This works with any MCP-compatible client — just plug it in.
Demo Prompts
Once connected, try asking your AI:
| Prompt | What it uses |
|---|---|
| "Next 5 trains from Zürich HB to Geneva" | get_connections |
| "Is the Aare in Bern warm enough to swim?" | get_water_level |
| "Weather in Lugano vs Zürich today" | get_weather |
| "Find blockchain companies registered in Zug" | search_companies |
| "Solar potential of Bundesplatz 3, Bern" | geocode + get_solar_potential |
| "Live departures from Bern HB" | get_departures |
| "What rivers are near Thun?" | list_hydro_stations + get_water_level |
| "Plan my Saturday: train to Interlaken, check weather" | Multiple tools chained |
Tools
Full specifications:
docs/tool-specs.md· Machine-readable:docs/tools.schema.json
🚆 Transport (5 tools)
| Tool | Description |
|---|---|
search_stations | Find stations/stops by name or location |
get_connections | Journey planner between any two points |
get_departures | Live departures from a station |
get_arrivals | Live arrivals at a station |
get_nearby_stations | Stations near coordinates |
🌤️ Weather & Hydrology (6 tools)
| Tool | Description |
|---|---|
get_weather | Current conditions at a MeteoSwiss station |
list_weather_stations | All ~160 MeteoSwiss stations with metadata |
get_weather_history | Historical weather data (up to 32 days) |
get_water_level | River/lake level + temperature (BAFU) |
list_hydro_stations | All 400+ hydrological monitoring stations |
get_water_history | Historical hydrology data |
🗺️ Geodata / swisstopo (6 tools)
| Tool | Description |
|---|---|
geocode | Swiss address → coordinates |
reverse_geocode | Coordinates → Swiss address |
search_places | Swiss place names, mountains, lakes, features |
get_solar_potential | Rooftop solar irradiation at a location |
identify_location | All geographic data layers at a point |
get_municipality | Municipality info by name |
🏢 Companies / ZEFIX (5 tools)
| Tool | Description |
|---|---|
search_companies | Search by name, canton, legal form |
get_company | Full company details by ZEFIX ehraid |
search_companies_by_address | Companies registered at an address |
list_cantons | All 26 Swiss cantons |
list_legal_forms | AG, GmbH, and all Swiss legal forms |
Data Sources
All official Swiss open data — no API keys required:
| Source | Data | Docs |
|---|---|---|
| transport.opendata.ch | SBB, PostBus, trams | API docs |
| api.existenz.ch | MeteoSwiss weather + BAFU hydrology | API docs |
| api3.geo.admin.ch | swisstopo federal geodata | API docs |
| zefix.admin.ch | Federal company registry | Swagger |
Development
# Clone
git clone https://github.com/vikramgorla/mcp-swiss.git
cd mcp-swiss
# Install deps
npm install
# Build
npm run build
# Run in dev mode
npm run dev
# Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js
Testing
npm test
Contributing
mcp-swiss uses Speckit — a spec-driven development workflow. Every new tool starts with a spec in specs/, not code.
See CONTRIBUTING.md for the full workflow including:
- How to add a new tool (spec → plan → implement → test)
- Testing requirements (unit + integration + MCP protocol)
- Code style and ESLint rules
- Branch naming and PR process
Requirements
- Node.js 20+
- No API keys or accounts needed
License
MIT — see LICENSE