MCP server for Swiss public transport — connections, stationboards, and real-time delays
Project description
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.
Tools
| Tool | Purpose |
|---|---|
search_locations |
Resolve a station/stop/POI by name or coordinates |
search_connections |
Plan A → B with via, transport-type filters, arrival-time mode |
get_stationboard |
Live departures or arrivals from any stop |
get_booking_link |
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-mcp
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"swiss-transport": {
"command": "uvx",
"args": ["swiss-public-transport-mcp"]
}
}
}
Config file location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%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-mcp
Related 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swiss_public_transport_mcp-0.1.5.tar.gz.
File metadata
- Download URL: swiss_public_transport_mcp-0.1.5.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e2395fee4af7d849486a1ee1b7821a52529ff13e9398c7828d199ed3c1a5fa7
|
|
| MD5 |
11abea05454e8d924c3d0e68a7854d5a
|
|
| BLAKE2b-256 |
8ac98124649fc746e256e5c2bb53a4a149bb7d1148029910f4caf0155368ad2f
|
Provenance
The following attestation bundles were made for swiss_public_transport_mcp-0.1.5.tar.gz:
Publisher:
release.yml on tpjnorton/swiss-public-transport-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swiss_public_transport_mcp-0.1.5.tar.gz -
Subject digest:
7e2395fee4af7d849486a1ee1b7821a52529ff13e9398c7828d199ed3c1a5fa7 - Sigstore transparency entry: 1285024333
- Sigstore integration time:
-
Permalink:
tpjnorton/swiss-public-transport-mcp@266cd54b4094fa9ffb96effbe23e46e31fae41fa -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/tpjnorton
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@266cd54b4094fa9ffb96effbe23e46e31fae41fa -
Trigger Event:
push
-
Statement type:
File details
Details for the file swiss_public_transport_mcp-0.1.5-py3-none-any.whl.
File metadata
- Download URL: swiss_public_transport_mcp-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96ea24e1a70f296001e27aca417ed91019ecc1dcded3669c6f008e39006e5f51
|
|
| MD5 |
e193f24f2dedb50af193c6b13aa78103
|
|
| BLAKE2b-256 |
18da0fb9fb2530a24eedd7ae451ef3a58a2dc9bcb45887fa8ca91c27c1fab382
|
Provenance
The following attestation bundles were made for swiss_public_transport_mcp-0.1.5-py3-none-any.whl:
Publisher:
release.yml on tpjnorton/swiss-public-transport-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
swiss_public_transport_mcp-0.1.5-py3-none-any.whl -
Subject digest:
96ea24e1a70f296001e27aca417ed91019ecc1dcded3669c6f008e39006e5f51 - Sigstore transparency entry: 1285024555
- Sigstore integration time:
-
Permalink:
tpjnorton/swiss-public-transport-mcp@266cd54b4094fa9ffb96effbe23e46e31fae41fa -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/tpjnorton
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@266cd54b4094fa9ffb96effbe23e46e31fae41fa -
Trigger Event:
push
-
Statement type: