Sbb MCP Server

SBB Open Data via OpenDataSoft

Remote serverstreamable-httpPython

What is the Sbb MCP server?

Most cloud and infrastructure work still happens through a UI a human drives. Sbb MCP server moves it into the conversation instead. SBB Open Data via OpenDataSoft.

The short version

🇨🇭 Part of the Swiss Public Data MCP Portfolio

The SBB Open Data portal speaks the OpenDataSoft REST API (v2.1). This server translates it into clean Markdown and JSON for the AI model, and adds MCP structuredContent alongside the human-readable text so programmatic clients can consume the underlying records without re-parsing. The server is model-agnostic and works with any MCP-compatible client.

  • 📊 Passenger frequency – boardings/alightings by station and year (daily averages)
  • 🚨 Live rail disruptions – traffic messages, updated every 5 minutes
  • 🏗️ Infrastructure projects – station and line construction
  • 🏢 Real-estate projects – SBB property development (daily updates)
  • 🚆 Trains per segment – train counts per route (SBB, BLS, SOB …)
  • 🛤️ Platform data – length, type, area, step-free access

The tools it exposes

The server publishes 11 tools. What each one is for:

  • sbb_get_passenger_frequency — Boardings/alightings by station and year (daily avg.)
  • sbb_get_rail_disruptions — Live rail traffic messages
  • sbb_get_infrastructure_construction_projects — Infrastructure construction (stations, lines)
  • sbb_get_real_estate_projects — SBB real estate development projects
  • sbb_get_trains_per_segment — Train counts per route segment (SBB, BLS, SOB …)
  • sbb_get_platform_data — Platform data (length, type, area)
  • sbb_get_rolling_stock — Rolling stock (capacity, year built)
  • sbb_compare_stations — Compare up to 10 stations (multi-dataset)
  • sbb_search_stations — Search stops (Swiss DiDok register, all CH)
  • sbb_list_datasets — List all ~89 SBB open datasets
  • Demo — The Demo tool exposed by this server

Getting it running

Because this one is hosted, setup is mostly authentication — you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

What it needs from you

Configuration is passed through the environment: MCP_HOST, MCP_ALLOWED_HOSTS, MCP_ALLOWED_ORIGINS. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

  • Python 3.11+ - No API key — all data comes from the public data.sbb.ch portal Install uv (recommended): ---

How it compares

Among the cloud and infrastructure options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Sbb's toolset — sbb_get_passenger_frequency, sbb_get_rail_disruptions, sbb_get_infrastructure_construction_projects and 8 more — is a fair guide to whether it matches your workflow. It is maintained by malkreide; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Sbb's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Things to watch

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • With 11 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Sbb.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
sbb_get_passenger_frequencyBoardings/alightings by station and year (daily avg.)
sbb_get_rail_disruptionsLive rail traffic messages
sbb_get_infrastructure_construction_projectsInfrastructure construction (stations, lines)
sbb_get_real_estate_projectsSBB real estate development projects
sbb_get_trains_per_segmentTrain counts per route segment (SBB, BLS, SOB …)
sbb_get_platform_dataPlatform data (length, type, area)
sbb_get_rolling_stockRolling stock (capacity, year built)
sbb_compare_stationsCompare up to 10 stations (multi-dataset)
sbb_search_stationsSearch stops (Swiss DiDok register, all CH)
sbb_list_datasetsList all ~89 SBB open datasets
DemoThe Demo tool exposed by this server.

How to install the Sbb MCP server

{
  "mcpServers": {
    "sbb-opendata": {
      "command": "uvx",
      "args": ["sbb-opendata-mcp"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Python 3.11+ - No API key — all data comes from the public data.sbb.ch portal Install uv (recommended): ---
VariableDescriptionRequired
MCP_HOSTEndpoint or connection string the server talks to.Optional
MCP_ALLOWED_HOSTSEndpoint or connection string the server talks to.Optional
MCP_ALLOWED_ORIGINSConfiguration value read at startup.Optional

Example prompts to try

  • Use Sbb to sbb get passenger frequency.
  • Use Sbb to sbb get rail disruptions.
  • Use Sbb to sbb get infrastructure construction projects.

Frequently asked questions

It connects Sbb to MCP-compatible AI assistants such as Claude and Cursor, exposing 11 tools (sbb_get_passenger_frequency, sbb_get_rail_disruptions, sbb_get_infrastructure_construction_projects, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Sbb directly.