Skip to main content

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.chfree, 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
plan_journey 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-public-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

swiss_public_transport_mcp-0.1.7.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swiss_public_transport_mcp-0.1.7-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file swiss_public_transport_mcp-0.1.7.tar.gz.

File metadata

File hashes

Hashes for swiss_public_transport_mcp-0.1.7.tar.gz
Algorithm Hash digest
SHA256 892bfee992cbd3166bba18310af90c2e0138dcc431b33736c37141bea649eaf7
MD5 b37f0c0635c6286d2d1d6c990273e31c
BLAKE2b-256 1c8eab77639c277408817efc6b4c4b29347b34d7df3c6a901d7c0fdc3e8bb674

See more details on using hashes here.

Provenance

The following attestation bundles were made for swiss_public_transport_mcp-0.1.7.tar.gz:

Publisher: release.yml on tpjnorton/swiss-public-transport-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file swiss_public_transport_mcp-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for swiss_public_transport_mcp-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5c6d3832f4f5440690c3cea6a86b892ed0d44483c7377e5ca3c363c3f8377814
MD5 9bee730d553349686d5e643e48509249
BLAKE2b-256 0278cc5a4ed9727324deab26d89e25bab99fe2b50c18bc405ce9b26c8a68d2d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for swiss_public_transport_mcp-0.1.7-py3-none-any.whl:

Publisher: release.yml on tpjnorton/swiss-public-transport-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page