Skip to main content
MCP server CX Codex

swiss-transport-mcp — Claude Code MCP server: how to install

Connects AI assistants to Swiss transit data for route planning, delays, fares, and coach layouts. Useful for building multi-leg itineraries directly in chat.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add swiss-transport-mcp -- uvx swiss-transport-mcp
Open on GitHub

What swiss-transport-mcp does

The server acts as an interpreter between LLMs and opentransportdata.swiss. It queries various transport endpoints using OJP 2.0 over XML/SOAP or SIRI-SX feeds and translates responses into clean JSON. Your assistant inspects departures, track assignments, disruptions, and train configurations without parsing raw XML.

Minimal setup requires a single token in TRANSPORT_API_KEY subscribed to OJP 2.0 via api-manager.opentransportdata.swiss. Omitting optional credentials for passenger load, fare calculation, or formations will not stop the server; it omits those specific endpoints and exposes the six core tools.

Outbound HTTP traffic is strictly pinned to *.opentransportdata.swiss domains to prevent SSRF vulnerabilities. Running the server locally requires Python 3.11 or newer.

What it helps with

  • plan Swiss transit connections with exact transfer windows
  • retrieve live track alerts and train cancellations via SIRI-SX
  • check passenger occupancy levels across Swiss rail operators
  • inspect coach formations, accessibility options, and fare estimates

Example prompts for the agent

  • Find the next departures from Zurich Stadelhofen with platforms and live delay status
  • Check if there are any service alerts between Bern and Geneva today
  • Show ticket prices and train formations for the direct connection to Basel

How to install swiss-transport-mcp

Platform CLI

claude mcp add swiss-transport-mcp -- uvx swiss-transport-mcp

uvx runs the command named after the package; if the README names another one, use uvx --from swiss-transport-mcp <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about swiss-transport-mcp

How do I install swiss-transport-mcp in Claude Code?

Run claude mcp add swiss-transport-mcp -- uvx swiss-transport-mcp in your terminal. Ensure your TRANSPORT_API_KEY environment variable is exported beforehand.

What does swiss-transport-mcp do?

It exposes Swiss transit datasets to AI assistants by converting OJP 2.0 and SIRI-SX responses into structured JSON. It supports timetable queries, live delays, platform updates, and coach layouts.

Do I need separate API keys for every transit feature?

Only the OJP 2.0 key is mandatory. Without extra keys for passenger occupancy, train formations, or ticket pricing, the server starts normally with its core feature set.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor