Skip to main content
Glama
swiss-public-transport-mcp

swiss-public-transport-mcp

by tpjnorton

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

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

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 tools
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 via for 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

    A4.2/5.0

    Scored across 4 tools

    Disambiguation5/5

    All four tools serve clearly distinct purposes: searching locations, planning journeys, checking station boards, and generating booking links. There is no overlap or ambiguity.

    Naming Consistency5/5

    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.

    Tool Count5/5

    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.

    Completeness4/5

    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

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Independent MCP client by swsistrip for Swiss Federal Railways (SBB/CFF/FFS) — all schedules, prices, ticket links via SBB's official SMAPI.
      9
      3
      -
    • A
      license
      A
      quality
      D
      maintenance
      A zero-authentication MCP server for Swiss public transport, enabling users to query train connections, disruptions, station facilities, and plan journeys using natural language.
      12
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      An 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.
      9
      26 PyPI
      2
      MIT