# Sbb Opendata MCP

> Sbb Opendata MCP is an open-source MCP server for transit data. MCP server giving AI assistants read access to SBB open data on passengers, disruptions. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted, macOS, Windows, Linux
- **Repository:** https://github.com/malkreide/sbb-opendata-mcp
- **MCP Registry name:** io.github.malkreide/sbb-opendata-mcp
- **Categories:** [transit data](https://ai-powered.com/categories/transit-data)
- **Listing updated:** 2026-11-18

## About

The README says this server lets AI assistants such as Claude query public Swiss Federal Railways datasets published on data.sbb.ch, covering passenger frequency, live rail disruptions, construction and real-estate projects, train counts per segment, platform details, rolling stock and stop lookup. Requests go to the OpenDataSoft REST API, and results come back as Markdown or JSON, with MCP structured content included for programmatic clients.

No API key is needed, and every tool performs read-only GET requests. The server runs over stdio for desktop clients and offers a Streamable HTTP transport for remote deployment, with Docker files and configurable host and origin allow-lists in the repository.

It suits people who want to ask questions about Swiss rail data in natural language, such as station usage or current disruptions, and get answers grounded in the published figures. The project is a community effort and is not affiliated with SBB, and availability depends on the upstream portal.

## Features

- **Passenger frequency data:** Returns boardings and alightings by station and year as daily averages.
- **Live rail disruptions:** Lists current Swiss rail traffic messages, refreshed roughly every five minutes.
- **Station and platform lookup:** Searches the Swiss DiDok stop register and reports platform length, type and step-free access.
- **Station comparison:** Compares up to ten stations across several SBB datasets in one query.
- **Dual transport support:** Runs over stdio for desktop clients or Streamable HTTP for cloud deployment.
- **No API key required:** All underlying data is public, so setup needs no credentials.

## Good for

- Asking an AI assistant how many people board at a given Swiss station each day
- Checking current rail disruptions across the Swiss network
- Comparing passenger volumes and platform capacity between major stations
- Finding which SBB real-estate or infrastructure projects are under way
- Looking up train counts on a specific route segment

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add sbb-opendata-mcp -- uvx sbb-opendata-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

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

### Claude Desktop (claude_desktop_config.json)

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

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

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

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "sbb-opendata-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "sbb-opendata-mcp"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add sbb-opendata-mcp -- uvx sbb-opendata-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.sbb-opendata-mcp]
command = "uvx"
args = ["sbb-opendata-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

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

Or run: gemini mcp add -s user sbb-opendata-mcp uvx -- sbb-opendata-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

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

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

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

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

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

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "sbb-opendata-mcp": {
      "command": "uvx",
      "args": [
        "sbb-opendata-mcp"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

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

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

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

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

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

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

From the tool list in its README, going by the names, 8 of 9 tools read data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `sbb_get_passenger_frequency` (name suggests: reads): Boardings and alightings by station and year (daily average).
- `sbb_get_rail_disruptions` (name suggests: reads): Live rail traffic messages.
- `sbb_get_real_estate_projects` (name suggests: reads): SBB real estate development projects.
- `sbb_get_trains_per_segment` (name suggests: reads): Train counts per route segment.
- `sbb_get_platform_data` (name suggests: reads): Platform length, type and area.
- `sbb_get_rolling_stock` (name suggests: reads): Rolling stock capacity and year built.
- `sbb_compare_stations`: Compare up to 10 stations across datasets.
- `sbb_search_stations` (name suggests: reads): Search stops in the Swiss DiDok register.
- `sbb_list_datasets` (name suggests: reads): List all SBB open datasets.

## FAQ

### Does Sbb Opendata MCP require an API key?

No. The README says all data comes from the public data.sbb.ch portal and no API key is needed.

### Which transports are supported?

Stdio for clients like Claude Desktop, and Streamable HTTP for remote or cloud deployment at the /mcp endpoint.

### Are the tools read-only?

Yes. The README states that all tools perform read-only HTTP GET requests and write nothing upstream.

### Is Sbb Opendata MCP affiliated with SBB?

No. The README describes it as a community project not affiliated with SBB.

### Is Sbb Opendata MCP free?

Yes. Sbb Opendata MCP is open source, so you can use and self-host it for free.

### How do I add Sbb Opendata MCP to Claude Code?

Run this command in your terminal: claude mcp add sbb-opendata-mcp -- uvx sbb-opendata-mcp

### What are the best alternatives to Sbb Opendata MCP?

The closest alternatives to Sbb Opendata MCP are GoThere Japan Transit & Travel, RailCore Developers, Swiss public transport, Commlo commute network and Usafiri MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [GoThere Japan Transit & Travel](https://ai-powered.com/mcp/gothere-japan-transit-and-travel): GoThere Japan Transit & Travel is an MCP server for maps and travel.
- [RailCore Developers](https://ai-powered.com/mcp/railcore-developers): RailCore Developers is a free MCP server for developer tools.
- [Swiss public transport](https://ai-powered.com/mcp/swiss-public-transport-2): Swiss public transport is a free MCP server for maps and travel.
- [Commlo commute network](https://ai-powered.com/mcp/commlo-commute-network): Commlo commute network is an MCP server for transit data.
- [Usafiri MCP](https://ai-powered.com/mcp/usafiri-mcp): Usafiri MCP is an open-source MCP server for vehicles and mobility.
- [Rozklad MCP](https://ai-powered.com/mcp/rozklad-mcp): Rozklad MCP is an open-source MCP server for maps and travel.
- [Rail Crossing Atlas](https://ai-powered.com/mcp/rail-crossing-atlas): Rail Crossing Atlas is an MCP server for transit data.
- [Faceabot Transit Norway (Vy, Entur)](https://ai-powered.com/mcp/faceabot-transit-norway-vy-entur): Faceabot Transit Norway (Vy, Entur) is a free MCP server for maps and travel.

---
Source: https://ai-powered.com/mcp/sbb-opendata-mcp
