sbb-mcp — Claude Code MCP server: Swiss train schedules and tickets
MCP server for searching trains, schedules, and ticket prices on Swiss Federal Railways directly from your editor. Pulls live data from SBB's official API and supports Halbtax and GA discounts.
no license 1,852 installs updated 2026-04-08
claude mcp add --transport http sbb-mcp https://sbb-mcp--swisstrip.run.toolsWhat sbb-mcp does
sbb-mcp integrates with Claude Code, Codex, Cursor, and other editors to bring Swiss train search and booking into your development environment. Search stations and routes, view departure and arrival times with transfers, fetch prices with discount cards applied, and get direct links to purchase tickets. The server uses SBB's official SMAPI and stores your travel profile locally at ~/.sbb-mcp/profile.json.
Nine tools cover the full workflow: station search, route finding, trip details with intermediate stops and occupancy, pricing for single or multiple travelers with family discounts (when connected via SWISSTRIP_TOKEN), and ticket purchase links. On mobile devices with the SBB app installed, ticket links open directly in the app with your discount already applied. For group travel, save profiles for each passenger and the server calculates family pricing automatically.
What it helps with
- search for trains between Swiss cities with schedules and connections
- check ticket price with Halbtax or GA discount applied
- get a direct purchase link to an SBB ticket from the editor
- store traveler profiles to calculate group pricing on demand
Example prompts for the agent
- Find trains from Zurich to Geneva tomorrow, show prices for Halbtax cardholders
- What's the ticket cost from Basel to Lucerne for two adults with a GA pass?
- Show me the full route with all stops, platforms, and how full each car is
How to install sbb-mcp
Platform CLI: remote server
claude mcp add --transport http sbb-mcp https://sbb-mcp--swisstrip.run.toolsPlatform CLI: remote server
codex mcp add sbb-mcp --url https://sbb-mcp--swisstrip.run.toolsConfig file
{
"mcpServers": {
"sbb-mcp": {
"url": "https://sbb-mcp--swisstrip.run.tools"
}
}
}Config file
{
"servers": {
"sbb-mcp": {
"type": "http",
"url": "https://sbb-mcp--swisstrip.run.tools"
}
}
}Platform CLI: remote server
gemini mcp add -t http sbb-mcp https://sbb-mcp--swisstrip.run.toolsStep 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 sbb-mcp
How do I install sbb-mcp in Claude Code?
Run claude mcp add --transport http sbb-mcp https://sbb-mcp--swisstrip.run.tools. Other editors (Codex, Cursor, GitHub Copilot, Gemini CLI) use different configuration methods — check their documentation.
What does sbb-mcp do?
It's an MCP server that searches SBB trains, retrieves live schedules, and calculates ticket prices with discounts. Data comes directly from SBB's official API, so schedules and fares are always current.
Do I need a SWISSTRIP_TOKEN to use it?
No, basic train search and pricing work without authentication. SWISSTRIP_TOKEN is only needed if you want to use family discounts or pull profiles for multiple travelers from your SwissTrip account.