プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Sbb Opendata MCP

作者:malkreideバージョン 0.4.0i★ –iパソコンで動く
レジストリ名io.github.malkreide/sbb-opendata-mcp

インストール

概要

作者による説明(英語の原文)

SBB Open Data via OpenDataSoft

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: 法律・行政データ

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • レジストリには、入力が必要なキーは載っていません。

必要なもの

  • PyPIPythonのuvのインストール(uvxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

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

ターミナルでこれを実行します

claude mcp add sbb-opendata -- uvx sbb-opendata-mcp

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

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

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

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

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月9日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント malkreide で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

法律・行政データのほかのサーバーとの比較i

  • このカテゴリのほかの1765件のうち0%よりスターが多い
  • このカテゴリのほかの1765件のうち43%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの1765件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Sbb Opendata MCPは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(0.4.0)がレジストリに届いたのは43 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。

代わりに使えるものは?

同じカテゴリには:Thai Legal, Slovenia Company Check, Lithuania Company Check

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

Thai Legal

Thai legal search MCP — statutes, gazette, opinions, court cases. Pro: court-jurisdiction rulings.

作者:legaltech.in.th初期今日更新

クラウドで動く✓ legaltech.in.th

Slovenia Company Check

Slovenia company checks: status, bankruptcy flag from the name, VAT revocation, LEI and sanctions.

作者:JusticeUA初期今日更新

クラウドで動く

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

🚆 sbb-opendata-mcp

🇨🇭 Part of the [Swiss Public Data MCP Portfolio](https://github.com/malkreide/swiss-public-data-mcp)

MCP server connecting AI models to Swiss Federal Railways (SBB) open data – passenger frequency, live rail disruptions, infrastructure & real-estate projects, train counts, platform data, rolling stock and station search from data.sbb.ch. No API key required.

🇩🇪 Deutsche Version

Demo

Overview

sbb-opendata-mcp gives AI assistants like Claude direct access to public SBB data – no copy-pasting or manual API calls. A question like *"How many passengers passed through Zürich HB every day in 2024?"* is answered with real measured data.

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.

Anchor demo query: *"Compare Zürich HB, Bern and Basel SBB by passenger frequency and platform capacity."* → More use cases by audience →


Features

  • 📊 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
  • 🚃 Rolling stock – capacity and year built
  • 🔁 Station comparison – up to 10 stations across multiple datasets
  • 🔍 Stop search – Swiss DiDok register (all of Switzerland)
  • 📦 Dataset catalogue – list all ~89 SBB open datasets
  • 🔑 No API key – all data is public and free to use
  • ☁️ Dual transport – stdio for Claude Desktop, Streamable HTTP for cloud deployment

Prerequisites

  • Python 3.11+
  • No API key — all data comes from the public data.sbb.ch portal

Install uv (recommended):

curl -LsSf https://astral.sh/uv/install.sh | sh

Installation

From PyPI:

pip install sbb-opendata-mcp

Or with uvx (no permanent installation):

uvx sbb-opendata-mcp

For local development, install from a clone in editable mode:

git clone https://github.com/malkreide/sbb-opendata-mcp.git

cd sbb-opendata-mcp pip install -e ".[dev]"


Quickstart

# Start the server (stdio mode for Claude Desktop)

sbb-opendata-mcp

Try it immediately in Claude Desktop:

*"How many people boarded at Zürich HB daily in 2024?"*

*"Are there any current disruptions on the Swiss rail network?"*


Configuration

Environment Variables

The server needs no configuration to run over stdio. The variables below tune the optional Streamable HTTP transport, logging and observability.

VariableEffectDefault
MCP_HOSTBind host for the HTTP transport. Keep 127.0.0.1 locally; only bind 0.0.0.0 inside a controlled container/cloud environment.127.0.0.1
MCP_PORTPort for the HTTP transport.8000
MCP_ALLOWED_HOSTSComma-separated host allow-list for DNS-rebinding protection (e.g. your-app.onrender.com,your-app.onrender.com:*).localhost only
MCP_ALLOWED_ORIGINSComma-separated browser-origin allow-list (e.g. https://your-app.onrender.com)._(none)_
LOG_LEVELLog verbosity (DEBUG/INFO/WARNING/…).INFO
LOG_FORMATjson for structured logs; anything else for human-readable text. Always written to stderr.text

🔒 DNS-rebinding / Origin protection is always on; localhost is allow-listed

so local HTTP development works out of the box. Logs go to stderr — stdout is

reserved for the stdio JSON-RPC channel.

Claude Desktop Configuration
{

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

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Restart Claude Desktop — the server is downloaded automatically on first use.

Other MCP Clients

Works with Cursor, Windsurf, VS Code + Continue, LibreChat, Cline and self-hosted models via mcp-proxy — same configuration as above.

Cloud Deployment (Streamable HTTP)

For use via claude.ai in the browser or remote servers (e.g. Render.com). The cloud transport is Streamable HTTP (endpoint /mcp).

Docker (recommended):

# Build + run with explicit resource limits (see docker-compose.yml)

docker compose up --build

→ http://127.0.0.1:8000/mcp

The image is a multi-stage build running as a non-root user; docker-compose.yml adds read_only, no-new-privileges and memory/CPU/PID limits.

Manual / Render.com:

pip install -e .

Bind publicly (behind a rate-limiting reverse proxy) and configure

DNS-rebinding / Origin protection for your hostname:

export MCP_HOST=0.0.0.0 export MCP_ALLOWED_HOSTS="your-app.onrender.com,your-app.onrender.com:*" export MCP_ALLOWED_ORIGINS="https://your-app.onrender.com" python -m sbb_opendata_mcp.server --http --port 8000

⚠️ Binding: In a network transport the server binds to 127.0.0.1 by

default so a locally started server is not exposed to your whole network.

Set MCP_HOST=0.0.0.0 only in a container/cloud environment where binding

to all interfaces is intended (the Docker image does this for you), and place

the server behind a reverse proxy that enforces rate limiting (and

authentication, if the endpoint should not be public). See SECURITY.md.


Available Tools

ToolDescriptionData Update
sbb_get_passenger_frequencyBoardings/alightings by station and year (daily avg.)Annual
sbb_get_rail_disruptionsLive rail traffic messagesEvery 5 min.
sbb_get_real_estate_projectsSBB real estate development projectsDaily
sbb_get_trains_per_segmentTrain counts per route segment (SBB, BLS, SOB …)Annual
sbb_get_platform_dataPlatform data (length, type, area)Ongoing
sbb_get_rolling_stockRolling stock (capacity, year built)Ongoing
sbb_compare_stationsCompare up to 10 stations (multi-dataset)–
sbb_search_stationsSearch stops (Swiss DiDok register, all CH)Ongoing
sbb_list_datasetsList all ~89 SBB open datasets–

All tools support response_format: "markdown" (human-readable) and "json" (machine-readable), plus pagination. Every tool also returns MCP structuredContent (the underlying records/metadata) alongside the rendered text, and declares its shape as outputSchema. Error results carry isError: true and {error, upstream_unavailable} instead.

Example Use Cases
QueryTool
*"How many people boarded at Zürich HB daily in 2024?"*sbb_get_passenger_frequency
*"Are there any current disruptions on the Swiss rail network?"*sbb_get_rail_disruptions
*"Compare Zürich HB, Bern and Basel SBB"*sbb_compare_stations
*"Which SBB real-estate construction projects are running?"*sbb_get_real_estate_projects
*"How many trains run yearly on the Zürich–Winterthur route?"*sbb_get_trains_per_segment
*"Which stops exist in Wädenswil?"*sbb_search_stations

→ More use cases by audience


Architecture

┌─────────────────┐     ┌───────────────────────────┐     ┌──────────────────────────┐

│ Claude / AI │────▶│ SBB Open Data MCP │────▶│ data.sbb.ch │ │ (MCP Host) │◀────│ (MCP Server) │◀────│ │ └─────────────────┘ │ │ │ OpenDataSoft REST v2.1 │ │ 9 Tools │ │ (public, no API key) │ │ Stdio | Streamable HTTP │ │ │ │ │ │ passagierfrequenz │ │ Shared httpx client │ │ rail-traffic-information │ │ (pooled, lifespan-managed)│ │ construction-projects │ │ ODSQL escaping + Pydantic │ │ perron · rollmaterial │ │ validation │ │ zugzahlen · dienststellen│ └───────────────────────────┘ └──────────────────────────┘


Project Structure

sbb-opendata-mcp/

├── src/sbb_opendata_mcp/ │ ├── init.py │ └── server.py # FastMCP server, all 10 tool definitions ├── tests/ │ └── test_server.py # Unit + live API smoke tests ├── audits/ # MCP best-practice audit evidence ├── docs/assets/demo.svg # README demo asset ├── .github/workflows/ci.yml # GitHub Actions (Python 3.11/3.12/3.13) ├── Dockerfile # Multi-stage, non-root runtime image ├── docker-compose.yml # Local run with resource limits ├── claude_desktop_config.json # Example Claude Desktop config ├── pyproject.toml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── SECURITY.md ├── EXAMPLES.md ├── LICENSE ├── README.md # This file (English) └── README.de.md # German version


Safety & Limits

  • Read-only: All 9 tools perform read-only HTTP GET requests — no data is written, modified, or deleted upstream.
  • No personal data: Queries are transient and not stored. The portal returns aggregated statistics, infrastructure and operational metadata. No PII is processed or retained.
  • No API key: Data is public and free. There is no authentication and no secret to manage.
  • Injection-hardened: year/canton are regex-validated and every value interpolated into an ODSQL where clause is escaped via a central helper.
  • Data freshness: Real-time tools (disruptions) reflect the upstream source at query time; statistical datasets update annually/daily (see the tool table).
  • Terms of service: Data is published under the data.sbb.ch licence (NonCommercialAllowed-CommercialAllowed-ReferenceRequired).
  • No guarantees: This server is a community project, not affiliated with SBB. Availability depends on the upstream API.

See SECURITY.md for the full security posture.


Known Limitations

  • Passenger frequency: Updated annually; the latest full year may lag by some months.
  • Rail disruptions: Returns all current Swiss rail messages → use limit and pagination.
  • Trains per segment: Counts are yearly aggregates, not real-time.
  • Station search: Covers the full Swiss DiDok register (all operators), not just SBB.
  • No rate limiting of its own:

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く