swiss-public-transport-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@swiss-public-transport-mcp plan a journey from Zurich to Bern tomorrow at 10am"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
swiss-public-transport-mcp
MCP server for Swiss public transport — connections, stationboards, real-time delays, and direct booking links for SBB.
Wraps transport.opendata.ch — free, no API key, no signup. Covers the full Swiss network (SBB, Postauto, regional, trams, buses, ships, cableways).
Why this server
Zero config. Install and go — no account, no token, no env vars.
Booking links. Returns deep links into SBB.ch so the user can buy a ticket in one click.
Disambiguation built in. Ambiguous station names return candidates instead of failing silently.
Compact, model-friendly output. Formatted text designed for LLM context windows, not raw JSON dumps.
Related MCP server: swiss-rail-mcp
Tools
Tool | Purpose |
| Resolve a station/stop/POI by name or coordinates |
| Plan A → B with via, transport-type filters, arrival-time mode |
| Live departures or arrivals from any stop |
| Build an SBB.ch URL for a journey so the user can buy a ticket |
Install
No install needed — run directly with uvx:
uvx swiss-public-transport-mcpClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"swiss-public-transport": {
"command": "uvx",
"args": ["swiss-public-transport-mcp"]
}
}
}Config file location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Development
git clone https://github.com/tpjnorton/swiss-public-transport-mcp.git
cd swiss-public-transport-mcp
uv sync
uv run swiss-public-transport-mcpRelated project
If you need official opentransportdata.swiss data — SIRI-SX disruption alerts, occupancy forecasts, OJP Fare ticket prices, train formation — see malkreide/swiss-transport-mcp. It exposes ~11 tools across the official OJP 2.0 / SIRI / CKAN APIs and requires a (free) API key from the opentransportdata.swiss API Manager.
this server | malkreide/swiss-transport-mcp | |
Data source | transport.opendata.ch | opentransportdata.swiss (official) |
API key | none | required (free signup) |
Tools | 4 (journey planning + booking links) | 11 (planning + disruptions + occupancy + fares + formation) |
Setup | one command | per-API key configuration |
Best for | quick journey planning, fast LLM responses, ticket purchase flow | rich operational data, official feeds |
The two servers cover overlapping but distinct use cases — you can install both side by side.
Available Tools
4 toolsget_booking_linkA
Get a direct link to buy tickets on sbb.ch for a specific journey.
Use this when someone wants to:
Buy a ticket ("book me a train from Zürich to Bern")
Get a link to the SBB website for a specific route and time
Share a timetable link with someone
Returns a ready-to-click URL that opens SBB's timetable with the search pre-filled.
Inputs: from_station (required), to_station (required), date, time, +1 more. Returns: result
get_stationboardA
Check what's departing or arriving at a Swiss station right now.
Use this to:
See upcoming departures ("what trains leave from Bern soon?")
Check if a specific service is delayed or cancelled
Browse arrivals at a station
Filter by transport type (trains only, buses only, etc.)
Returns a live board with times, platforms, destinations, and delay status.
Inputs: station (required), mode, limit, datetime, +1 more. Returns: result
plan_journeyA
Plan a journey through Switzerland by train, bus, tram, boat, or cableway.
Use this whenever someone wants to:
Travel from A to B (e.g., "how do I get from Zürich to Zermatt?")
Plan a multi-stop trip (use
viafor intermediate stops)Find the best connection for a specific date/time
Arrive somewhere by a deadline (set
is_arrival_time=True)Compare route options across different transport types
Returns real-time schedules with platform numbers, delays, transfers, and occupancy levels. Call multiple times with different legs to plan a full day itinerary visiting several places.
Inputs: from_station (required), to_station (required), via, date, +4 more. Returns: result
search_locationsA
Find Swiss train stations, bus stops, and other transport locations.
Use this to:
Look up a station name (e.g., "Bern", "Zürich HB", "Interlaken")
Find stations near GPS coordinates (e.g., near your hotel)
Resolve ambiguous names before planning a journey
Returns station IDs, coordinates, and relevance scores.
Inputs: query, latitude, longitude, type. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
All four tools serve clearly distinct purposes: searching locations, planning journeys, checking station boards, and generating booking links. There is no overlap or ambiguity.
All tool names follow a consistent verb_noun pattern (get_booking_link, get_stationboard, plan_journey, search_locations) with underscores and no mixing of conventions.
Four tools is exactly right for a public transport MCP server—core functionalities (search, plan, live board, booking) are each covered by a single tool without unnecessary fragmentation or overlap.
The server covers the essential user journeys: finding stations, planning trips, checking real-time departures, and purchasing tickets. Minor gaps like disruptions alerts or fare details are absent but do not severely hinder common use cases.
Maintenance
Related MCP Connectors
Stations, connections and departures of Swiss public transport, with real-time delays.
Swiss Transport MCP — wraps Transport Open Data API (free, no auth)
Swiss trains and public transport: live connections and departures. Official data, free, no key.
Canonical SwissTrip MCP — independent SBB/CFF/FFS schedules, prices, and ticket links by SwissTrip.
Related MCP Servers
- FlicenseAqualityDmaintenanceIndependent MCP client by swsistrip for Swiss Federal Railways (SBB/CFF/FFS) — all schedules, prices, ticket links via SBB's official SMAPI.93-
- AlicenseAqualityDmaintenanceA zero-authentication MCP server for Swiss public transport, enabling users to query train connections, disruptions, station facilities, and plan journeys using natural language.121MIT
- AlicenseAqualityBmaintenanceAn MCP server for Swiss Federal Railways (SBB) open data, enabling AI models to query real-time disruptions, passenger frequencies, station details, and more without an API key.926 PyPI2MIT
- FlicenseAqualityDmaintenanceMCP server for querying German public transport information, including station search, live departures/arrivals, and journey planning.51-