# sbb-mcp

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · 1852 installs
- Author: fabsforward2-zhoi
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://smithery.ai/server/fabsforward2-zhoi/sbb-mcp
- Updated: 2026-04-08
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/sbb-mcp

## What it 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.

## Requirements
- Remote server: `https://sbb-mcp--swisstrip.run.tools`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http sbb-mcp https://sbb-mcp--swisstrip.run.tools
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add sbb-mcp --url https://sbb-mcp--swisstrip.run.tools
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "sbb-mcp": {
            "url": "https://sbb-mcp--swisstrip.run.tools"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "sbb-mcp": {
            "type": "http",
            "url": "https://sbb-mcp--swisstrip.run.tools"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http sbb-mcp https://sbb-mcp--swisstrip.run.tools
```

## When to use it
- 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
- 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

## Similar
- [swiss-transport-mcp](https://affpapa.org/en/nevibecode/mcp/swiss-transport-mcp.md) — MCP server · ★ 7 repo stars
- [Ignav Flights](https://affpapa.org/en/nevibecode/mcp/ignav-flights.md) — MCP server · 7205 installs
- [MAQAMI Travel](https://affpapa.org/en/nevibecode/mcp/maqami-travel.md) — MCP server · 3255 installs
- [South Padre Trips Booking](https://affpapa.org/en/nevibecode/mcp/south-padre-trips-booking.md) — MCP server · 939 installs
- [ConnectMeGuru](https://affpapa.org/en/nevibecode/mcp/connectmeguru.md) — MCP server · 914 installs
- [South Padre Trips — AI Vacation Rental Booking](https://affpapa.org/en/nevibecode/mcp/south-padre-trips-ai-vacation-rental-booking.md) — MCP server · 770 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
